You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Sam Schmit <sa...@appcore.com> on 2014/05/15 21:54:45 UTC

Review Request 21498: CLOUDSTACK-6009: listHosts API fixed to return all "memory" stats in Bytes instead of a mix of Bytes and Kilobytes

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

Review request for cloudstack.


Bugs: CLOUDSTACK-6009
    https://issues.apache.org/jira/browse/CLOUDSTACK-6009


Repository: cloudstack-git


Description
-------

CLOUDSTACK-6009: listHosts API call is returning memoryAvailable and memoryTotal in Bytes, and memoryUsed in Kilobytes. This fix changes the memoryUsed value to return in Bytes as well, and includes a new method to return memoryUsed in Kilobytes if needed.


Diffs
-----

  api/src/com/cloud/host/HostStats.java 4eb7b1a 
  core/src/com/cloud/agent/api/GetHostStatsAnswer.java 6a52e76 
  core/src/com/cloud/agent/api/HostStatsEntry.java c9d25a0 

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


Testing
-------

Pre-change:
1)  Called "listHosts" API call with no arguments.
2)  Validated that memoryAvailable and memoryTotal were in Bytes, while memoryUsed was in Kilobytes (factor of 1000 times smaller than it should be)

Post-change:
1)  Called "listHosts" API call with no arguments.
2)  Validated that memoryAvailable, memoryTotal, and memoryUsed are all in Bytes, and memoryAvailable + memoryUsed = memoryTotal


Thanks,

Sam Schmit


Re: Review Request 21498: CLOUDSTACK-6009: listHosts API fixed to return all "memory" stats in Bytes instead of a mix of Bytes and Kilobytes

Posted by Pierre-Luc Dion <pd...@apache.org>.

> On May 19, 2014, 10:42 a.m., Stephen Turner wrote:
> > Is it possible that someone is relying on the existing behaviour? I realise that you've made a new method to mimic the existing behaviour, but that will still break people's scripts unless they update them to call the new method. My bias tends to be to preserve the API until the next official revision, and work around the problem on the client side.

could we include this into 4.5? might also impact CLOUDSTACK-7583


- Pierre-Luc


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


On May 15, 2014, 7:54 p.m., Sam Schmit wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21498/
> -----------------------------------------------------------
> 
> (Updated May 15, 2014, 7:54 p.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Bugs: CLOUDSTACK-6009
>     https://issues.apache.org/jira/browse/CLOUDSTACK-6009
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> CLOUDSTACK-6009: listHosts API call is returning memoryAvailable and memoryTotal in Bytes, and memoryUsed in Kilobytes. This fix changes the memoryUsed value to return in Bytes as well, and includes a new method to return memoryUsed in Kilobytes if needed.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/host/HostStats.java 4eb7b1a 
>   core/src/com/cloud/agent/api/GetHostStatsAnswer.java 6a52e76 
>   core/src/com/cloud/agent/api/HostStatsEntry.java c9d25a0 
> 
> Diff: https://reviews.apache.org/r/21498/diff/
> 
> 
> Testing
> -------
> 
> Pre-change:
> 1)  Called "listHosts" API call with no arguments.
> 2)  Validated that memoryAvailable and memoryTotal were in Bytes, while memoryUsed was in Kilobytes (factor of 1000 times smaller than it should be)
> 
> Post-change:
> 1)  Called "listHosts" API call with no arguments.
> 2)  Validated that memoryAvailable, memoryTotal, and memoryUsed are all in Bytes, and memoryAvailable + memoryUsed = memoryTotal
> 
> 
> Thanks,
> 
> Sam Schmit
> 
>


Re: Review Request 21498: CLOUDSTACK-6009: listHosts API fixed to return all "memory" stats in Bytes instead of a mix of Bytes and Kilobytes

Posted by Daan Hoogland <da...@gmail.com>.
On Mon, May 19, 2014 at 4:36 PM, Stephen Turner
<St...@citrix.com> wrote:
> Well, I agree. I’m somewhat in two minds because I think it’s on the boundary between being a bug and just being a misdesigned feature. I’d be interested to know what other people think.
>
> --
> Stephen Turner
...
> From: Sam Schmit [mailto:sam.schmit@appcore.com]
...

> Stephen,
>
> It seems odd that incorrect behavior would be preserved, but I suppose I could understand that.

I think we should put it in
https://cwiki.apache.org/confluence/display/CLOUDSTACK/API+changes and
get working on 5.0 to be releases in September...?


-- 
Daan

