Bug 567118 - PartitionException: Extended partitions cannot be hidden on msdos disk labels.
PartitionException: Extended partitions cannot be hidden on msdos disk labels.
Status: CLOSED DUPLICATE of bug 567576
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Hans de Goede
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-02-21 13:28 EST by Flóki Pálsson
Modified: 2010-03-02 03:20 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 569637 (view as bug list)
Last Closed: 2010-03-02 03:20:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Attached traceback automatically from anaconda. (239.69 KB, text/plain)
2010-02-21 13:28 EST, Flóki Pálsson
no flags Details

  None (edit)
Description Flóki Pálsson 2010-02-21 13:28:06 EST
The following was filed automatically by anaconda:
anaconda 13.26 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.6/site-packages/parted/partition.py", line 161, in unsetFlag
    return self.__partition.set_flag(flag, 0)
  File "/usr/lib64/python2.6/site-packages/parted/decorators.py", line 30, in localeC
    ret = fn(*args, **kwds)
  File "<string>", line 2, in unsetFlag
  File "/usr/lib/anaconda/storage/devices.py", line 1221, in unsetFlag
  File "/usr/lib/anaconda/storage/deviceaction.py", line 271, in execute
  File "/usr/lib/anaconda/storage/devicetree.py", line 670, in processActions
  File "/usr/lib/anaconda/storage/__init__.py", line 290, in doIt
  File "/usr/lib/anaconda/packages.py", line 109, in turnOnFilesystems
  File "/usr/lib/anaconda/dispatch.py", line 205, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 126, in gotoNext
  File "/usr/lib/anaconda/gui.py", line 1311, in nextClicked
PartitionException: Extended partitions cannot be hidden on msdos disk labels.
Comment 1 Flóki Pálsson 2010-02-21 13:28:12 EST
Created attachment 395377 [details]
Attached traceback automatically from anaconda.
Comment 2 David Lehman 2010-02-22 10:21:29 EST
1. We are unsetting the flag. This is no time to complain about the flag being set.

2. Anaconda checks the return value of isFlagAvailable before calling unsetFlag. If the flag is not available don't say that it is.
Comment 3 David Cantrell 2010-02-25 09:17:34 EST
pyparted gets this information from libparted.  libparted needs to enforce its own rules.  The msdos_partition_is_flag_available() needs to return false for PED_PARTITION_HIDDEN when the partition type is PED_PARTITION_EXTENDED.  This prevents an exception in msdos_partition_set_flag() later.  Change msdos_partition_get_flag() for consistency.

diff -up parted-2.1/libparted/labels/dos.c.flag_available parted-2.1/libparted/labels/dos.c
--- parted-2.1/libparted/labels/dos.c.flag_available	2010-02-25 03:35:47.000000000 -1000
+++ parted-2.1/libparted/labels/dos.c	2010-02-25 04:14:19.000000000 -1000
@@ -1481,7 +1481,10 @@ msdos_partition_get_flag (const PedParti
 	dos_data = part->disk_specific;
 	switch (flag) {
-		return dos_data->hidden;
+		if (part->type == PED_PARTITION_EXTENDED)
+			return 0;
+		else
+			return dos_data->hidden;
 		return dos_data->boot;
@@ -1512,6 +1515,10 @@ msdos_partition_is_flag_available (const
 	switch (flag) {
+		if (part->type == PED_PARTITION_EXTENDED)
+			return 0;
+		else
+			return 1;
Comment 4 Hans de Goede 2010-03-02 03:20:34 EST
Although I fully agree with comment #3, and I'll forward the patch upstream. That is not the real issue here.

Note that this happens from ActionCreateFormat.execute(), iow we are trying
to create a filesystem (or pv or raidmember) on the *extended* partition.

This can mean 1 of 2 things:
1) There is an anaconda bug
2) The underlying libparted pedPartition object has been free-ed and the
   memory re-used, due to bug 567576. Causing parted to think this
   is an extended partition.

I'm pretty sure 2 is the cause, so I'm marking this as a duplicate of
bug 567576.

*** This bug has been marked as a duplicate of bug 567576 ***

Note You need to log in before you can comment on or make changes to this bug.