Re: Review Request 51869: Export "reserved_resources" in the agent HTTP endpoint.

2016-09-19 Thread Jiang Yan Xu


> On Sept. 18, 2016, 6:51 a.m., haosdent huang wrote:
> > It would be better that we add this in the new operator api as well. Should 
> > I create a ticket at https://issues.apache.org/jira/browse/MESOS-6007 ?
> 
> Jiang Yan Xu wrote:
> We should (my comment above). I'll take care of it.

Added MESOS-6211.


- Jiang Yan


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


On Sept. 16, 2016, 11:24 a.m., Jiang Yan Xu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51869/
> ---
> 
> (Updated Sept. 16, 2016, 11:24 a.m.)
> 
> 
> Review request for mesos, Anindya Sinha and Neil Conway.
> 
> 
> Bugs: MESOS-6085
> https://issues.apache.org/jira/browse/MESOS-6085
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Also the 'resource' field now exposes the total resources, which is
> consistent with the same field in the master's /slaves endpoint.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp 67463105d7fa38b2158a64f6994e3dd353a9fcc7 
>   src/slave/slave.cpp 7f99e4610d06ebadbef48ce314fec6ad04acb307 
> 
> Diff: https://reviews.apache.org/r/51869/diff/
> 
> 
> Testing
> ---
> 
> make check. A new test is added in https://reviews.apache.org/r/51870/.
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>



Re: Review Request 51869: Export "reserved_resources" in the agent HTTP endpoint.

2016-09-19 Thread Jiang Yan Xu


> On Sept. 18, 2016, 6:51 a.m., haosdent huang wrote:
> > It would be better that we add this in the new operator api as well. Should 
> > I create a ticket at https://issues.apache.org/jira/browse/MESOS-6007 ?

We should (my comment above). I'll take care of it.


- Jiang Yan


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


On Sept. 16, 2016, 11:24 a.m., Jiang Yan Xu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51869/
> ---
> 
> (Updated Sept. 16, 2016, 11:24 a.m.)
> 
> 
> Review request for mesos, Anindya Sinha and Neil Conway.
> 
> 
> Bugs: MESOS-6085
> https://issues.apache.org/jira/browse/MESOS-6085
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Also the 'resource' field now exposes the total resources, which is
> consistent with the same field in the master's /slaves endpoint.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp 67463105d7fa38b2158a64f6994e3dd353a9fcc7 
>   src/slave/slave.cpp 7f99e4610d06ebadbef48ce314fec6ad04acb307 
> 
> Diff: https://reviews.apache.org/r/51869/diff/
> 
> 
> Testing
> ---
> 
> make check. A new test is added in https://reviews.apache.org/r/51870/.
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>



Re: Review Request 51869: Export "reserved_resources" in the agent HTTP endpoint.

2016-09-18 Thread haosdent huang

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



It would be better that we add this in the new operator api as well. Should I 
create a ticket at https://issues.apache.org/jira/browse/MESOS-6007 ?

- haosdent huang


On Sept. 16, 2016, 6:24 p.m., Jiang Yan Xu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51869/
> ---
> 
> (Updated Sept. 16, 2016, 6:24 p.m.)
> 
> 
> Review request for mesos, Anindya Sinha and Neil Conway.
> 
> 
> Bugs: MESOS-6085
> https://issues.apache.org/jira/browse/MESOS-6085
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Also the 'resource' field now exposes the total resources, which is
> consistent with the same field in the master's /slaves endpoint.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp 67463105d7fa38b2158a64f6994e3dd353a9fcc7 
>   src/slave/slave.cpp 7f99e4610d06ebadbef48ce314fec6ad04acb307 
> 
> Diff: https://reviews.apache.org/r/51869/diff/
> 
> 
> Testing
> ---
> 
> make check. A new test is added in https://reviews.apache.org/r/51870/.
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>



Re: Review Request 51869: Export "reserved_resources" in the agent HTTP endpoint.

2016-09-17 Thread Anindya Sinha

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


Ship it!




Ship It!

- Anindya Sinha


On Sept. 16, 2016, 6:24 p.m., Jiang Yan Xu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51869/
> ---
> 
> (Updated Sept. 16, 2016, 6:24 p.m.)
> 
> 
> Review request for mesos, Anindya Sinha and Neil Conway.
> 
> 
> Bugs: MESOS-6085
> https://issues.apache.org/jira/browse/MESOS-6085
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Also the 'resource' field now exposes the total resources, which is
> consistent with the same field in the master's /slaves endpoint.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp 67463105d7fa38b2158a64f6994e3dd353a9fcc7 
>   src/slave/slave.cpp 7f99e4610d06ebadbef48ce314fec6ad04acb307 
> 
> Diff: https://reviews.apache.org/r/51869/diff/
> 
> 
> Testing
> ---
> 
> make check. A new test is added in https://reviews.apache.org/r/51870/.
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>



Re: Review Request 51869: Export "reserved_resources" in the agent HTTP endpoint.

2016-09-16 Thread Jiang Yan Xu

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

(Updated Sept. 16, 2016, 11:24 a.m.)


Review request for mesos, Anindya Sinha and Neil Conway.


Changes
---

Fixed a bug that left totalResources uninitalized before recovery is finished.


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


Repository: mesos


Description
---

Also the 'resource' field now exposes the total resources, which is
consistent with the same field in the master's /slaves endpoint.


Diffs (updated)
-

  src/slave/http.cpp 67463105d7fa38b2158a64f6994e3dd353a9fcc7 
  src/slave/slave.cpp 7f99e4610d06ebadbef48ce314fec6ad04acb307 

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


