[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH rhel5] Fix handling of existing PVs on disabled disk (#532536).



Hi,

so if the PV is not selected as disk for installation, it won't show up in VG. But does VG with incomplete list of PVs make sense? Wouldn't be better either not show the VG at all (possibly with message, VG couldn't been initialized, because some of it's VGs weren't enabled) or automatically add PVs needed for the VG to the list (also with possible warning to the user).

Martin

----- "Radek Vykydal" <rvykydal redhat com> wrote:

> Traceback occurs when installing on system with existing VG having
> PVs
> on 2 drives if one drive is unselected for installation.
> 
> Traceback (most recent call first):
>   File "/usr/lib/anaconda/partRequests.py", line 811, in getDevice
>     if (r.size > 0) or (r.device is not None):
>   File "/usr/lib/anaconda/partRequests.py", line 202, in toEntry
>     device = self.getDevice(partitions)
>   File "/usr/lib/anaconda/partitioning.py", line 124, in
> partitioningComplete
>     entry = request.toEntry(anaconda.id.partitions)
>   File "/usr/lib/anaconda/dispatch.py", line 201, in moveStep
>     rc = stepFunc(self.anaconda)
>   File "/usr/lib/anaconda/dispatch.py", line 124, in gotoNext
>     self.moveStep()
>   File "/usr/lib/anaconda/gui.py", line 1156, in nextClicked
>     self.anaconda.dispatch.gotoNext()
> AttributeError: 'NoneType' object has no attribute 'size'
> ---
>  partRequests.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/partRequests.py b/partRequests.py
> index 0ae6b74..809fb5e 100644
> --- a/partRequests.py
> +++ b/partRequests.py
> @@ -808,7 +808,7 @@ class VolumeGroupRequestSpec(RequestSpec):
>              r = partitions.getRequestByID(pv)
>              # a size of zero implies we did autopartitioning of
>              # pvs everywhere we could
> -            if (r.size > 0) or (r.device is not None):
> +            if r and ((r.size > 0) or (r.device is not None)):
>                  pvs.append(r.getDevice(partitions))
>          self.dev = fsset.VolumeGroupDevice(self.volumeGroupName,
> pvs,
>                                             self.pesize,
> -- 
> 1.6.0.6
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]