On 06/04/2014 02:50 PM, Anne Mulhern wrote:
----- Original Message -----
> From: "David Shea" <dshea(a)redhat.com>
> To: anaconda-patches(a)lists.fedorahosted.org
> Sent: Wednesday, June 4, 2014 2:46:34 PM
> Subject: [blivet] Update _name directly when tearing down loop devices (#1104558)
>
> Resetting the name of loop devices needs to bypass the existing device
> check.
> ---
> blivet/devices.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/blivet/devices.py b/blivet/devices.py
> index cdd0642..7f38ebd 100644
> --- a/blivet/devices.py
> +++ b/blivet/devices.py
> @@ -4250,7 +4250,7 @@ class LoopDevice(StorageDevice):
>
> def _postTeardown(self, recursive=False):
> StorageDevice._postTeardown(self, recursive=recursive)
> - self.name = "tmploop%d" % self.id
> + self._name = "tmploop%d" % self.id
> self.sysfsPath = ''
You're probably going to have to do something similar for most of the
places where you replaced setting self._name with setting self.name. I
have a patch in my working tree that I needed to get some other work done:
http://dlehman.fedorapeople.org/patches/20140604-snapshots.2/0001-Bypass-...
>
> @property
> --
> 1.9.0
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches(a)lists.fedorahosted.org
>
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
I have no idea why a LoopDevice's name has to be reset after teardown,
this is not the case for any other kind of device.
Loop devices are pretty weird in that the names cannot be guaranteed to
be persistent/consistent across activations. This is similar to how we
unset a device's sysfsPath when we tear it down, since it might be
different the next time it gets activated (for dm, md, loop at least).
Perhaps _setName() ought to be reevaluated a bit, in light of this
new development and new info.
- mulhern
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches