[PATCH] Remove all dependent devices of san device becoming multipath (#1058939)

Vratislav Podzimek vpodzime at redhat.com
Thu Jan 30 11:02:46 UTC 2014


On Thu, 2014-01-30 at 12:01 +0100, Vratislav Podzimek wrote:
> On Thu, 2014-01-30 at 11:27 +0100, Radek Vykydal wrote:
> > Also change the format to multipath after the devices are removed,
> > not before.
> > This should fix also bug #1058681.
> > 
> > I am starting to wonder whether we can really manage populate after adding
> > new san device (iSCSI, FCoE, zFCP) in GUI making a device already in tree
> > multipath member - without resetting storage.
> > 
> > Resolves: rhbz#1058939
> > ---
> >  blivet/devicetree.py | 15 +++++++++++++--
> >  1 file changed, 13 insertions(+), 2 deletions(-)
> > 
> > diff --git a/blivet/devicetree.py b/blivet/devicetree.py
> > index 5f7832b..8a79f14 100644
> > --- a/blivet/devicetree.py
> > +++ b/blivet/devicetree.py
> > @@ -332,6 +332,17 @@ class DeviceTree(object):
> >              #   Do we care about garbage collection? At all?
> >              parent.removeChild()
> >  
> > +    def _removeChildrenFromTree(self, device):
> > +        devs_to_remove = self.getDependentDevices(device)
> > +        while devs_to_remove:
> > +            leaves = [d for d in devs_to_remove if d.isleaf]
> This could be generator.
Radek pointed out it cannot be a generator due to the 'devs_to_remove'
being involved in it. So ACK as it is.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list