[blivet:rhel7/master] Remove sibling physical and logical volume actions (#1043763)
David Lehman
dlehman at redhat.com
Thu Feb 20 14:51:17 UTC 2014
On Thu, 2014-02-20 at 08:19 -0500, mulhern wrote:
> Related: rhbz#1043763
>
> If a disk with a physical volume belonging to volume group A is hidden,
> then the actions associated with the other logical volumes and physical
> volumes belonging to volume group A are removed.
> ---
> blivet/devicetree.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/blivet/devicetree.py b/blivet/devicetree.py
> index 8a79f14..099770a 100644
> --- a/blivet/devicetree.py
> +++ b/blivet/devicetree.py
> @@ -1803,7 +1803,9 @@ class DeviceTree(object):
> device.id))
>
> for action in reversed(self._actions):
> - if not action.device.dependsOn(device) and action.device != device:
> + if not (action.device.dependsOn(device) or \
> + isinstance(device, LVMVolumeGroupDevice) and (action.device in device.pvs or action.device in device.lvs) or \
It would improve clarity if you enclosed the above line in parentheses.
Otherwise it looks okay to me.
> + action.device == device):
> continue
>
> log.debug("cancelling action: %s" % action)
More information about the anaconda-patches
mailing list