ceph-volume lvm batch should be idempotent
When passing devices to 'ceph-volume lvm batch' that are already used by an OSD ceph-volume should not error but return a -1 status code so that systems like ceph-ansible can know that no work was performed or error thrown.
#2 Updated by Alfredo Deza over 1 year ago
Some items to consider:
- `batch` can't know about changing device names (e.g. /dev/sda), so it has to check device metadata if at all
- it has to know if a device is stale (no systemd unit, or the mon reports it as not part of the cluster)
If the devices being passed in are in use, confirmed by monitors as part of the cluster, then they have to be excluded. If the group of devices gets reduced to an empty list from
filtering them out, then there is nothing to do, and reporting needs to be able to word that with the -1 return code.