Disk resource management broken due to unit confusion

Bug #694905 reported by iain MacDonnell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Eucalyptus
Confirmed
Undecided
Dmitrii Zagorodnov

Bug Description

Disk resource management is broken because disk space is mostly measured in Gb, but a couple of places in the NC code measure it in Mb, and the two don't mix well.

The two places are:

1) When the instance filesystem is queried for available space, the result (in bytes) is divided by BYTES_PER_DISK_UNIT, which is erroneously set to 1048576 - should be 1073741824 - so the node controller reports 1024x as much disk as it really has.

2) in handlers_default, doDescribeResource() attempts to account for swap space, based on the #define'd SWAP_SIZE, which is 512 (Mb), but the code treats it as if it was measured in Gb, so each instance consumes 512Gb+ of disk resource!

Since the definition of SWAP_SIZE is a fixed 512Mb, and everything else is measured in Gb, I've further hacked my version to count 1Gb for swap when SWAP_SIZE is less than 1024Mb (always, for now...)

Revision history for this message
iain MacDonnell (dseven) wrote :
Daniel Nurmi (nurmi)
Changed in eucalyptus:
assignee: nobody → Dmitrii Zagorodnov (dmitrii)
Changed in eucalyptus:
status: New → Confirmed
Revision history for this message
Andy Grimm (agrimm) wrote :

This issue is now being tracked upstream at http://eucalyptus.atlassian.net/browse/EUCA-2750

Please watch that issue for further updates.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.