scylla_setup: don't repeatedly select disks if it's assigned

Currently scylla_setup would be stuck to select disks in non-interaction mode.

Fixes #4370

Signed-off-by: Amos Kong <amos@scylladb.com>
Message-Id: <8fb445708a6ac0d2130f8a8d041b1d8d71f1cf14.1553745961.git.amos@scylladb.com>
This commit is contained in:
Amos Kong
2019-03-28 04:10:21 +00:00
committed by Avi Kivity
parent 65dd45d9cf
commit 98cb7d145b

View File

@@ -311,7 +311,7 @@ if __name__ == '__main__':
raid_setup = interactive_ask_service('Are you sure you want to setup RAID0 and XFS?', 'If you choose Yes, the selected drive will be reformated, erasing all existing data in the process.', raid_setup)
else:
raid_setup = False
if res and raid_setup:
if res and raid_setup and not disks:
devices = get_unused_disks()
if len(devices) == 0:
print('No free disks were detected, abort RAID/XFS setup. Disks must be unmounted before proceeding.\n')