RE: Review Request 21498: CLOUDSTACK-6009: listHosts API fixed to return all "memory" stats in Bytes instead of a mix of Bytes and Kilobytes

Posted by Stephen Turner <St...@citrix.com>.
Well, I agree. I’m somewhat in two minds because I think it’s on the boundary between being a bug and just being a misdesigned feature. I’d be interested to know what other people think.

--
Stephen Turner


From: Sam Schmit [mailto:sam.schmit@appcore.com]
Sent: 19 May 2014 15:32
To: Stephen Turner
Cc: cloudstack
Subject: Re: Review Request 21498: CLOUDSTACK-6009: listHosts API fixed to return all "memory" stats in Bytes instead of a mix of Bytes and Kilobytes

Stephen,

It seems odd that incorrect behavior would be preserved, but I suppose I could understand that.

Sam

On Mon, May 19, 2014 at 5:42 AM, Stephen Turner <st...@citrix.com>> wrote:
This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21498/



Is it possible that someone is relying on the existing behaviour? I realise that you've made a new method to mimic the existing behaviour, but that will still break people's scripts unless they update them to call the new method. My bias tends to be to preserve the API until the next official revision, and work around the problem on the client side.


- Stephen Turner


On May 15th, 2014, 7:54 p.m. UTC, Sam Schmit wrote:
Review request for cloudstack.
By Sam Schmit.

Updated May 15, 2014, 7:54 p.m.
Bugs: CLOUDSTACK-6009<https://issues.apache.org/jira/browse/CLOUDSTACK-6009>
Repository: cloudstack-git
Description

CLOUDSTACK-6009: listHosts API call is returning memoryAvailable and memoryTotal in Bytes, and memoryUsed in Kilobytes. This fix changes the memoryUsed value to return in Bytes as well, and includes a new method to return memoryUsed in Kilobytes if needed.


Testing

Pre-change:

1)  Called "listHosts" API call with no arguments.

2)  Validated that memoryAvailable and memoryTotal were in Bytes, while memoryUsed was in Kilobytes (factor of 1000 times smaller than it should be)



Post-change:

1)  Called "listHosts" API call with no arguments.

2)  Validated that memoryAvailable, memoryTotal, and memoryUsed are all in Bytes, and memoryAvailable + memoryUsed = memoryTotal


Diffs

  *   api/src/com/cloud/host/HostStats.java (4eb7b1a)
  *   core/src/com/cloud/agent/api/GetHostStatsAnswer.java (6a52e76)
  *   core/src/com/cloud/agent/api/HostStatsEntry.java (c9d25a0)

View Diff<https://reviews.apache.org/r/21498/diff/>



Re: Review Request 21498: CLOUDSTACK-6009: listHosts API fixed to return all "memory" stats in Bytes instead of a mix of Bytes and Kilobytes

Posted by Sam Schmit <sa...@appcore.com>.
Stephen,

It seems odd that incorrect behavior would be preserved, but I suppose I
could understand that.

Sam


On Mon, May 19, 2014 at 5:42 AM, Stephen Turner
<st...@citrix.com>wrote:

>    This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21498/
>
> Is it possible that someone is relying on the existing behaviour? I realise that you've made a new method to mimic the existing behaviour, but that will still break people's scripts unless they update them to call the new method. My bias tends to be to preserve the API until the next official revision, and work around the problem on the client side.
>
>
> - Stephen Turner
>
> On May 15th, 2014, 7:54 p.m. UTC, Sam Schmit wrote:
>   Review request for cloudstack.
> By Sam Schmit.
>
> *Updated May 15, 2014, 7:54 p.m.*
>  *Bugs: * CLOUDSTACK-6009<https://issues.apache.org/jira/browse/CLOUDSTACK-6009>
>  *Repository: * cloudstack-git
> Description
>
> CLOUDSTACK-6009: listHosts API call is returning memoryAvailable and memoryTotal in Bytes, and memoryUsed in Kilobytes. This fix changes the memoryUsed value to return in Bytes as well, and includes a new method to return memoryUsed in Kilobytes if needed.
>
>   Testing
>
> Pre-change:
> 1)  Called "listHosts" API call with no arguments.
> 2)  Validated that memoryAvailable and memoryTotal were in Bytes, while memoryUsed was in Kilobytes (factor of 1000 times smaller than it should be)
>
> Post-change:
> 1)  Called "listHosts" API call with no arguments.
> 2)  Validated that memoryAvailable, memoryTotal, and memoryUsed are all in Bytes, and memoryAvailable + memoryUsed = memoryTotal
>
>   Diffs
>
>    - api/src/com/cloud/host/HostStats.java (4eb7b1a)
>    - core/src/com/cloud/agent/api/GetHostStatsAnswer.java (6a52e76)
>    - core/src/com/cloud/agent/api/HostStatsEntry.java (c9d25a0)
>
> View Diff <https://reviews.apache.org/r/21498/diff/>
>

