Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-15 Thread Sergey Urbanovich

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

(Updated Aug. 15, 2018, 9:49 p.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Rebased on master.


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


Repository: mesos


Description
---

On receiving a request for getting `usage` for a given container
the `network/cni` isolator uses getifaddrs(3) glibc function. The
function returns basic networking metrics for each networking
interface in the container networking namespace. It should work
right out of the box on all modern Linux-based systems.

To get more networking metrics please use Netlink Protocol Library.
However, you will have to open NETLINK sockets in each networking
namespace and manage them from the `network/cni` isolator.

JIRA: https://issues.apache.org/jira/browse/MESOS-5647


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
a743e65a418b3231027facacb396821f72a769da 
  src/slave/flags.hpp 88c35da5fd754abbd4bd316e1fa9efa4a70a6b8c 
  src/slave/flags.cpp 54d9acc8693f53294bdc2a88183cac84a8dfbfd9 


Diff: https://reviews.apache.org/r/68054/diff/9/

Changes: https://reviews.apache.org/r/68054/diff/8-9/


Testing
---

https://reviews.apache.org/r/68355


Thanks,

Sergey Urbanovich



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-15 Thread Sergey Urbanovich

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

(Updated Aug. 15, 2018, 7:03 p.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Fixed compilation error on centos6.


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


Repository: mesos


Description
---

On receiving a request for getting `usage` for a given container
the `network/cni` isolator uses getifaddrs(3) glibc function. The
function returns basic networking metrics for each networking
interface in the container networking namespace. It should work
right out of the box on all modern Linux-based systems.

To get more networking metrics please use Netlink Protocol Library.
However, you will have to open NETLINK sockets in each networking
namespace and manage them from the `network/cni` isolator.

JIRA: https://issues.apache.org/jira/browse/MESOS-5647


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
f46c962d8f044092aaa113fafc536c6b25bab45c 
  src/slave/flags.hpp 88c35da5fd754abbd4bd316e1fa9efa4a70a6b8c 
  src/slave/flags.cpp 54d9acc8693f53294bdc2a88183cac84a8dfbfd9 


Diff: https://reviews.apache.org/r/68054/diff/8/

Changes: https://reviews.apache.org/r/68054/diff/7-8/


Testing
---

https://reviews.apache.org/r/68355


Thanks,

Sergey Urbanovich



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-14 Thread Jie Yu

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


Ship it!




Ship It!

- Jie Yu


On Aug. 15, 2018, 1:46 a.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated Aug. 15, 2018, 1:46 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/slave/flags.hpp 88c35da5fd754abbd4bd316e1fa9efa4a70a6b8c 
>   src/slave/flags.cpp 54d9acc8693f53294bdc2a88183cac84a8dfbfd9 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/7/
> 
> 
> Testing
> ---
> 
> https://reviews.apache.org/r/68355
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-14 Thread Sergey Urbanovich

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

(Updated Aug. 15, 2018, 1:46 a.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Moved the test to https://reviews.apache.org/r/68355.


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


Repository: mesos


Description
---

On receiving a request for getting `usage` for a given container
the `network/cni` isolator uses getifaddrs(3) glibc function. The
function returns basic networking metrics for each networking
interface in the container networking namespace. It should work
right out of the box on all modern Linux-based systems.

To get more networking metrics please use Netlink Protocol Library.
However, you will have to open NETLINK sockets in each networking
namespace and manage them from the `network/cni` isolator.

JIRA: https://issues.apache.org/jira/browse/MESOS-5647


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
f46c962d8f044092aaa113fafc536c6b25bab45c 
  src/slave/flags.hpp 88c35da5fd754abbd4bd316e1fa9efa4a70a6b8c 
  src/slave/flags.cpp 54d9acc8693f53294bdc2a88183cac84a8dfbfd9 


Diff: https://reviews.apache.org/r/68054/diff/7/

Changes: https://reviews.apache.org/r/68054/diff/6-7/


Testing (updated)
---

https://reviews.apache.org/r/68355


Thanks,

Sergey Urbanovich



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-14 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [68052, 68053, 68054]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 
MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Aug. 14, 2018, 2:14 a.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated Aug. 14, 2018, 2:14 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/slave/flags.hpp 88c35da5fd754abbd4bd316e1fa9efa4a70a6b8c 
>   src/slave/flags.cpp 54d9acc8693f53294bdc2a88183cac84a8dfbfd9 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> cb22e73b4215b5b0a49ac610e5f657b73d38963b 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/6/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-13 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 68054 was successfully built and tested.

Reviews applied: `['68052', '68054']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2145/mesos-review-68054

- Mesos Reviewbot Windows


On Aug. 14, 2018, 2:14 a.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated Aug. 14, 2018, 2:14 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/slave/flags.hpp 88c35da5fd754abbd4bd316e1fa9efa4a70a6b8c 
>   src/slave/flags.cpp 54d9acc8693f53294bdc2a88183cac84a8dfbfd9 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> cb22e73b4215b5b0a49ac610e5f657b73d38963b 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/6/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-13 Thread Sergey Urbanovich

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

(Updated Aug. 14, 2018, 2:14 a.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Moved `vethPlugin` to `SetUp()`, fixed delete issue with veth pair (see line 
201).


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


Repository: mesos


Description
---

On receiving a request for getting `usage` for a given container
the `network/cni` isolator uses getifaddrs(3) glibc function. The
function returns basic networking metrics for each networking
interface in the container networking namespace. It should work
right out of the box on all modern Linux-based systems.

To get more networking metrics please use Netlink Protocol Library.
However, you will have to open NETLINK sockets in each networking
namespace and manage them from the `network/cni` isolator.

JIRA: https://issues.apache.org/jira/browse/MESOS-5647


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
f46c962d8f044092aaa113fafc536c6b25bab45c 
  src/slave/flags.hpp 88c35da5fd754abbd4bd316e1fa9efa4a70a6b8c 
  src/slave/flags.cpp 54d9acc8693f53294bdc2a88183cac84a8dfbfd9 
  src/tests/containerizer/cni_isolator_tests.cpp 
cb22e73b4215b5b0a49ac610e5f657b73d38963b 


Diff: https://reviews.apache.org/r/68054/diff/6/

Changes: https://reviews.apache.org/r/68054/diff/5-6/


Testing
---

bin/mesos-tests.sh --verbose 
--gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
--gtest_break_on_failure --gtest_repeat=100


Thanks,

Sergey Urbanovich



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-13 Thread Jie Yu

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



I hit this issue on my box
```
I0813 16:42:29.687569 31007 linux_launcher.cpp:503] Launching container 
fae92a9a-561f-40a5-b49e-896be36fcf8b and cloning with namespaces CLONE_NEWNS | 
CLONE_NEWUTS | CLONE_NEWNET
I0813 16:42:29.700687 31005 containerizer.cpp:3021] Transitioning the state of 
container fae92a9a-561f-40a5-b49e-896be36fcf8b from PREPARING to ISOLATING
I0813 16:42:29.702626 30978 cni.cpp:954] Bind mounted '/proc/31055/ns/net' to 
'/run/mesos/isolators/network/cni/fae92a9a-561f-40a5-b49e-896be36fcf8b/ns' for 
container fae92a9a-561f-40a5-b49e-896be36fcf8b
I0813 16:42:29.899713 30981 cni.cpp:1385] Got assigned IPv4 address 
'203.0.113.2/24' from CNI network 'veth' for container 
fae92a9a-561f-40a5-b49e-896be36fcf8b
I0813 16:42:29.900835 30982 cni.cpp:1094] Unable to find DNS nameservers for 
container fae92a9a-561f-40a5-b49e-896be36fcf8b, using host '/etc/resolv.conf'
I0813 16:42:30.102488 30996 containerizer.cpp:3021] Transitioning the state of 
container fae92a9a-561f-40a5-b49e-896be36fcf8b from ISOLATING to FETCHING
I0813 16:42:30.105840 30992 containerizer.cpp:3021] Transitioning the state of 
container fae92a9a-561f-40a5-b49e-896be36fcf8b from FETCHING to RUNNING
Marked '/' as rslave
I0813 16:42:30.236037 31088 exec.cpp:162] Version: 1.7.0
W0813 16:42:31.245690 31126 process.cpp:1449] Failed to link to 
'10.0.49.2:44965', connect: Failed to connect to 10.0.49.2:44965: No route to 
host
I0813 16:42:31.246233 31106 exec.cpp:527] Agent exited ... shutting down
I0813 16:42:31.246580 31106 v0_v1executor.cpp:172] Implicitly connecting the 
executor to shut it down
I0813 16:42:31.247351 31110 executor.cpp:182] Received SHUTDOWN event
I0813 16:42:31.248729 31110 executor.cpp:796] Shutting down
I0813 16:42:31.250615 31126 process.cpp:926] Stopped the socket accept loop
I0813 16:42:31.308015 30980 containerizer.cpp:2860] Container 
fae92a9a-561f-40a5-b49e-896be36fcf8b has exited
I0813 16:42:31.308157 30980 containerizer.cpp:2407] Destroying container 
fae92a9a-561f-40a5-b49e-896be36fcf8b in RUNNING state
I0813 16:42:31.308187 30980 containerizer.cpp:3021] Transitioning the state of 
container fae92a9a-561f-40a5-b49e-896be36fcf8b from RUNNING to DESTROYING
I0813 16:42:31.309753 31017 linux_launcher.cpp:582] Asked to destroy container 
fae92a9a-561f-40a5-b49e-896be36fcf8b
I0813 16:42:31.311748 31017 linux_launcher.cpp:629] Destroying cgroup 
'/sys/fs/cgroup/freezer/mesos/fae92a9a-561f-40a5-b49e-896be36fcf8b'
```


src/slave/containerizer/mesos/isolators/network/cni/cni.hpp
Lines 191 (patched)


nits: kill this line.



src/tests/containerizer/cni_isolator_tests.cpp
Lines 2256 (patched)


I would like to add the cleanup code to `CniIsolatorTest::cleanup`.

It's possible that the test is ended with sigkill or ctrl+c. And `ip link 
add name vethmesostest0 type veth peer name vethmesostestns` might fail if the 
veth hasn't been cleaned up


- Jie Yu


On Aug. 10, 2018, 7:08 p.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated Aug. 10, 2018, 7:08 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/slave/flags.hpp eeb9708f9ec76d83b6719541f4a012544c7c0cbe 
>   src/slave/flags.cpp 58cdc0f1100fe244e5bf1036e1ccf39478d5d478 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> cae2c1950c6e5218f7fc7cebd93f5b4ed687fb5a 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/5/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceS

Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-13 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [68052, 68053, 68054]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 
MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Aug. 10, 2018, 7:08 p.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated Aug. 10, 2018, 7:08 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/slave/flags.hpp eeb9708f9ec76d83b6719541f4a012544c7c0cbe 
>   src/slave/flags.cpp 58cdc0f1100fe244e5bf1036e1ccf39478d5d478 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> cae2c1950c6e5218f7fc7cebd93f5b4ed687fb5a 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/5/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-10 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 68054 was successfully built and tested.

Reviews applied: `['68052', '68053', '68054']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2131/mesos-review-68054

