[PATCH 1/2] Parent list length doesn't reflect new member in _addParent.

David Lehman dlehman at redhat.com
Mon Mar 31 17:11:58 UTC 2014


On Mon, 2014-03-31 at 08:25 -0400, Anne Mulhern wrote:
> 
> 
> 
> ----- Original Message -----
> > From: "David Lehman" <dlehman at redhat.com>
> > To: anaconda-patches at lists.fedorahosted.org
> > Sent: Friday, March 28, 2014 4:24:06 PM
> > Subject: [PATCH 1/2] Parent list length doesn't reflect new member in	_addParent.
> > 
> > The new parent doesn't get added until after _addParent returns.
> > ---
> >  blivet/devices.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/blivet/devices.py b/blivet/devices.py
> > index cb19d84..d568d8e 100644
> > --- a/blivet/devices.py
> > +++ b/blivet/devices.py
> > @@ -2500,7 +2500,7 @@ class LVMVolumeGroupDevice(ContainerDevice):
> >              self.setup()
> >  
> >          if (self.exists and member.format.exists and
> > -            len(self.parents) == self.pvCount):
> > +            len(self.parents) + 1 == self.pvCount):
> >              self._complete = True
> >  
> >      def _removeParent(self, member):
> > --
> > 1.9.0
> > 
> > _______________________________________________
> > anaconda-patches mailing list
> > anaconda-patches at lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> > 
> 
> Is there a way to get rid of self._complete entirely, i.e., is it
> a function of some other fields? I'm wondering what sort of history
> of the device _complete keeps. If it only keeps information about the
> state of the device, then it would be worthwhile to get rid of it. And if not,
> definitely worthwhile to document what ti does track.

It tracks whether we ever had access to all of the VG's PVs, and is
required to differentiate between having found a VG with one or more
missing PVs and having found a working VG and then scheduling one or
more ContainerRemoveMember actions on it. I'll add a comment to that
effect.

David

> 
> - mulhern
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches




More information about the anaconda-patches mailing list