You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Kapil Arya <ka...@mesosphere.io> on 2015/07/17 22:40:50 UTC

Review Request 36585: Exposed `docker inspect` output via state.json

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/
-----------------------------------------------------------

Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.


Bugs: MESOS-3061
    https://issues.apache.org/jira/browse/MESOS-3061


Repository: mesos


Description
-------

This would allow Mesos-DNS to lookup container information such as its
IP address.


Diffs
-----

  src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
  src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 

Diff: https://reviews.apache.org/r/36585/diff/


Testing
-------

sudo make check


Thanks,

Kapil Arya


Re: Review Request 36585: Exposed `docker inspect` output via state.json

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/#review92131
-----------------------------------------------------------


Patch looks great!

Reviews applied: [36574, 36575, 36580, 36585]

All tests passed.

- Mesos ReviewBot


On July 17, 2015, 8:40 p.m., Kapil Arya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36585/
> -----------------------------------------------------------
> 
> (Updated July 17, 2015, 8:40 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.
> 
> 
> Bugs: MESOS-3061
>     https://issues.apache.org/jira/browse/MESOS-3061
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This would allow Mesos-DNS to lookup container information such as its
> IP address.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
>   src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 
> 
> Diff: https://reviews.apache.org/r/36585/diff/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Kapil Arya
> 
>


Re: Review Request 36585: Exposed `docker inspect` output via state.json

Posted by Kapil Arya <ka...@mesosphere.io>.

> On July 18, 2015, 9:28 p.m., Timothy Chen wrote:
> > src/docker/executor.cpp, line 164
> > <https://reviews.apache.org/r/36585/diff/2/?file=1015868#file1015868line164>
> >
> >     So what's special about the label that we also need to include the docker inspect data in there? Why can't the framework just use the data field?

We want to expose the data via state.json so that Mesos-DNS can consume it. However, the Master never stores TaskStatus::data and so it is not exposed via state.json.

Having said that, it looks like this RR would be a no-go. We would probably end up using a Mesos hook module to add a Label with just the container-IP which would then be exposed via state.json.


- Kapil


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/#review92196
-----------------------------------------------------------


On July 18, 2015, 8:38 p.m., Kapil Arya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36585/
> -----------------------------------------------------------
> 
> (Updated July 18, 2015, 8:38 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.
> 
> 
> Bugs: MESOS-3061
>     https://issues.apache.org/jira/browse/MESOS-3061
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This would allow Mesos-DNS to lookup container information such as its
> IP address.
> 
> NOTE: Apparently, the data size is about 15KB per `docker inspect` blob and that might addup for large clusters. One suggestion is to expose only the IP field(s) from:
> 
>     "NetworkSettings": {
>         "Bridge": "",
>         "EndpointID": "c9d8bfb120503eda3dc88ffdcc5778cff4e7f05bb2e53f9b2fba82972ecfe3da",
>         "Gateway": "172.17.42.1",
>         "GlobalIPv6Address": "",
>         "GlobalIPv6PrefixLen": 0,
>         "HairpinMode": false,
>         "IPAddress": "172.17.0.5",
>         "IPPrefixLen": 16,
>         "IPv6Gateway": "",
>         "LinkLocalIPv6Address": "",
>         "LinkLocalIPv6PrefixLen": 0,
>         "MacAddress": "02:42:ac:11:00:05",
>         "NetworkID": "f36472f7725507d90ab10215d35d020bf3eaf5ebdc024cb5b3ffff773967d9fc",
>         "PortMapping": null,
>         "Ports": {},
>         "SandboxKey": "/var/run/docker/netns/3c3d4d0f5e18",
>         "SecondaryIPAddresses": null,
>         "SecondaryIPv6Addresses": null
>     },
> 
> An alternate is to use a hook module to decorate TaskStatus with IP information extracted from the output of `docker inspect`.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
>   src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 
> 
> Diff: https://reviews.apache.org/r/36585/diff/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Kapil Arya
> 
>


Re: Review Request 36585: Exposed `docker inspect` output via state.json

Posted by Timothy Chen <tn...@apache.org>.

> On July 19, 2015, 1:28 a.m., Timothy Chen wrote:
> > src/docker/executor.cpp, line 164
> > <https://reviews.apache.org/r/36585/diff/2/?file=1015868#file1015868line164>
> >
> >     So what's special about the label that we also need to include the docker inspect data in there? Why can't the framework just use the data field?
> 
> Kapil Arya wrote:
>     We want to expose the data via state.json so that Mesos-DNS can consume it. However, the Master never stores TaskStatus::data and so it is not exposed via state.json.
>     
>     Having said that, it looks like this RR would be a no-go. We would probably end up using a Mesos hook module to add a Label with just the container-IP which would then be exposed via state.json.

I see, yes we can't store this for all masters.


- Timothy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/#review92196
-----------------------------------------------------------


On July 19, 2015, 12:38 a.m., Kapil Arya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36585/
> -----------------------------------------------------------
> 
> (Updated July 19, 2015, 12:38 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.
> 
> 
> Bugs: MESOS-3061
>     https://issues.apache.org/jira/browse/MESOS-3061
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This would allow Mesos-DNS to lookup container information such as its
> IP address.
> 
> NOTE: Apparently, the data size is about 15KB per `docker inspect` blob and that might addup for large clusters. One suggestion is to expose only the IP field(s) from:
> 
>     "NetworkSettings": {
>         "Bridge": "",
>         "EndpointID": "c9d8bfb120503eda3dc88ffdcc5778cff4e7f05bb2e53f9b2fba82972ecfe3da",
>         "Gateway": "172.17.42.1",
>         "GlobalIPv6Address": "",
>         "GlobalIPv6PrefixLen": 0,
>         "HairpinMode": false,
>         "IPAddress": "172.17.0.5",
>         "IPPrefixLen": 16,
>         "IPv6Gateway": "",
>         "LinkLocalIPv6Address": "",
>         "LinkLocalIPv6PrefixLen": 0,
>         "MacAddress": "02:42:ac:11:00:05",
>         "NetworkID": "f36472f7725507d90ab10215d35d020bf3eaf5ebdc024cb5b3ffff773967d9fc",
>         "PortMapping": null,
>         "Ports": {},
>         "SandboxKey": "/var/run/docker/netns/3c3d4d0f5e18",
>         "SecondaryIPAddresses": null,
>         "SecondaryIPv6Addresses": null
>     },
> 
> An alternate is to use a hook module to decorate TaskStatus with IP information extracted from the output of `docker inspect`.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
>   src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 
> 
> Diff: https://reviews.apache.org/r/36585/diff/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Kapil Arya
> 
>


Re: Review Request 36585: Exposed `docker inspect` output via state.json

Posted by Timothy Chen <tn...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/#review92196
-----------------------------------------------------------



src/docker/executor.cpp (line 164)
<https://reviews.apache.org/r/36585/#comment146221>

    So what's special about the label that we also need to include the docker inspect data in there? Why can't the framework just use the data field?



src/tests/docker_containerizer_tests.cpp (line 729)
<https://reviews.apache.org/r/36585/#comment146220>

    Since you already check the size I don't think you need a for loop and a boolean as well.


- Timothy Chen


On July 19, 2015, 12:38 a.m., Kapil Arya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36585/
> -----------------------------------------------------------
> 
> (Updated July 19, 2015, 12:38 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.
> 
> 
> Bugs: MESOS-3061
>     https://issues.apache.org/jira/browse/MESOS-3061
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This would allow Mesos-DNS to lookup container information such as its
> IP address.
> 
> NOTE: Apparently, the data size is about 15KB per `docker inspect` blob and that might addup for large clusters. One suggestion is to expose only the IP field(s) from:
> 
>     "NetworkSettings": {
>         "Bridge": "",
>         "EndpointID": "c9d8bfb120503eda3dc88ffdcc5778cff4e7f05bb2e53f9b2fba82972ecfe3da",
>         "Gateway": "172.17.42.1",
>         "GlobalIPv6Address": "",
>         "GlobalIPv6PrefixLen": 0,
>         "HairpinMode": false,
>         "IPAddress": "172.17.0.5",
>         "IPPrefixLen": 16,
>         "IPv6Gateway": "",
>         "LinkLocalIPv6Address": "",
>         "LinkLocalIPv6PrefixLen": 0,
>         "MacAddress": "02:42:ac:11:00:05",
>         "NetworkID": "f36472f7725507d90ab10215d35d020bf3eaf5ebdc024cb5b3ffff773967d9fc",
>         "PortMapping": null,
>         "Ports": {},
>         "SandboxKey": "/var/run/docker/netns/3c3d4d0f5e18",
>         "SecondaryIPAddresses": null,
>         "SecondaryIPv6Addresses": null
>     },
> 
> An alternate is to use a hook module to decorate TaskStatus with IP information extracted from the output of `docker inspect`.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
>   src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 
> 
> Diff: https://reviews.apache.org/r/36585/diff/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Kapil Arya
> 
>


Re: Review Request 36585: Exposed `docker inspect` output via state.json

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/#review92195
-----------------------------------------------------------


Bad patch!

Reviews applied: [36596]

Failed command: ./support/apply-review.sh -n -r 36596

Error:
 2015-07-19 00:57:57 URL:https://reviews.apache.org/r/36596/diff/raw/ [8815/8815] -> "36596.patch" [1]
Successfully applied: Added jsonify() to stout.

The jsonify() function converts a Protobuf/string/double/bool to
JSON::Value. Added some tests as well.


Review: https://reviews.apache.org/r/36596
Checking 2 files using filter --filter=-,+build/class,+build/deprecated,+build/endif_comment,+readability/todo,+readability/namespace,+runtime/vlog,+whitespace/blank_line,+whitespace/comma,+whitespace/end_of_line,+whitespace/ending_newline,+whitespace/forcolon,+whitespace/indent,+whitespace/line_length,+whitespace/operators,+whitespace/semicolon,+whitespace/tab,+whitespace/todo
Total errors found: 0
ERROR: Commit spanning multiple projects.

Please use separate commits for mesos, libprocess and stout.

Paths grouped by project:
stout:
  3rdparty/libprocess/3rdparty/stout/Makefile.am
  3rdparty/libprocess/3rdparty/stout/include/Makefile.am
  3rdparty/libprocess/3rdparty/stout/include/stout/jsonify.hpp
  3rdparty/libprocess/3rdparty/stout/tests/jsonify_tests.cpp
libprocess:
  3rdparty/libprocess/3rdparty/Makefile.am
Failed to commit patch

- Mesos ReviewBot


On July 19, 2015, 12:38 a.m., Kapil Arya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36585/
> -----------------------------------------------------------
> 
> (Updated July 19, 2015, 12:38 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.
> 
> 
> Bugs: MESOS-3061
>     https://issues.apache.org/jira/browse/MESOS-3061
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This would allow Mesos-DNS to lookup container information such as its
> IP address.
> 
> NOTE: Apparently, the data size is about 15KB per `docker inspect` blob and that might addup for large clusters. One suggestion is to expose only the IP field(s) from:
> 
>     "NetworkSettings": {
>         "Bridge": "",
>         "EndpointID": "c9d8bfb120503eda3dc88ffdcc5778cff4e7f05bb2e53f9b2fba82972ecfe3da",
>         "Gateway": "172.17.42.1",
>         "GlobalIPv6Address": "",
>         "GlobalIPv6PrefixLen": 0,
>         "HairpinMode": false,
>         "IPAddress": "172.17.0.5",
>         "IPPrefixLen": 16,
>         "IPv6Gateway": "",
>         "LinkLocalIPv6Address": "",
>         "LinkLocalIPv6PrefixLen": 0,
>         "MacAddress": "02:42:ac:11:00:05",
>         "NetworkID": "f36472f7725507d90ab10215d35d020bf3eaf5ebdc024cb5b3ffff773967d9fc",
>         "PortMapping": null,
>         "Ports": {},
>         "SandboxKey": "/var/run/docker/netns/3c3d4d0f5e18",
>         "SecondaryIPAddresses": null,
>         "SecondaryIPv6Addresses": null
>     },
> 
> An alternate is to use a hook module to decorate TaskStatus with IP information extracted from the output of `docker inspect`.
> 
> 
> Diffs
> -----
> 
>   src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
>   src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 
> 
> Diff: https://reviews.apache.org/r/36585/diff/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Kapil Arya
> 
>


Re: Review Request 36585: Exposed docker container IP via state.json

Posted by Timothy Chen <tn...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/#review92452
-----------------------------------------------------------



src/docker/executor.cpp (line 163)
<https://reviews.apache.org/r/36585/#comment146623>

    I like this a lot better, but I'm still thinking if this is what labels are intended for, and what is the implications of storing this in the labels.


- Timothy Chen


On July 21, 2015, 5:02 p.m., Kapil Arya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36585/
> -----------------------------------------------------------
> 
> (Updated July 21, 2015, 5:02 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.
> 
> 
> Bugs: MESOS-3061
>     https://issues.apache.org/jira/browse/MESOS-3061
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This would allow Mesos-DNS to lookup container information such as its
> IP address.
> 
> 
> Diffs
> -----
> 
>   src/docker/docker.hpp fbae7bd382b675bba602494f0aa8679797c41504 
>   src/docker/docker.cpp 27932585423bde6789f634edbc21c548e1924d16 
>   src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
>   src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 
> 
> Diff: https://reviews.apache.org/r/36585/diff/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Kapil Arya
> 
>


Re: Review Request 36585: Exposed docker container IP via state.json

Posted by Benjamin Hindman <be...@berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/#review92471
-----------------------------------------------------------

Ship it!



src/tests/docker_containerizer_tests.cpp (line 729)
<https://reviews.apache.org/r/36585/#comment146670>

    Need to flip expectation and actual.


- Benjamin Hindman


On July 21, 2015, 5:02 p.m., Kapil Arya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36585/
> -----------------------------------------------------------
> 
> (Updated July 21, 2015, 5:02 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.
> 
> 
> Bugs: MESOS-3061
>     https://issues.apache.org/jira/browse/MESOS-3061
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This would allow Mesos-DNS to lookup container information such as its
> IP address.
> 
> 
> Diffs
> -----
> 
>   src/docker/docker.hpp fbae7bd382b675bba602494f0aa8679797c41504 
>   src/docker/docker.cpp 27932585423bde6789f634edbc21c548e1924d16 
>   src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
>   src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 
> 
> Diff: https://reviews.apache.org/r/36585/diff/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Kapil Arya
> 
>


Re: Review Request 36585: Exposed docker container IP via state.json

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/#review92456
-----------------------------------------------------------


Patch looks great!

Reviews applied: [36574, 36575, 36580, 36585]

All tests passed.

- Mesos ReviewBot


On July 21, 2015, 5:02 p.m., Kapil Arya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36585/
> -----------------------------------------------------------
> 
> (Updated July 21, 2015, 5:02 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.
> 
> 
> Bugs: MESOS-3061
>     https://issues.apache.org/jira/browse/MESOS-3061
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This would allow Mesos-DNS to lookup container information such as its
> IP address.
> 
> 
> Diffs
> -----
> 
>   src/docker/docker.hpp fbae7bd382b675bba602494f0aa8679797c41504 
>   src/docker/docker.cpp 27932585423bde6789f634edbc21c548e1924d16 
>   src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
>   src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 
> 
> Diff: https://reviews.apache.org/r/36585/diff/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Kapil Arya
> 
>


Re: Review Request 36585: Exposed docker container IP via state.json

Posted by Kapil Arya <ka...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/
-----------------------------------------------------------

(Updated July 21, 2015, 1:02 p.m.)


Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.


Changes
-------

Updated to expsoe just the IP.


Summary (updated)
-----------------

Exposed docker container IP via state.json


Bugs: MESOS-3061
    https://issues.apache.org/jira/browse/MESOS-3061


Repository: mesos


Description (updated)
-------

This would allow Mesos-DNS to lookup container information such as its
IP address.


Diffs (updated)
-----

  src/docker/docker.hpp fbae7bd382b675bba602494f0aa8679797c41504 
  src/docker/docker.cpp 27932585423bde6789f634edbc21c548e1924d16 
  src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
  src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 

Diff: https://reviews.apache.org/r/36585/diff/


Testing
-------

sudo make check


Thanks,

Kapil Arya


Re: Review Request 36585: Exposed `docker inspect` output via state.json

Posted by Kapil Arya <ka...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/
-----------------------------------------------------------

(Updated July 18, 2015, 8:38 p.m.)


Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.


Changes
-------

rebased


Bugs: MESOS-3061
    https://issues.apache.org/jira/browse/MESOS-3061


Repository: mesos


Description (updated)
-------

This would allow Mesos-DNS to lookup container information such as its
IP address.

NOTE: Apparently, the data size is about 15KB per `docker inspect` blob and that might addup for large clusters. One suggestion is to expose only the IP field(s) from:

    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "c9d8bfb120503eda3dc88ffdcc5778cff4e7f05bb2e53f9b2fba82972ecfe3da",
        "Gateway": "172.17.42.1",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "172.17.0.5",
        "IPPrefixLen": 16,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "02:42:ac:11:00:05",
        "NetworkID": "f36472f7725507d90ab10215d35d020bf3eaf5ebdc024cb5b3ffff773967d9fc",
        "PortMapping": null,
        "Ports": {},
        "SandboxKey": "/var/run/docker/netns/3c3d4d0f5e18",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },

An alternate is to use a hook module to decorate TaskStatus with IP information extracted from the output of `docker inspect`.


Diffs (updated)
-----

  src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
  src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 

Diff: https://reviews.apache.org/r/36585/diff/


Testing
-------

sudo make check


Thanks,

Kapil Arya


Re: Review Request 36585: Exposed `docker inspect` output via state.json

Posted by Kapil Arya <ka...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36585/
-----------------------------------------------------------

(Updated July 17, 2015, 6:06 p.m.)


Review request for mesos, Benjamin Hindman, Ben Mahler, and Timothy Chen.


Bugs: MESOS-3061
    https://issues.apache.org/jira/browse/MESOS-3061


Repository: mesos


Description (updated)
-------

This would allow Mesos-DNS to lookup container information such as its
IP address.

NOTE: Apparently, the data size is about 15KB per `docker inspect` blob and that might addup for large clusters. One suggestion is to expose only the IP field(s) from:

    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "c9d8bfb120503eda3dc88ffdcc5778cff4e7f05bb2e53f9b2fba82972ecfe3da",
        "Gateway": "172.17.42.1",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "172.17.0.5",
        "IPPrefixLen": 16,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "02:42:ac:11:00:05",
        "NetworkID": "f36472f7725507d90ab10215d35d020bf3eaf5ebdc024cb5b3ffff773967d9fc",
        "PortMapping": null,
        "Ports": {},
        "SandboxKey": "/var/run/docker/netns/3c3d4d0f5e18",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },


Diffs
-----

  src/docker/executor.cpp cdcd8ee7ad0b53748819bc1e565f708e30e99a5d 
  src/tests/docker_containerizer_tests.cpp 6c6f4b7f30cec9b5bba77234b714e96289c82b43 

Diff: https://reviews.apache.org/r/36585/diff/


Testing
-------

sudo make check


Thanks,

Kapil Arya