Testing
---

make check. A new test is added in https://reviews.apache.org/r/51870/.


Thanks,

Jiang Yan Xu



Re: Review Request 51869: Export "reserved_resources" in the agent HTTP endpoint.

2016-09-16 Thread Jiang Yan Xu


> On Sept. 14, 2016, 5:10 p.m., Anindya Sinha wrote:
> > src/slave/http.cpp, line 986
> > 
> >
> > Add this new field `reserved_resources` in `string 
> > Slave::Http::STATE_HELP()`.

Should we punt on this until MESOS-3568 is addressed?


> On Sept. 14, 2016, 5:10 p.m., Anindya Sinha wrote:
> > src/slave/http.cpp, line 987
> > 
> >
> > Add this new field `unreserved_resources` in `string 
> > Slave::Http::STATE_HELP()`.

Should we punt on this until MESOS-3568 is addressed?


> On Sept. 14, 2016, 5:10 p.m., Anindya Sinha wrote:
> > src/slave/http.cpp, line 985
> > 
> >
> > Maybe good to add a comment and/or document regarding what the field 
> > `resources` contains... since it changed from `info.resources()` to 
> > `info.resources() + checkointed resources applied`.

The comment on the `slave->totalResources` is clear so I'd expect it should be 
obvious to the reader of the code (to at least look it up, for this field and 
other fields that get written to the output in this method).

As to the change from `info.resources()` to `totalResources` yeah it's worth 
documenting in the CHANGLOG (which I'll do) but I guess more importantly we 
should probably add the reservation information to the (more formally defined) 
operator API where they should be documented. I'll look into that as well.


- Jiang Yan


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


On Sept. 14, 2016, 11:21 a.m., Jiang Yan Xu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51869/
> ---
> 
> (Updated Sept. 14, 2016, 11:21 a.m.)
> 
> 
> Review request for mesos, Anindya Sinha and Neil Conway.
> 
> 
> Bugs: MESOS-6085
> https://issues.apache.org/jira/browse/MESOS-6085
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Also the 'resource' field now exposes the total resources, which is
> consistent with the same field in the master's /slaves endpoint.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp 67463105d7fa38b2158a64f6994e3dd353a9fcc7 
> 
> Diff: https://reviews.apache.org/r/51869/diff/
> 
> 
> Testing
> ---
> 
> make check. A new test is added in https://reviews.apache.org/r/51870/.
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>



Re: Review Request 51869: Export "reserved_resources" in the agent HTTP endpoint.

2016-09-14 Thread Anindya Sinha


> On Sept. 15, 2016, 12:10 a.m., Anindya Sinha wrote:
> >

Small type in description:
s/resource/resources


- Anindya


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


On Sept. 14, 2016, 6:21 p.m., Jiang Yan Xu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51869/
> ---
> 
> (Updated Sept. 14, 2016, 6:21 p.m.)
> 
> 
> Review request for mesos, Anindya Sinha and Neil Conway.
> 
> 
> Bugs: MESOS-6085
> https://issues.apache.org/jira/browse/MESOS-6085
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Also the 'resource' field now exposes the total resources, which is
> consistent with the same field in the master's /slaves endpoint.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp 67463105d7fa38b2158a64f6994e3dd353a9fcc7 
> 
> Diff: https://reviews.apache.org/r/51869/diff/
> 
> 
> Testing
> ---
> 
> make check. A new test is added in https://reviews.apache.org/r/51870/.
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>



Re: Review Request 51869: Export "reserved_resources" in the agent HTTP endpoint.

2016-09-14 Thread Anindya Sinha

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




src/slave/http.cpp (line 985)


Maybe good to add a comment and/or document regarding what the field 
`resources` contains... since it changed from `info.resources()` to 
`info.resources() + checkointed resources applied`.



src/slave/http.cpp (line 986)


Add this new field `reserved_resources` in `string 
Slave::Http::STATE_HELP()`.



src/slave/http.cpp (line 987)


Add this new field `unreserved_resources` in `string 
Slave::Http::STATE_HELP()`.


- Anindya Sinha


On Sept. 14, 2016, 6:21 p.m., Jiang Yan Xu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51869/
> ---
> 
> (Updated Sept. 14, 2016, 6:21 p.m.)
> 
> 
> Review request for mesos, Anindya Sinha and Neil Conway.
> 
> 
> Bugs: MESOS-6085
> https://issues.apache.org/jira/browse/MESOS-6085
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Also the 'resource' field now exposes the total resources, which is
> consistent with the same field in the master's /slaves endpoint.
> 
> 
> Diffs
> -
> 
>   src/slave/http.cpp 67463105d7fa38b2158a64f6994e3dd353a9fcc7 
> 
> Diff: https://reviews.apache.org/r/51869/diff/
> 
> 
> Testing
> ---
> 
> make check. A new test is added in https://reviews.apache.org/r/51870/.
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>



Review Request 51869: Export "reserved_resources" in the agent HTTP endpoint.

2016-09-14 Thread Jiang Yan Xu

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

Review request for mesos, Anindya Sinha and Neil Conway.


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


Repository: mesos


Description
---

Also the 'resource' field now exposes the total resources, which is
consistent with the same field in the master's /slaves endpoint.


Diffs
-

  src/slave/http.cpp 67463105d7fa38b2158a64f6994e3dd353a9fcc7 

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


Testing
---

make check. A new test is added in https://reviews.apache.org/r/51870/.


Thanks,

Jiang Yan Xu