- Mesos Reviewbot Windows


On Aug. 10, 2018, 7:08 p.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated Aug. 10, 2018, 7:08 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/slave/flags.hpp eeb9708f9ec76d83b6719541f4a012544c7c0cbe 
>   src/slave/flags.cpp 58cdc0f1100fe244e5bf1036e1ccf39478d5d478 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> cae2c1950c6e5218f7fc7cebd93f5b4ed687fb5a 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/5/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-10 Thread Sergey Urbanovich

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

(Updated Aug. 10, 2018, 7:08 p.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Added veth CNI plugin.


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


Repository: mesos


Description
---

On receiving a request for getting `usage` for a given container
the `network/cni` isolator uses getifaddrs(3) glibc function. The
function returns basic networking metrics for each networking
interface in the container networking namespace. It should work
right out of the box on all modern Linux-based systems.

To get more networking metrics please use Netlink Protocol Library.
However, you will have to open NETLINK sockets in each networking
namespace and manage them from the `network/cni` isolator.

JIRA: https://issues.apache.org/jira/browse/MESOS-5647


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
f46c962d8f044092aaa113fafc536c6b25bab45c 
  src/slave/flags.hpp eeb9708f9ec76d83b6719541f4a012544c7c0cbe 
  src/slave/flags.cpp 58cdc0f1100fe244e5bf1036e1ccf39478d5d478 
  src/tests/containerizer/cni_isolator_tests.cpp 
cae2c1950c6e5218f7fc7cebd93f5b4ed687fb5a 


Diff: https://reviews.apache.org/r/68054/diff/5/

Changes: https://reviews.apache.org/r/68054/diff/4-5/


Testing
---

bin/mesos-tests.sh --verbose 
--gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
--gtest_break_on_failure --gtest_repeat=100


Thanks,

Sergey Urbanovich



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-10 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 68054 was successfully built and tested.

Reviews applied: `['68052', '68053', '68054']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2127/mesos-review-68054

- Mesos Reviewbot Windows


On Aug. 10, 2018, 2:39 a.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated Aug. 10, 2018, 2:39 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/slave/flags.hpp eeb9708f9ec76d83b6719541f4a012544c7c0cbe 
>   src/slave/flags.cpp 58cdc0f1100fe244e5bf1036e1ccf39478d5d478 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> cae2c1950c6e5218f7fc7cebd93f5b4ed687fb5a 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/4/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-10 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 68054 was successfully built and tested.

Reviews applied: `['68052', '68053', '68054']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2126/mesos-review-68054

- Mesos Reviewbot Windows


On Aug. 10, 2018, 2:39 a.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated Aug. 10, 2018, 2:39 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/slave/flags.hpp eeb9708f9ec76d83b6719541f4a012544c7c0cbe 
>   src/slave/flags.cpp 58cdc0f1100fe244e5bf1036e1ccf39478d5d478 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> cae2c1950c6e5218f7fc7cebd93f5b4ed687fb5a 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/4/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-09 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [68052, 68053, 68054]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 
MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Aug. 9, 2018, 7:39 p.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated Aug. 9, 2018, 7:39 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/slave/flags.hpp eeb9708f9ec76d83b6719541f4a012544c7c0cbe 
>   src/slave/flags.cpp 58cdc0f1100fe244e5bf1036e1ccf39478d5d478 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> cae2c1950c6e5218f7fc7cebd93f5b4ed687fb5a 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/4/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-09 Thread Sergey Urbanovich

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

(Updated Aug. 10, 2018, 2:39 a.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Added `network_cni_metrics` flag.


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


Repository: mesos


Description
---

On receiving a request for getting `usage` for a given container
the `network/cni` isolator uses getifaddrs(3) glibc function. The
function returns basic networking metrics for each networking
interface in the container networking namespace. It should work
right out of the box on all modern Linux-based systems.

To get more networking metrics please use Netlink Protocol Library.
However, you will have to open NETLINK sockets in each networking
namespace and manage them from the `network/cni` isolator.

JIRA: https://issues.apache.org/jira/browse/MESOS-5647


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
f46c962d8f044092aaa113fafc536c6b25bab45c 
  src/slave/flags.hpp eeb9708f9ec76d83b6719541f4a012544c7c0cbe 
  src/slave/flags.cpp 58cdc0f1100fe244e5bf1036e1ccf39478d5d478 
  src/tests/containerizer/cni_isolator_tests.cpp 
cae2c1950c6e5218f7fc7cebd93f5b4ed687fb5a 


Diff: https://reviews.apache.org/r/68054/diff/4/

Changes: https://reviews.apache.org/r/68054/diff/3-4/


Testing
---

bin/mesos-tests.sh --verbose 
--gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
--gtest_break_on_failure --gtest_repeat=100


Thanks,

Sergey Urbanovich



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-08-09 Thread Sergey Urbanovich


> On July 28, 2018, 12:29 a.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
> > Lines 1506-1507 (patched)
> > 
> >
> > No need for this temp variable
> 
> Sergey Urbanovich wrote:
> I got the following error without the temp variable. What would be the 
> best way to use `lambda::bind()` in that case?
> 
> ```
> ../src/slave/containerizer/mesos/isolators/network/cni/cni.cpp:1513:26: 
> error: no matching member function for call to 'run'
>   return namespaceRunner.run(netns, "net", 
> lambda::bind(&NetworkCniIsolatorProcess::_usage, ifNames));
>  ^~~
> ../src/linux/ns.hpp:210:22: note: candidate template ignored: could not 
> match 'function' against '_Bind'
>   process::Future run(
>  ^
> ```

The temp variable adds explicit type conversion. I've been trying to use 
`std::function<>` in ns.hpp, but got the same error for `lambda::bind()` and 
`std::bind()`:

```
../src/slave/containerizer/mesos/isolators/network/cni/cni.cpp:1514:26: error: 
no matching member function for call to 'run'
  return namespaceRunner.run(
 ^~~
../src/linux/ns.hpp:211:22: note: candidate template ignored: could not match 
'function' against '_Bind'
  process::Future run(
 ^
```

For `std::function<>` and lambda expressions I got another error:

```
../src/slave/containerizer/mesos/isolators/network/cni/cni.cpp:1513:26: error: 
no matching member function for call to 'run'
  return namespaceRunner.run(netns, "net",
 ^~~
../src/linux/ns.hpp:211:22: note: candidate template ignored: could not match 
'function ()>' against '(lambda at 
../src/slave/containerizer/mesos/isolators/network/cni/cni.cpp:1514:7)'
  process::Future run(
 ^
```


- Sergey


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


On July 27, 2018, 11:36 p.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated July 27, 2018, 11:36 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> 90d2d4103c8136d2dd883318acc135f7efca80d8 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/3/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-07-30 Thread Sergey Urbanovich


> On July 28, 2018, 12:29 a.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
> > Lines 1506-1507 (patched)
> > 
> >
> > No need for this temp variable

I got the following error without the temp variable. What would be the best way 
to use `lambda::bind()` in that case?

```
../src/slave/containerizer/mesos/isolators/network/cni/cni.cpp:1513:26: error: 
no matching member function for call to 'run'
  return namespaceRunner.run(netns, "net", 
lambda::bind(&NetworkCniIsolatorProcess::_usage, ifNames));
 ^~~
../src/linux/ns.hpp:210:22: note: candidate template ignored: could not match 
'function' against '_Bind'
  process::Future run(
 ^
```


- Sergey


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


On July 27, 2018, 11:36 p.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated July 27, 2018, 11:36 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> 90d2d4103c8136d2dd883318acc135f7efca80d8 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/3/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-07-30 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 68054 was successfully built and tested.

Reviews applied: `['68052', '68053', '68054']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2004/mesos-review-68054

- Mesos Reviewbot Windows


On July 27, 2018, 11:36 p.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated July 27, 2018, 11:36 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> 90d2d4103c8136d2dd883318acc135f7efca80d8 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/3/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-07-27 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 68054 was successfully built and tested.

Reviews applied: `['68052', '68053', '68054']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/1997/mesos-review-68054

- Mesos Reviewbot Windows


On July 27, 2018, 11:36 p.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated July 27, 2018, 11:36 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> 90d2d4103c8136d2dd883318acc135f7efca80d8 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/2/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-07-27 Thread Jie Yu

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



Havent finish reviewing the test yet. Will resume next week.


src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
Lines 1506-1507 (patched)


No need for this temp variable



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
Lines 1515 (patched)


Instead of passing in container network struct, i'd suggest we just pass in 
ifName:
```
Try NetworkCniIsolatorProcess::_usage(
const hashmap ifNames)
```


- Jie Yu


On July 27, 2018, 11:36 p.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated July 27, 2018, 11:36 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> 90d2d4103c8136d2dd883318acc135f7efca80d8 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/2/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-07-27 Thread Sergey Urbanovich

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

(Updated July 27, 2018, 11:36 p.m.)


Review request for mesos, Jie Yu and Qian Zhang.


Changes
---

Fixed code style.


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


Repository: mesos


Description
---

On receiving a request for getting `usage` for a given container
the `network/cni` isolator uses getifaddrs(3) glibc function. The
function returns basic networking metrics for each networking
interface in the container networking namespace. It should work
right out of the box on all modern Linux-based systems.

To get more networking metrics please use Netlink Protocol Library.
However, you will have to open NETLINK sockets in each networking
namespace and manage them from the `network/cni` isolator.

JIRA: https://issues.apache.org/jira/browse/MESOS-5647


Diffs (updated)
-

  src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
f46c962d8f044092aaa113fafc536c6b25bab45c 
  src/tests/containerizer/cni_isolator_tests.cpp 
90d2d4103c8136d2dd883318acc135f7efca80d8 


Diff: https://reviews.apache.org/r/68054/diff/2/

Changes: https://reviews.apache.org/r/68054/diff/1-2/


Testing
---

bin/mesos-tests.sh --verbose 
--gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
--gtest_break_on_failure --gtest_repeat=100


Thanks,

Sergey Urbanovich



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-07-27 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [68052, 68053, 68054]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 
MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On July 25, 2018, 10:42 p.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated July 25, 2018, 10:42 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> 90d2d4103c8136d2dd883318acc135f7efca80d8 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/1/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>



Re: Review Request 68054: Added networking statistics to cni isolator.

2018-07-26 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 68054 was successfully built and tested.

Reviews applied: `['68052', '68053', '68054']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/1985/mesos-review-68054

- Mesos Reviewbot Windows


On July 26, 2018, 5:42 a.m., Sergey Urbanovich wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68054/
> ---
> 
> (Updated July 26, 2018, 5:42 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Qian Zhang.
> 
> 
> Bugs: MESOS-5647
> https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> On receiving a request for getting `usage` for a given container
> the `network/cni` isolator uses getifaddrs(3) glibc function. The
> function returns basic networking metrics for each networking
> interface in the container networking namespace. It should work
> right out of the box on all modern Linux-based systems.
> 
> To get more networking metrics please use Netlink Protocol Library.
> However, you will have to open NETLINK sockets in each networking
> namespace and manage them from the `network/cni` isolator.
> 
> JIRA: https://issues.apache.org/jira/browse/MESOS-5647
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp 
> 31ec4ddb1049b7259b0784e5e40b002e29f6a8da 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> f46c962d8f044092aaa113fafc536c6b25bab45c 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> 90d2d4103c8136d2dd883318acc135f7efca80d8 
> 
> 
> Diff: https://reviews.apache.org/r/68054/diff/1/
> 
> 
> Testing
> ---
> 
> bin/mesos-tests.sh --verbose 
> --gtest_filter="CniIsolatorTest.ROOT_VerifyResourceStatistics" 
> --gtest_break_on_failure --gtest_repeat=100
> 
> 
> Thanks,
> 
> Sergey Urbanovich
> 
>