Re: [PATCH] Make pyblock compatible with new pyparted.

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

 




Hey David:

After some consideration I have some questions ( comments bellow ),  Guess I'm looking for some granularity.
----- "David Cantrell" <dcantrell@xxxxxxxxxx> wrote:


> 
> parted.IOException.  The other error that could be raised is a 

I think an IO error is pretty serious and should be propagated to the caller.  In this specific situation, when you are doing a raidSet.activate() and there is some IO error with the set, it will raise an exception. Anaconda or whoever is calling should decide what to do.

> parted.DiskException, which currently only happens if you give 
> __init__() on parted.Disk something invalid.

Guess this would only happen if parted.getDevice() went wrong, in which case the DeviceException would be received by the caller.

My Questions
What does pyparted do in these cases?:
1. when I try to open a device with no label (partition table).
2. when I try to open a device with a label but with no partitions.
3. when I try to open a device with a corrupt label.
4. when I try to get a disk from a device with corrupt label.
5. when I try to get a disk from a device valid label but with no partitions.
6. when I try to get a disk of a device with no label.
7. when I try to list partitions of a disk of a device with no label (if its possible to reach this situation)
8. when I try to list partitions of a valid disk with no partitions.
9. when I try to open a device from a device that is physically corrupt (IOerror)

IMO this is what could be returned.
1,2,3:
Should return a device, the only time a device should not be returned is when an IOerror occurs.

4,6:
should not create the disk and should give me an exception (or some way of telling that it has no label, like a special state of the disk object).  The no label situation should be ignored in pyblocks case and should not be propagated to caller.  we might want to propagate the corrupt label, thats discussable though.

5:
Should create a disk object.

7:
This state, IMO, should not be reached.

8:
should return something lik [].

9:
IOerror exception.

Pls note that I'm only referring to reading the partition table.

Regards.
-- 
Joel Andres Granados
Red Hat / Brno Czech Republic

_______________________________________________
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