Commit e7098533 authored by Helga Velroyen's avatar Helga Velroyen
Browse files

RPC: request spindle information properly



This patch fixes a problem with the RPC call 'node_info'.
Depending on the exclusive storage flag, we need to add
a storage unit for physical volumes in order to obtain
storage space information for them.
Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 0e3f65d2
......@@ -700,8 +700,10 @@ def _AddExclusiveStorageFlagToLvmStorageUnits(storage_units, es_flag):
"""
result = []
for (storage_type, storage_key) in storage_units:
if storage_type in [constants.ST_LVM_VG, constants.ST_LVM_PV]:
if storage_type in [constants.ST_LVM_VG]:
result.append((storage_type, storage_key, [es_flag]))
if es_flag:
result.append((constants.ST_LVM_PV, storage_key, [es_flag]))
else:
result.append((storage_type, storage_key, []))
return result
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment