Re: [PATCH] Handle system crappyness.

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

 



On Mon, Mar 16, 2009 at 04:06:09PM -0500, David Lehman wrote:
> On Mon, 2009-03-16 at 21:35 +0100, Joel Granados Moreno wrote:
> > * storage/devicelibs/lvm.py (zeroLvmMetadata): zero out the LVM metadata
> >   only.  This basically means from 513 byte and on.  This will also
> >   ignore the firs 512 bytes if we are in a partition, but that does not
> >   matter because LVM does not touch those bits anyways.
> 
> This should only be called from storage.formats.PhysicalVolume.destroy,
> right?

Yep, seems right.
> 
> > * storage/devicelibs/lvm.py (vgreduce): introduces a new argument to the
> >   function.  rm means use the lvm --removemissing option.
> > 
> > * storage/devices.py (LVMVolumeGroupDevice.complete): New function to
> >   evaluate if VG is consistent.
> > * storage/devices.py (LVMLogicalVolumeDevice.complete): Likewise for
> >   LVs.
> 
> These should both be properties since they takes no arguments and, as
> far as the user is concerned, don't actually perform any actions. The
> parentheses just add noise and expose implementation details that nobody
> needs to know.

sure.

> 
> > 
> > * storage/devicetree.py (_handleSysCrapyness): New function intended to
> >   catch all unwanted behavior from the system before continuing.
> 
> Why not call this "handleLVMInconsistency" or similar?

yep, Although I had thought this might be used for other
inconsistencies.  I will rename it to handleinconsistencies so we can
put other stuff in there if needed.
> 
> > * storage/devicetree.py (questionReinitILVM): New function intended
> >   to ask the user what to do in case we find inconsistent LVM metadata.
> 
> This seems okay, except it should take into account clearpart, right? We
> don't want to prompt if they already gave 'clearpart --all'.

ok, will modify.  Note that there are still corner cases that are not
handled with this patch.  Mainly the PV that has not partition table.  I
chose to ignore this corner case as the current storage code assumes a
partition table.
What will happen  if we encounter this situation is that we will
partition a PV that might be in use.  The result is a device that has
LVM metadata and partitioning metadata.  For now there is no way of
avoiding this.  (unless the user chooses to ignore the device when
prompted)

> 
> Dave
> 
> > ---
> >  storage/devicelibs/lvm.py |   33 ++++++++++++--
> >  storage/devices.py        |   29 +++++++++++-
> >  storage/devicetree.py     |  108 +++++++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 162 insertions(+), 8 deletions(-)
> > 
> > diff --git a/storage/devicelibs/lvm.py b/storage/devicelibs/lvm.py
> > index 8b755a4..8a0e25b 100644
> > --- a/storage/devicelibs/lvm.py
> > +++ b/storage/devicelibs/lvm.p> > +
> > +                    self.addIgnoredDisk(device.name)

-- 
Joel Andres Granados
Brno, Czech Republic, Red Hat.

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux