Currently add-osd tries to add disk one by one and the action execution returns failure on the first
error encountered without trying to add rest of the disks.
However it is desirable to add all the disks specified by user and returns the aggregated output for each disk in case of success and failure.
Little background:
sunbeam before adding disks to microceph wants to check if disk is already added. However this is not possible using output of list-disks action as user can specify /dev/sdb but the action output will print dev-by-id.
So this can be solved by running add-osd action and checking on error message if the disk already exists.
Description
Currently add-osd tries to add disk one by one and the action execution returns failure on the first error encountered without trying to add rest of the disks. However it is desirable to add all the disks specified by user and returns the aggregated output for each disk in case of success and failure.
Little background: sunbeam before adding disks to microceph wants to check if disk is already added. However this is not possible using output of
list-disks
action as user can specify/dev/sdb
but the action output will printdev-by-id
. So this can be solved by runningadd-osd
action and checking on error message if the disk already exists.Fixes # (issue) Relevant issue in snap-openstack https://bugs.launchpad.net/snap-openstack/+bug/2065649
This is considered as breaking change since the output of the action is changed.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Contributor's Checklist
Please check that you have: