Re: Review Request 45956: Added the `_isolate` method.

2016-04-13 Thread Jie Yu

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


Ship it!




Ship It!

- Jie Yu


On April 14, 2016, midnight, Avinash sridharan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45956/
> ---
> 
> (Updated April 14, 2016, midnight)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-4922
> https://issues.apache.org/jira/browse/MESOS-4922
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Once the `isolate` is successful, the `_isolate` method calls out the
> `mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
> /etc/resolv.conf for the container.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 3f64bc2d5e114da63a76d93b6406e70891dd0242 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> ac01abc29f0e1a145516d8ec7d373c6cedb33b38 
> 
> Diff: https://reviews.apache.org/r/45956/diff/
> 
> 
> Testing
> ---
> 
> make
> 
> *Ran mesos_execute with single master/slave setup to verify that containers 
> get the right hostname and network files when attached to a CNI network.
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>



Re: Review Request 45956: Added the `_isolate` method.

2016-04-13 Thread Avinash sridharan


> On April 13, 2016, 5:16 a.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp, lines 716-717
> > 
> >
> > What if IP is not found? Should we use 127.0.0.1?
> 
> Avinash sridharan wrote:
> If the container does not have any IP the hostname should resolve to 
> 169.254.x.y (which is a self assigned IP address). In fact I gave this a bit 
> more thought, and realized that we don't need to add and explicit resolution 
> for hostname in /etc/hosts file. If the hostname is not present in /etc/hosts 
> file the kernel will automatically pick the first, non-loopback IP, as the 
> resolution for the hostname, so explicitly setting the hostname to a an IP in 
> /etc/hosts doesn't help. I verified this on my Ubuntu 14.04 VM, hostnames are 
> not stored in /etc/hosts. According have gone ahead and removed the code to 
> pick an IP for the hostname and adding it to /etc/hosts. 
> 
> We still need the /etc/hosts for resolving `localhost`.
> 
> Jie Yu wrote:
> Sorry, I got confused, what happens if I do `ping ` in the 
> container without setting up /etc/hosts?

Looks like you are right, the behavior seems to be dependent on how 
nsswtich.conf is setup. It seems to be safer to leave the hostname in 
/etc/hosts. Bought back the loop that adds the hostname to /etc/hosts.


- Avinash


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


On April 13, 2016, 7:18 a.m., Avinash sridharan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45956/
> ---
> 
> (Updated April 13, 2016, 7:18 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-4922
> https://issues.apache.org/jira/browse/MESOS-4922
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Once the `isolate` is successful, the `_isolate` method calls out the
> `mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
> /etc/resolv.conf for the container.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 3f64bc2d5e114da63a76d93b6406e70891dd0242 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> ac01abc29f0e1a145516d8ec7d373c6cedb33b38 
> 
> Diff: https://reviews.apache.org/r/45956/diff/
> 
> 
> Testing
> ---
> 
> make
> 
> *Ran mesos_execute with single master/slave setup to verify that containers 
> get the right hostname and network files when attached to a CNI network.
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>



Re: Review Request 45956: Added the `_isolate` method.

2016-04-13 Thread Avinash sridharan

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

(Updated April 14, 2016, midnight)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Adding back the code to set hostname in /etc/hosts.


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


Repository: mesos


Description
---

Once the `isolate` is successful, the `_isolate` method calls out the
`mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
/etc/resolv.conf for the container.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
3f64bc2d5e114da63a76d93b6406e70891dd0242 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
ac01abc29f0e1a145516d8ec7d373c6cedb33b38 

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


Testing
---

make

*Ran mesos_execute with single master/slave setup to verify that containers get 
the right hostname and network files when attached to a CNI network.


Thanks,

Avinash sridharan



Re: Review Request 45956: Added the `_isolate` method.

2016-04-13 Thread Jie Yu


> On April 13, 2016, 5:16 a.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp, lines 716-717
> > 
> >
> > What if IP is not found? Should we use 127.0.0.1?
> 
> Avinash sridharan wrote:
> If the container does not have any IP the hostname should resolve to 
> 169.254.x.y (which is a self assigned IP address). In fact I gave this a bit 
> more thought, and realized that we don't need to add and explicit resolution 
> for hostname in /etc/hosts file. If the hostname is not present in /etc/hosts 
> file the kernel will automatically pick the first, non-loopback IP, as the 
> resolution for the hostname, so explicitly setting the hostname to a an IP in 
> /etc/hosts doesn't help. I verified this on my Ubuntu 14.04 VM, hostnames are 
> not stored in /etc/hosts. According have gone ahead and removed the code to 
> pick an IP for the hostname and adding it to /etc/hosts. 
> 
> We still need the /etc/hosts for resolving `localhost`.

Sorry, I got confused, what happens if I do `ping ` in the 
container without setting up /etc/hosts?


- Jie


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


On April 13, 2016, 7:18 a.m., Avinash sridharan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45956/
> ---
> 
> (Updated April 13, 2016, 7:18 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-4922
> https://issues.apache.org/jira/browse/MESOS-4922
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Once the `isolate` is successful, the `_isolate` method calls out the
> `mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
> /etc/resolv.conf for the container.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 3f64bc2d5e114da63a76d93b6406e70891dd0242 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> ac01abc29f0e1a145516d8ec7d373c6cedb33b38 
> 
> Diff: https://reviews.apache.org/r/45956/diff/
> 
> 
> Testing
> ---
> 
> make
> 
> *Ran mesos_execute with single master/slave setup to verify that containers 
> get the right hostname and network files when attached to a CNI network.
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>



