mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
ceph-volume: when all devices are filtered exit gracefully
Even if all devices are filtered we want to return a 0 exit code and make sure the json reporting still works. Signed-off-by: Andrew Schoen <aschoen@redhat.com>
This commit is contained in:
parent
fc9a10e548
commit
aa4fcd602f
@ -21,8 +21,11 @@ class SingleType(object):
|
||||
self.hdds = [device for device in devices if device.sys_api['rotational'] == '1']
|
||||
self.ssds = [device for device in devices if device.sys_api['rotational'] == '0']
|
||||
self.computed = {'osds': [], 'vgs': [], 'filtered_devices': args.filtered_devices}
|
||||
self.validate()
|
||||
self.compute()
|
||||
if self.devices:
|
||||
self.validate()
|
||||
self.compute()
|
||||
else:
|
||||
self.computed["changed"] = False
|
||||
|
||||
@staticmethod
|
||||
def type():
|
||||
@ -147,8 +150,11 @@ class MixedType(object):
|
||||
self.block_db_size = self.get_block_size()
|
||||
self.system_vgs = lvm.VolumeGroups()
|
||||
self.dbs_needed = len(self.hdds) * self.osds_per_device
|
||||
self.validate()
|
||||
self.compute()
|
||||
if self.devices:
|
||||
self.validate()
|
||||
self.compute()
|
||||
else:
|
||||
self.computed["changed"] = False
|
||||
|
||||
@staticmethod
|
||||
def type():
|
||||
|
@ -33,8 +33,11 @@ class SingleType(object):
|
||||
self.ssds = [device for device in devices if device.sys_api['rotational'] == '0']
|
||||
self.computed = {'osds': [], 'vgs': [], 'filtered_devices': args.filtered_devices}
|
||||
self.journal_size = get_journal_size(args)
|
||||
self.validate()
|
||||
self.compute()
|
||||
if self.devices:
|
||||
self.validate()
|
||||
self.compute()
|
||||
else:
|
||||
self.computed["changed"] = False
|
||||
|
||||
@staticmethod
|
||||
def type():
|
||||
@ -189,8 +192,11 @@ class MixedType(object):
|
||||
self.journals_needed = len(self.hdds) * self.osds_per_device
|
||||
self.journal_size = get_journal_size(args)
|
||||
self.system_vgs = lvm.VolumeGroups()
|
||||
self.validate()
|
||||
self.compute()
|
||||
if self.devices:
|
||||
self.validate()
|
||||
self.compute()
|
||||
else:
|
||||
self.computed["changed"] = False
|
||||
|
||||
@staticmethod
|
||||
def type():
|
||||
|
Loading…
Reference in New Issue
Block a user