[PATCH 2/2] Do not break the chain when an inactive device is torn down recursively
Vratislav Podzimek
vpodzime at redhat.com
Thu Jul 2 16:18:00 UTC 2015
On Thu, 2015-07-02 at 11:16 -0500, David Lehman wrote:
> On 07/01/2015 03:27 AM, Vratislav Podzimek wrote:
> > If an inactive device is requested to be torn down recursively, we need to let
> > the chain of actions continue because there might be active parent devices that
> > need to be torn down.
> >
> > Related: rhbz#1182229
> > Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> > ---
> > blivet/devices/storage.py | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/blivet/devices/storage.py b/blivet/devices/storage.py
> > index 73ba645..3a6f6cb 100644
> > --- a/blivet/devices/storage.py
> > +++ b/blivet/devices/storage.py
> > @@ -426,7 +426,12 @@ class StorageDevice(Device):
> > raise errors.DeviceError("device has not been created", self.name)
> >
> > if not self.status or not self.controllable:
> > - return False
> > + if not recursive:
> > + return False
> > + else:
> > + # nothing special to do here, but we need to continue with the
> > + # teardown (to tear down parents)
> > + return True
>
> I might prefer you do "return recursive" with an explanatory comment
> here.
>
Sure thing, fixing locally.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list