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.sch...@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 
<stephen.tur...@citrix.com<mailto:stephen.tur...@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/>


Reply via email to