Re: Review Request 21498: CLOUDSTACK-6009: listHosts API fixed to return all "memory" stats in Bytes instead of a mix of Bytes and Kilobytes

Posted by Stephen Turner <st...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21498/#review43345
-----------------------------------------------------------


Is it possible that someone is relying on the existing behaviour? I realise that you've made a new method to mimic the existing behaviour, but that will still break people's scripts unless they update them to call the new method. My bias tends to be to preserve the API until the next official revision, and work around the problem on the client side.

- Stephen Turner


On May 15, 2014, 7:54 p.m., Sam Schmit wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21498/
> -----------------------------------------------------------
> 
> (Updated May 15, 2014, 7:54 p.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Bugs: CLOUDSTACK-6009
>     https://issues.apache.org/jira/browse/CLOUDSTACK-6009
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> CLOUDSTACK-6009: listHosts API call is returning memoryAvailable and memoryTotal in Bytes, and memoryUsed in Kilobytes. This fix changes the memoryUsed value to return in Bytes as well, and includes a new method to return memoryUsed in Kilobytes if needed.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/host/HostStats.java 4eb7b1a 
>   core/src/com/cloud/agent/api/GetHostStatsAnswer.java 6a52e76 
>   core/src/com/cloud/agent/api/HostStatsEntry.java c9d25a0 
> 
> Diff: https://reviews.apache.org/r/21498/diff/
> 
> 
> Testing
> -------
> 
> Pre-change:
> 1)  Called "listHosts" API call with no arguments.
> 2)  Validated that memoryAvailable and memoryTotal were in Bytes, while memoryUsed was in Kilobytes (factor of 1000 times smaller than it should be)
> 
> Post-change:
> 1)  Called "listHosts" API call with no arguments.
> 2)  Validated that memoryAvailable, memoryTotal, and memoryUsed are all in Bytes, and memoryAvailable + memoryUsed = memoryTotal
> 
> 
> Thanks,
> 
> Sam Schmit
> 
>


Re: Review Request 21498: CLOUDSTACK-6009: listHosts API fixed to return all "memory" stats in Bytes instead of a mix of Bytes and Kilobytes

Posted by Sebastien Goasguen <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21498/#review79008
-----------------------------------------------------------


Thank you for submitting your CloudStack contribution through review board. After discussion on the dev@cloudstack.apache.org the community decided to close down review board and start accepting contributiong through GitHub pull requests. We have been using GH PR for several months now and the process is better than review board.

We will keep Review Board open for another week to give you time to migrate your patch to a github PR if you wish. After that time, your patch will no longer be viewable (even though it will not be deleted).

Please consider submitting a pull request.

Great instructions are available at:
https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md

Thank you very much for your time and your contribution to Apache CloudStack, we hope that using this new process will encourage you to do more.

- Sebastien Goasguen


On May 15, 2014, 7:54 p.m., Sam Schmit wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21498/
> -----------------------------------------------------------
> 
> (Updated May 15, 2014, 7:54 p.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Bugs: CLOUDSTACK-6009
>     https://issues.apache.org/jira/browse/CLOUDSTACK-6009
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> CLOUDSTACK-6009: listHosts API call is returning memoryAvailable and memoryTotal in Bytes, and memoryUsed in Kilobytes. This fix changes the memoryUsed value to return in Bytes as well, and includes a new method to return memoryUsed in Kilobytes if needed.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/host/HostStats.java 4eb7b1a 
>   core/src/com/cloud/agent/api/GetHostStatsAnswer.java 6a52e76 
>   core/src/com/cloud/agent/api/HostStatsEntry.java c9d25a0 
> 
> Diff: https://reviews.apache.org/r/21498/diff/
> 
> 
> Testing
> -------
> 
> Pre-change:
> 1)  Called "listHosts" API call with no arguments.
> 2)  Validated that memoryAvailable and memoryTotal were in Bytes, while memoryUsed was in Kilobytes (factor of 1000 times smaller than it should be)
> 
> Post-change:
> 1)  Called "listHosts" API call with no arguments.
> 2)  Validated that memoryAvailable, memoryTotal, and memoryUsed are all in Bytes, and memoryAvailable + memoryUsed = memoryTotal
> 
> 
> Thanks,
> 
> Sam Schmit
> 
>