Bug 918217

Summary: [PATCH] Parted incorrectly fails when writing a label to a loop device
Product: [Fedora] Fedora Reporter: Torrie Fischer <tdfischer>
Component: partedAssignee: Brian Lane <bcl>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: bcl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-01 00:44:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to ignore partition limits on loop devices none

Description Torrie Fischer 2013-03-05 17:56:39 UTC
Created attachment 705564 [details]
Patch to ignore partition limits on loop devices

Description of problem:

Parted incorrectly fails when writing a label to a loop device


Version-Release number of selected component (if applicable):
3.1-9.fc18.i686

How reproducible:

Every time

Steps to Reproduce:

1. Setup a koji builder running kernel 2.6.32-276.el6.x86_64
2. Submit a mostly empty kickstart file to spin an appliance
  
Actual results:

appliance.log contains:
Adding disk sda as /var/tmp/imgcreate-8WhAhT/tmp-vFtiAE/koji-image-dist-aether-1-build-395-201303051105-sda.raw
Extending sparse file /var/tmp/imgcreate-8WhAhT/tmp-vFtiAE/koji-image-dist-aether-1-build-395-201303051105-sda.raw to 10737418240
Losetup add /dev/loop0 mapping to /var/tmp/imgcreate-8WhAhT/tmp-vFtiAE/koji-image-dist-aether-1-build-395-201303051105-sda.raw
Formatting disks
Initializing partition table for /dev/loop0 with msdos layout
Unable to create appliance : Failed mount disks : Error writing partition table on /dev/loop0
Losetup remove /dev/loop0

Expected results:

A successful build

Additional info:

Upstream parted bug tracker seems to be down, so I can't send this upstream for any kind of review. However, this is a small patch that would be really super nice to have in the next F18 update.

The patch lets parted assume that the underlying device has no limit on partitions if it is a loop device. It also skips telling the OS that it should reload the partition table, which isn't supported for loop devices on Linux anyways afaik.

Comment 1 Brian Lane 2013-03-13 17:54:32 UTC
I'm not sure what's going on, but parted works fine with loop devices.

Comment 2 Fedora End Of Life 2013-04-03 13:49:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19