Skip to content

Commit

Permalink
Do not allow removing members from existing pools in safe mode
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechtrefny committed Jun 22, 2022
1 parent df05f06 commit 63eb18c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/blivet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,11 @@ def _manage_members(self):
if not (add_disks or remove_disks):
return

if remove_disks and safe_mode:
raise BlivetAnsibleError("cannot remove members '%s' from pool '%s' in safe mode" %
(", ".join(d.name for d in remove_disks),
self._device.name))

if self._is_raid:
raise BlivetAnsibleError("managing pool members is not supported with RAID")

Expand Down

0 comments on commit 63eb18c

Please sign in to comment.