Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-28 Thread Vinod Kone

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


Ship it!




LGTM modulo the comments I made. I'll fix them when committing. Thanks.

- Vinod Kone


On May 25, 2016, 4:27 p.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47822/
> ---
> 
> (Updated May 25, 2016, 4:27 p.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, 
> Benjamin Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-5293
> https://issues.apache.org/jira/browse/MESOS-5293
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The master and agent code for routing endpoints are made
> consistent. Now they both capture 'this' variable in the
> lambda calls in routing function arguments. Continuations
> are no more need to be static.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
>   src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
>   src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 
> 
> Diff: https://reviews.apache.org/r/47822/diff/
> 
> 
> Testing
> ---
> 
> Unit tests.
> 
> On ubuntu 16.04:
> sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check
> 
> Manual testing.
> 
> 1. Ran master with:
> 
> 
>sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
> 
> 
> 2. ACL File:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "NONE" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   } 
> 
> 
> 3. Ran slave with:
> 
> 
>sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
> --acls=file:///home/abhishek/testAcl
> 
> 
> 4. Ran toy-framework with:
> 
> 
>sudo ./no-executor-framework --master=master@127.0.0.1:5050 
> --command="echo hello"
> 
> 
> 5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
> error 403: Forbidden
> 
> 6. Changed ACL to:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "ANY" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   }
> 
> 
> 7. Ran slave and framework again.
> 
> 8. Output:
> 
> 
> 
> [{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
>  Executor (Task: 699) (Command: sh -c 'echo 
> hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-28 Thread Vinod Kone


> On May 25, 2016, 9:45 a.m., Jan Schlicht wrote:
> > src/slave/http.cpp, line 384
> > 
> >
> > s/slaveFlags/slave->flags/, see comment above.

don't need to pass the flags at all since this is now a member function. i'll 
fix this while committing.


> On May 25, 2016, 9:45 a.m., Jan Schlicht wrote:
> > src/slave/http.cpp, line 783
> > 
> >
> > s/localSlave/slave/

no need to pass `slave` at all because this is now a non-static member 
function. i'll fix this while committing.


- Vinod


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


On May 25, 2016, 4:27 p.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47822/
> ---
> 
> (Updated May 25, 2016, 4:27 p.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, 
> Benjamin Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-5293
> https://issues.apache.org/jira/browse/MESOS-5293
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The master and agent code for routing endpoints are made
> consistent. Now they both capture 'this' variable in the
> lambda calls in routing function arguments. Continuations
> are no more need to be static.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
>   src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
>   src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 
> 
> Diff: https://reviews.apache.org/r/47822/diff/
> 
> 
> Testing
> ---
> 
> Unit tests.
> 
> On ubuntu 16.04:
> sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check
> 
> Manual testing.
> 
> 1. Ran master with:
> 
> 
>sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
> 
> 
> 2. ACL File:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "NONE" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   } 
> 
> 
> 3. Ran slave with:
> 
> 
>sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
> --acls=file:///home/abhishek/testAcl
> 
> 
> 4. Ran toy-framework with:
> 
> 
>sudo ./no-executor-framework --master=master@127.0.0.1:5050 
> --command="echo hello"
> 
> 
> 5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
> error 403: Forbidden
> 
> 6. Changed ACL to:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "ANY" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   }
> 
> 
> 7. Ran slave and framework again.
> 
> 8. Output:
> 
> 
> 
> [{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
>  Executor (Task: 699) (Command: sh -c 'echo 
> hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-26 Thread Jan Schlicht

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


Ship it!




Ship It!

- Jan Schlicht


On May 25, 2016, 6:27 p.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47822/
> ---
> 
> (Updated May 25, 2016, 6:27 p.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, 
> Benjamin Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-5293
> https://issues.apache.org/jira/browse/MESOS-5293
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The master and agent code for routing endpoints are made
> consistent. Now they both capture 'this' variable in the
> lambda calls in routing function arguments. Continuations
> are no more need to be static.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
>   src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
>   src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 
> 
> Diff: https://reviews.apache.org/r/47822/diff/
> 
> 
> Testing
> ---
> 
> Unit tests.
> 
> On ubuntu 16.04:
> sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check
> 
> Manual testing.
> 
> 1. Ran master with:
> 
> 
>sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
> 
> 
> 2. ACL File:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "NONE" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   } 
> 
> 
> 3. Ran slave with:
> 
> 
>sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
> --acls=file:///home/abhishek/testAcl
> 
> 
> 4. Ran toy-framework with:
> 
> 
>sudo ./no-executor-framework --master=master@127.0.0.1:5050 
> --command="echo hello"
> 
> 
> 5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
> error 403: Forbidden
> 
> 6. Changed ACL to:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "ANY" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   }
> 
> 
> 7. Ran slave and framework again.
> 
> 8. Output:
> 
> 
> 
> [{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
>  Executor (Task: 699) (Command: sh -c 'echo 
> hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-25 Thread Abhishek Dasgupta

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

(Updated May 25, 2016, 4:27 p.m.)


Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, Benjamin 
Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.


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


Repository: mesos


Description (updated)
---

The master and agent code for routing endpoints are made
consistent. Now they both capture 'this' variable in the
lambda calls in routing function arguments. Continuations
are no more need to be static.


Diffs
-

  src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
  src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
  src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 

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


Testing
---

Unit tests.

On ubuntu 16.04:
sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check

Manual testing.

1. Ran master with:


   sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos


2. ACL File:


  {
"get_endpoints": [
  {
"principals": { "type": "NONE" },
"paths": { "values": ["/flags", "/monitor/statistics", "/containers"] }
  }
]
  } 


3. Ran slave with:


   sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
--acls=file:///home/abhishek/testAcl


4. Ran toy-framework with:


   sudo ./no-executor-framework --master=master@127.0.0.1:5050 --command="echo 
hello"


5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
error 403: Forbidden

6. Changed ACL to:


  {
"get_endpoints": [
  {
"principals": { "type": "ANY" },
"paths": { "values": ["/flags", "/monitor/statistics", "/containers"] }
  }
]
  }


7. Ran slave and framework again.

8. Output:



[{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
 Executor (Task: 699) (Command: sh -c 'echo 
hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...


Thanks,

Abhishek Dasgupta



Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-25 Thread Abhishek Dasgupta

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

(Updated May 25, 2016, 4:26 p.m.)


Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, Benjamin 
Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.


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


Repository: mesos


Description (updated)
---

Removed inconsistancy from routing endpoints in agent code.


Diffs (updated)
-

  src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
  src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
  src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 

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


Testing
---

Unit tests.

On ubuntu 16.04:
sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check

Manual testing.

1. Ran master with:


   sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos


2. ACL File:


  {
"get_endpoints": [
  {
"principals": { "type": "NONE" },
"paths": { "values": ["/flags", "/monitor/statistics", "/containers"] }
  }
]
  } 


3. Ran slave with:


   sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
--acls=file:///home/abhishek/testAcl


4. Ran toy-framework with:


   sudo ./no-executor-framework --master=master@127.0.0.1:5050 --command="echo 
hello"


5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
error 403: Forbidden

6. Changed ACL to:


  {
"get_endpoints": [
  {
"principals": { "type": "ANY" },
"paths": { "values": ["/flags", "/monitor/statistics", "/containers"] }
  }
]
  }


7. Ran slave and framework again.

8. Output:



[{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
 Executor (Task: 699) (Command: sh -c 'echo 
hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...


Thanks,

Abhishek Dasgupta



Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-25 Thread Benjamin Bannier


> On May 25, 2016, 11:45 a.m., Benjamin Bannier wrote:
> > src/slave/http.cpp, line 379
> > 
> >
> > Why was this needed? IMHO the existing explicitness helps to document 
> > what state we drag into the lambdas and should be kept.
> > 
> > Here and below.
> 
> Abhishek Dasgupta wrote:
> Hmmm...in master code, there is [=] in some places. That's why 
> implemented same logic here...else I have to send  [this, requst, slaveFlags] 
> here. Maybe, we need to use specific captures in master also.

We do not seem to have a strong, explicit rule regarding capture list, but 
generally prefer being explicit. Let's just leave it here like it was.


- Benjamin


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


On May 25, 2016, 11:23 a.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47822/
> ---
> 
> (Updated May 25, 2016, 11:23 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, 
> Benjamin Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-5293
> https://issues.apache.org/jira/browse/MESOS-5293
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The master and agent code for routing endpoints are made
> consistent. Now they both capture 'this' variable in the
> lambda calls in routing function arguments. Continuations
> are no more need to be static.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
>   src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
>   src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 
> 
> Diff: https://reviews.apache.org/r/47822/diff/
> 
> 
> Testing
> ---
> 
> Unit tests.
> 
> On ubuntu 16.04:
> sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check
> 
> Manual testing.
> 
> 1. Ran master with:
> 
> 
>sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
> 
> 
> 2. ACL File:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "NONE" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   } 
> 
> 
> 3. Ran slave with:
> 
> 
>sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
> --acls=file:///home/abhishek/testAcl
> 
> 
> 4. Ran toy-framework with:
> 
> 
>sudo ./no-executor-framework --master=master@127.0.0.1:5050 
> --command="echo hello"
> 
> 
> 5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
> error 403: Forbidden
> 
> 6. Changed ACL to:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "ANY" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   }
> 
> 
> 7. Ran slave and framework again.
> 
> 8. Output:
> 
> 
> 
> [{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
>  Executor (Task: 699) (Command: sh -c 'echo 
> hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-25 Thread Jan Schlicht


> On May 25, 2016, 11:45 a.m., Jan Schlicht wrote:
> > src/slave/http.cpp, line 651
> > 
> >
> > Remove this, same rationale as the comments in `Slave::Http::flags`.
> 
> Abhishek Dasgupta wrote:
> One thing I want to be sure here: "pid" is getting called multiple times 
> in subsequent "defers" in same function. Should not we better save it once 
> and use that in the rest of the calls in same functions? What do you say?

Buy you won't gain anything from using `pid` instead of `slave->self()`; the 
PID won't change during the lifetime of `slave`. Other "defer chains" also use 
`self()`, let's keep it consistent.


- Jan


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


On May 25, 2016, 11:23 a.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47822/
> ---
> 
> (Updated May 25, 2016, 11:23 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, 
> Benjamin Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-5293
> https://issues.apache.org/jira/browse/MESOS-5293
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The master and agent code for routing endpoints are made
> consistent. Now they both capture 'this' variable in the
> lambda calls in routing function arguments. Continuations
> are no more need to be static.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
>   src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
>   src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 
> 
> Diff: https://reviews.apache.org/r/47822/diff/
> 
> 
> Testing
> ---
> 
> Unit tests.
> 
> On ubuntu 16.04:
> sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check
> 
> Manual testing.
> 
> 1. Ran master with:
> 
> 
>sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
> 
> 
> 2. ACL File:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "NONE" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   } 
> 
> 
> 3. Ran slave with:
> 
> 
>sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
> --acls=file:///home/abhishek/testAcl
> 
> 
> 4. Ran toy-framework with:
> 
> 
>sudo ./no-executor-framework --master=master@127.0.0.1:5050 
> --command="echo hello"
> 
> 
> 5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
> error 403: Forbidden
> 
> 6. Changed ACL to:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "ANY" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   }
> 
> 
> 7. Ran slave and framework again.
> 
> 8. Output:
> 
> 
> 
> [{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
>  Executor (Task: 699) (Command: sh -c 'echo 
> hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-25 Thread Abhishek Dasgupta


> On May 25, 2016, 9:45 a.m., Benjamin Bannier wrote:
> > src/slave/http.cpp, line 379
> > 
> >
> > Why was this needed? IMHO the existing explicitness helps to document 
> > what state we drag into the lambdas and should be kept.
> > 
> > Here and below.

Hmmm...in master code, there is [=] in some places. That's why implemented same 
logic here...else I have to send  [this, requst, slaveFlags] here. Maybe, we 
need to use specific captures in master also.


- Abhishek


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


On May 25, 2016, 9:23 a.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47822/
> ---
> 
> (Updated May 25, 2016, 9:23 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, 
> Benjamin Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-5293
> https://issues.apache.org/jira/browse/MESOS-5293
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The master and agent code for routing endpoints are made
> consistent. Now they both capture 'this' variable in the
> lambda calls in routing function arguments. Continuations
> are no more need to be static.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
>   src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
>   src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 
> 
> Diff: https://reviews.apache.org/r/47822/diff/
> 
> 
> Testing
> ---
> 
> Unit tests.
> 
> On ubuntu 16.04:
> sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check
> 
> Manual testing.
> 
> 1. Ran master with:
> 
> 
>sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
> 
> 
> 2. ACL File:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "NONE" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   } 
> 
> 
> 3. Ran slave with:
> 
> 
>sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
> --acls=file:///home/abhishek/testAcl
> 
> 
> 4. Ran toy-framework with:
> 
> 
>sudo ./no-executor-framework --master=master@127.0.0.1:5050 
> --command="echo hello"
> 
> 
> 5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
> error 403: Forbidden
> 
> 6. Changed ACL to:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "ANY" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   }
> 
> 
> 7. Ran slave and framework again.
> 
> 8. Output:
> 
> 
> 
> [{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
>  Executor (Task: 699) (Command: sh -c 'echo 
> hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-25 Thread Abhishek Dasgupta


> On May 25, 2016, 9:45 a.m., Jan Schlicht wrote:
> > src/slave/http.cpp, line 651
> > 
> >
> > Remove this, same rationale as the comments in `Slave::Http::flags`.

One thing I want to be sure here: "pid" is getting called multiple times in 
subsequent "defers" in same function. Should not we better save it once and use 
that in the rest of the calls in same functions? What do you say?


- Abhishek


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


On May 25, 2016, 9:23 a.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47822/
> ---
> 
> (Updated May 25, 2016, 9:23 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, 
> Benjamin Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-5293
> https://issues.apache.org/jira/browse/MESOS-5293
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The master and agent code for routing endpoints are made
> consistent. Now they both capture 'this' variable in the
> lambda calls in routing function arguments. Continuations
> are no more need to be static.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
>   src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
>   src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 
> 
> Diff: https://reviews.apache.org/r/47822/diff/
> 
> 
> Testing
> ---
> 
> Unit tests.
> 
> On ubuntu 16.04:
> sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check
> 
> Manual testing.
> 
> 1. Ran master with:
> 
> 
>sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
> 
> 
> 2. ACL File:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "NONE" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   } 
> 
> 
> 3. Ran slave with:
> 
> 
>sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
> --acls=file:///home/abhishek/testAcl
> 
> 
> 4. Ran toy-framework with:
> 
> 
>sudo ./no-executor-framework --master=master@127.0.0.1:5050 
> --command="echo hello"
> 
> 
> 5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
> error 403: Forbidden
> 
> 6. Changed ACL to:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "ANY" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   }
> 
> 
> 7. Ran slave and framework again.
> 
> 8. Output:
> 
> 
> 
> [{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
>  Executor (Task: 699) (Command: sh -c 'echo 
> hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-25 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [47822]

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

- Mesos ReviewBot


On May 25, 2016, 9:23 a.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47822/
> ---
> 
> (Updated May 25, 2016, 9:23 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, 
> Benjamin Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-5293
> https://issues.apache.org/jira/browse/MESOS-5293
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The master and agent code for routing endpoints are made
> consistent. Now they both capture 'this' variable in the
> lambda calls in routing function arguments. Continuations
> are no more need to be static.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
>   src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
>   src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 
> 
> Diff: https://reviews.apache.org/r/47822/diff/
> 
> 
> Testing
> ---
> 
> Unit tests.
> 
> On ubuntu 16.04:
> sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check
> 
> Manual testing.
> 
> 1. Ran master with:
> 
> 
>sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
> 
> 
> 2. ACL File:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "NONE" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   } 
> 
> 
> 3. Ran slave with:
> 
> 
>sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
> --acls=file:///home/abhishek/testAcl
> 
> 
> 4. Ran toy-framework with:
> 
> 
>sudo ./no-executor-framework --master=master@127.0.0.1:5050 
> --command="echo hello"
> 
> 
> 5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
> error 403: Forbidden
> 
> 6. Changed ACL to:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "ANY" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   }
> 
> 
> 7. Ran slave and framework again.
> 
> 8. Output:
> 
> 
> 
> [{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
>  Executor (Task: 699) (Command: sh -c 'echo 
> hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-25 Thread Benjamin Bannier

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



LGTM. I left a few comments.


src/slave/http.cpp (line 379)


Why was this needed? IMHO the existing explicitness helps to document what 
state we drag into the lambdas and should be kept.

Here and below.



src/slave/slave.hpp (line 555)


Making this a `const` member would make the lifetimes of agent and `http` 
clearer.


- Benjamin Bannier


On May 25, 2016, 11:23 a.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47822/
> ---
> 
> (Updated May 25, 2016, 11:23 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, 
> Benjamin Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-5293
> https://issues.apache.org/jira/browse/MESOS-5293
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The master and agent code for routing endpoints are made
> consistent. Now they both capture 'this' variable in the
> lambda calls in routing function arguments. Continuations
> are no more need to be static.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
>   src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
>   src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 
> 
> Diff: https://reviews.apache.org/r/47822/diff/
> 
> 
> Testing
> ---
> 
> Unit tests.
> 
> On ubuntu 16.04:
> sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check
> 
> Manual testing.
> 
> 1. Ran master with:
> 
> 
>sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
> 
> 
> 2. ACL File:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "NONE" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   } 
> 
> 
> 3. Ran slave with:
> 
> 
>sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
> --acls=file:///home/abhishek/testAcl
> 
> 
> 4. Ran toy-framework with:
> 
> 
>sudo ./no-executor-framework --master=master@127.0.0.1:5050 
> --command="echo hello"
> 
> 
> 5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
> error 403: Forbidden
> 
> 6. Changed ACL to:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "ANY" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   }
> 
> 
> 7. Ran slave and framework again.
> 
> 8. Output:
> 
> 
> 
> [{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
>  Executor (Task: 699) (Command: sh -c 'echo 
> hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-25 Thread Jan Schlicht

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



Thanks for taking this on!
Please keep in mind that to work around the inconsistency, we created local 
copies or references of member variables of `this`. With that we were able to 
use it in the lambda and/or the (static) continuation. With the inconsistency 
gone, we're able to access `this` in the lambda/continuation, meaning that the 
local copies are now obsolete. Please remove them from the existing code.


src/slave/http.cpp (line 369)


There's no need for this here anymore, because it was necessary due to the 
inconsistent behavior you're fixing. You can now use `slave->flags` directly in 
the lambda.



src/slave/http.cpp (line 384)


s/slaveFlags/slave->flags/, see comment above.



src/slave/http.cpp (line 651)


Remove this, same rationale as the comments in `Slave::Http::flags`.



src/slave/http.cpp (line 661)


Same as in `Slave::Http::flags`: s/pid/slave->self()/ and use members of 
`this` directly.



src/slave/http.cpp (lines 668 - 669)


s/pid/slave->self()/



src/slave/http.cpp (line 769)


Can also be removed.



src/slave/http.cpp (lines 771 - 773)


Remove this.



src/slave/http.cpp (line 777)


s/pid/slave->self()/



src/slave/http.cpp (line 783)


s/localSlave/slave/


- Jan Schlicht


On May 25, 2016, 11:23 a.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47822/
> ---
> 
> (Updated May 25, 2016, 11:23 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, 
> Benjamin Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-5293
> https://issues.apache.org/jira/browse/MESOS-5293
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The master and agent code for routing endpoints are made
> consistent. Now they both capture 'this' variable in the
> lambda calls in routing function arguments. Continuations
> are no more need to be static.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
>   src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
>   src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 
> 
> Diff: https://reviews.apache.org/r/47822/diff/
> 
> 
> Testing
> ---
> 
> Unit tests.
> 
> On ubuntu 16.04:
> sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check
> 
> Manual testing.
> 
> 1. Ran master with:
> 
> 
>sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
> 
> 
> 2. ACL File:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "NONE" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   } 
> 
> 
> 3. Ran slave with:
> 
> 
>sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
> --acls=file:///home/abhishek/testAcl
> 
> 
> 4. Ran toy-framework with:
> 
> 
>sudo ./no-executor-framework --master=master@127.0.0.1:5050 
> --command="echo hello"
> 
> 
> 5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
> error 403: Forbidden
> 
> 6. Changed ACL to:
> 
> 
>   {
> "get_endpoints": [
>   {
> "principals": { "type": "ANY" },
> "paths": { "values": ["/flags", "/monitor/statistics", "/containers"] 
> }
>   }
> ]
>   }
> 
> 
> 7. Ran slave and framework again.
> 
> 8. Output:
> 
> 
> 
> [{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
>  Executor (Task: 699) (Command: sh -c 'echo 
> hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Review Request 47822: Removed inconsistancy from routing endpoints in agent code.

2016-05-25 Thread Abhishek Dasgupta

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

Review request for mesos, Adam B, Alexander Rukletsov, Anand Mazumdar, Benjamin 
Bannier, Greg Mann, Jan Schlicht, Till Toenshoff, and Vinod Kone.


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


Repository: mesos


Description
---

The master and agent code for routing endpoints are made
consistent. Now they both capture 'this' variable in the
lambda calls in routing function arguments. Continuations
are no more need to be static.


Diffs
-

  src/slave/http.cpp dd1f509e9464af7d02db0182b0eebd63993dd029 
  src/slave/slave.hpp 0de6a570e8b4699771048295ec3fcedf84593495 
  src/slave/slave.cpp 2941cf1b6ea1e4deabfcbbe3f4897c06a28531a5 

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


Testing
---

Unit tests.

On ubuntu 16.04:
sudo GTEST_FILTER="*SlaveEndpointTest*.*" make -j2 check

Manual testing.

1. Ran master with:


   sudo  ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos


2. ACL File:


  {
"get_endpoints": [
  {
"principals": { "type": "NONE" },
"paths": { "values": ["/flags", "/monitor/statistics", "/containers"] }
  }
]
  } 


3. Ran slave with:


   sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --ip=0.0.0.0 
--acls=file:///home/abhishek/testAcl


4. Ran toy-framework with:


   sudo ./no-executor-framework --master=master@127.0.0.1:5050 --command="echo 
hello"


5. Output while hitting "http://127.0.0.1:5051/slave(1)/containers" - HTTP 
error 403: Forbidden

6. Changed ACL to:


  {
"get_endpoints": [
  {
"principals": { "type": "ANY" },
"paths": { "values": ["/flags", "/monitor/statistics", "/containers"] }
  }
]
  }


7. Ran slave and framework again.

8. Output:



[{"container_id":"2059c6a5-d168-4db7-912d-1c70b61fdb5d","executor_id":"699","executor_name":"Command
 Executor (Task: 699) (Command: sh -c 'echo 
hello')","framework_id":"48e2fe51-afba-44c5-958e-0ad3cee6454b-","source":"699","statistics":{"cpus_limit":0.2,"cpus_system_time_secs":0.01,"cpus_user_time_secs":0.04,"mem_limit_bytes":67108864,"mem_rss_bytes":88477696,"timestamp":1464168040.50791},"status":{}},{"container_id":"a0be0340-ca6b-4fc4-9862-4af143a7961e",...


Thanks,

Abhishek Dasgupta