Re: Review Request 45956: Added the `_isolate` method.

2016-04-13 Thread Avinash sridharan


> On April 13, 2016, 5:16 a.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp, lines 716-717
> > 
> >
> > What if IP is not found? Should we use 127.0.0.1?

If the container does not have any IP the hostname should resolve to 
169.254.x.y (which is a self assigned IP address). In fact I gave this a bit 
more thought, and realized that we don't need to add and explicit resolution 
for hostname in /etc/hosts file. If the hostname is not present in /etc/hosts 
file the kernel will automatically pick the first, non-loopback IP, as the 
resolution for the hostname, so explicitly setting the hostname to a an IP in 
/etc/hosts doesn't help. I verified this on my Ubuntu 14.04 VM, hostnames are 
not stored in /etc/hosts. According have gone ahead and removed the code to 
pick an IP for the hostname and adding it to /etc/hosts. 

We still need the /etc/hosts for resolving `localhost`.


- Avinash


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


On April 13, 2016, 7:18 a.m., Avinash sridharan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45956/
> ---
> 
> (Updated April 13, 2016, 7:18 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-4922
> https://issues.apache.org/jira/browse/MESOS-4922
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Once the `isolate` is successful, the `_isolate` method calls out the
> `mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
> /etc/resolv.conf for the container.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 3f64bc2d5e114da63a76d93b6406e70891dd0242 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> ac01abc29f0e1a145516d8ec7d373c6cedb33b38 
> 
> Diff: https://reviews.apache.org/r/45956/diff/
> 
> 
> Testing
> ---
> 
> make
> 
> *Ran mesos_execute with single master/slave setup to verify that containers 
> get the right hostname and network files when attached to a CNI network.
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>



Re: Review Request 45956: Added the `_isolate` method.

2016-04-13 Thread Avinash sridharan

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

(Updated April 13, 2016, 7:18 a.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Fixed Jie's comments.


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


Repository: mesos


Description
---

Once the `isolate` is successful, the `_isolate` method calls out the
`mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
/etc/resolv.conf for the container.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
3f64bc2d5e114da63a76d93b6406e70891dd0242 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
ac01abc29f0e1a145516d8ec7d373c6cedb33b38 

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


Testing
---

make

*Ran mesos_execute with single master/slave setup to verify that containers get 
the right hostname and network files when attached to a CNI network.


Thanks,

Avinash sridharan



Re: Review Request 45956: Added the `_isolate` method.

2016-04-12 Thread Avinash sridharan

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

(Updated April 13, 2016, 5:22 a.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Rebased.


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


Repository: mesos


Description
---

Once the `isolate` is successful, the `_isolate` method calls out the
`mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
/etc/resolv.conf for the container.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
3f64bc2d5e114da63a76d93b6406e70891dd0242 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
ac01abc29f0e1a145516d8ec7d373c6cedb33b38 

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


Testing
---

make

*Ran mesos_execute with single master/slave setup to verify that containers get 
the right hostname and network files when attached to a CNI network.


Thanks,

Avinash sridharan



Re: Review Request 45956: Added the `_isolate` method.

2016-04-12 Thread Jie Yu

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




src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (lines 108 - 109)


can you follow style guide here?



src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (line 123)


`const Flags& _flags`



src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (line 128)


move up. Please following the original style.



src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (line 170)


const Flags flags;



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 80 - 81)


```
new NetworkCniIsolatorProcess(
flags,
hashmap(;
```



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 568 - 571)


```
Owned info(new Info(
containerNetworks,
containerConfig.rootfs()));

infos.put(containerId, info);
```



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 661 - 673)


Can you move that to `_isolate` as well?

```
return await(futures)
  .then(defer(
  self(),
  ::_isolate,
  containerId,
  pid,
  const list& attaches));
```



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 675)


See my above comments.

Also, capture `this` pointer is in general bad. If this isolator terminates 
(e.g., during teardown in tests) while the above future is still pending, when 
the future becomes ready, it'll cause a segfault.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 689 - 693)


This should be a CHECK instead?



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 702)


Kill this line.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 706)


No need to print containerId in the error message here since the caller 
will print it anyway.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 709)


Add a TODO saying that we only support ipv4 for now



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 714)


Please align the parameters.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 716 - 717)


What if IP is not found? Should we use 127.0.0.1?



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 722 - 725)


```
Try ipNetwork = net::IPNetwork::parse(
network.cniNetworkInfo->ip4().ip(),
AF_INET);

if (ipNetwork.isError()) {
  return Failure("");
}

hosts << ipNetwork->address() << " " << containerId << endl;
```



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 732 - 733)


This fits in one line?



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 750 - 751)


DItto on alignment.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 752 - 761)


I probably do
```
if (network.cniNetworkInfo.isNone() ||
!network.cniNetworkInfo->has_dns()) {
  continue;
}

foreach (const string& nameserver,
 network.cniNetwork->dns().nameservers()) {
  resolv << "nameserver " << nameserver << endl;
}
```



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 754)


THis is not needed.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 771 - 773)


Please align `<<`. See other files in the code base.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 776)


Ditto. Fix all such cases.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 788 - 797)

Re: Review Request 45956: Added the `_isolate` method.

2016-04-12 Thread Avinash sridharan

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

(Updated April 13, 2016, 4:40 a.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Fixed missing quotes in `Failure`.


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


Repository: mesos


Description
---

Once the `isolate` is successful, the `_isolate` method calls out the
`mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
/etc/resolv.conf for the container.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
654137c552a7c416f394365e43ea80770fe1ef8d 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
159152a01b68a667dbd57fa6452c6c2a3422787c 

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


Testing
---

make

*Ran mesos_execute with single master/slave setup to verify that containers get 
the right hostname and network files when attached to a CNI network.


Thanks,

Avinash sridharan



Re: Review Request 45956: Added the `_isolate` method.

2016-04-11 Thread Avinash sridharan

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

(Updated April 12, 2016, 2:13 a.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Addressed Jie's comments.


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


Repository: mesos


Description
---

Once the `isolate` is successful, the `_isolate` method calls out the
`mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
/etc/resolv.conf for the container.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
654137c552a7c416f394365e43ea80770fe1ef8d 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
159152a01b68a667dbd57fa6452c6c2a3422787c 

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


Testing
---

make

*Ran mesos_execute with single master/slave setup to verify that containers get 
the right hostname and network files when attached to a CNI network.


Thanks,

Avinash sridharan



Re: Review Request 45956: Added the `_isolate` method.

2016-04-11 Thread Avinash sridharan


> On April 11, 2016, 7:10 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp, line 762
> > 
> >
> > I don't think 'realpath' is necessary here.

Will remove `realpath`. 

What should be the behavior in case "/etc/resolv.conf" does not exist ? Should 
we create a `/etc/resolv.conf` or just throw a `Failure?


> On April 11, 2016, 7:10 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp, lines 797-823
> > 
> >
> > Please follow style in 'attach' to monitor the subprocess outputs.

Did you mean convert the Lambda into a function (similar to `_attach`) ?


- Avinash


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


On April 9, 2016, 5:48 p.m., Avinash sridharan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45956/
> ---
> 
> (Updated April 9, 2016, 5:48 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-4922
> https://issues.apache.org/jira/browse/MESOS-4922
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Once the `isolate` is successful, the `_isolate` method calls out the
> `mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
> /etc/resolv.conf for the container.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 654137c552a7c416f394365e43ea80770fe1ef8d 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> 159152a01b68a667dbd57fa6452c6c2a3422787c 
> 
> Diff: https://reviews.apache.org/r/45956/diff/
> 
> 
> Testing
> ---
> 
> make
> 
> *Ran mesos_execute with single master/slave setup to verify that containers 
> get the right hostname and network files when attached to a CNI network.
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>



Re: Review Request 45956: Added the `_isolate` method.

2016-04-11 Thread Jie Yu

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




src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 674)


.then in the next line.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 717 - 720)


Can you use stout IPNetwork::parse first and get IP using 
'IPNetwork::address()'



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 762)


I don't think 'realpath' is necessary here.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 797 - 823)


Please follow style in 'attach' to monitor the subprocess outputs.


- Jie Yu


On April 9, 2016, 5:48 p.m., Avinash sridharan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45956/
> ---
> 
> (Updated April 9, 2016, 5:48 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-4922
> https://issues.apache.org/jira/browse/MESOS-4922
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Once the `isolate` is successful, the `_isolate` method calls out the
> `mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
> /etc/resolv.conf for the container.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 654137c552a7c416f394365e43ea80770fe1ef8d 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> 159152a01b68a667dbd57fa6452c6c2a3422787c 
> 
> Diff: https://reviews.apache.org/r/45956/diff/
> 
> 
> Testing
> ---
> 
> make
> 
> *Ran mesos_execute with single master/slave setup to verify that containers 
> get the right hostname and network files when attached to a CNI network.
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>



Re: Review Request 45956: Added the `_isolate` method.

2016-04-09 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [45953, 45954, 45955, 45956]

Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' 
COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On April 9, 2016, 5:48 p.m., Avinash sridharan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45956/
> ---
> 
> (Updated April 9, 2016, 5:48 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-4922
> https://issues.apache.org/jira/browse/MESOS-4922
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Once the `isolate` is successful, the `_isolate` method calls out the
> `mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
> /etc/resolv.conf for the container.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 654137c552a7c416f394365e43ea80770fe1ef8d 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> 159152a01b68a667dbd57fa6452c6c2a3422787c 
> 
> Diff: https://reviews.apache.org/r/45956/diff/
> 
> 
> Testing
> ---
> 
> make
> 
> *Ran mesos_execute with single master/slave setup to verify that containers 
> get the right hostname and network files when attached to a CNI network.
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>



Re: Review Request 45956: Added the `_isolate` method.

2016-04-09 Thread Avinash sridharan

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

(Updated April 9, 2016, 5:48 p.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Using realpath of `/etc/resolv.conf`


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


Repository: mesos


Description
---

Once the `isolate` is successful, the `_isolate` method calls out the
`mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
/etc/resolv.conf for the container.


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
654137c552a7c416f394365e43ea80770fe1ef8d 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
159152a01b68a667dbd57fa6452c6c2a3422787c 

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


Testing
---

make

*Ran mesos_execute with single master/slave setup to verify that containers get 
the right hostname and network files when attached to a CNI network.


Thanks,

Avinash sridharan



Re: Review Request 45956: Added the `_isolate` method.

2016-04-08 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [45953, 45954, 45955, 45956]

Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' 
COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On April 8, 2016, 10:48 p.m., Avinash sridharan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45956/
> ---
> 
> (Updated April 8, 2016, 10:48 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-4922
> https://issues.apache.org/jira/browse/MESOS-4922
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Once the `isolate` is successful, the `_isolate` method calls out the
> `mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
> /etc/resolv.conf for the container.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 654137c552a7c416f394365e43ea80770fe1ef8d 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> 159152a01b68a667dbd57fa6452c6c2a3422787c 
> 
> Diff: https://reviews.apache.org/r/45956/diff/
> 
> 
> Testing
> ---
> 
> make
> 
> *Ran mesos_execute with single master/slave setup to verify that containers 
> get the right hostname and network files when attached to a CNI network.
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>



Review Request 45956: Added the `_isolate` method.

2016-04-08 Thread Avinash sridharan

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

Review request for mesos, Jie Yu and Qian Zhang.


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


Repository: mesos


Description
---

Once the `isolate` is successful, the `_isolate` method calls out the
`mesos-cni-helper` to setup the /etc/hosts, /etc/hostname and
/etc/resolv.conf for the container.


Diffs
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
654137c552a7c416f394365e43ea80770fe1ef8d 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
159152a01b68a667dbd57fa6452c6c2a3422787c 

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


Testing
---

make

*Ran mesos_execute with single master/slave setup to verify that containers get 
the right hostname and network files when attached to a CNI network.


Thanks,

Avinash sridharan