[PATCH] LVMFactory: raise exception when adding LV to full fixed size VG (#1170660)
Anne Mulhern
amulhern at redhat.com
Tue Dec 16 17:19:29 UTC 2014
----- Original Message -----
> From: "Vojtech Trefny" <vtrefny at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Tuesday, December 16, 2014 11:03:53 AM
> Subject: [PATCH] LVMFactory: raise exception when adding LV to full fixed size VG (#1170660)
>
> ---
> blivet/devicefactory.py | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
> index e720fbd..03b7aaf 100644
> --- a/blivet/devicefactory.py
> +++ b/blivet/devicefactory.py
> @@ -1134,6 +1134,9 @@ class LVMFactory(DeviceFactory):
>
> if self.device:
> self.size += self.device.size
> +
> + if self.size == 0:
Please make sure to size objects to size objects as:
if self.size == Size(0):
commit 7295abb857b58b04e913493dcb773c22c41e1265 explains reasoning.
> + raise DeviceFactoryError("not enough free space for new
> device")
> else:
> super(LVMFactory, self)._handle_no_size()
>
> --
> 2.1.0
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
- mulhern
More information about the anaconda-patches
mailing list