Bug 613698 - device partitioning sometimes fails due to race in o-c-storage
Summary: device partitioning sometimes fails due to race in o-c-storage
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node   
(Show other bugs)
Version: 6.0
Hardware: All Linux
low
medium
Target Milestone: rc
: ---
Assignee: Mike Burns
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-12 15:30 UTC by Mike Burns
Modified: 2010-11-11 14:53 UTC (History)
4 users (show)

Fixed In Version: ovirt-node-1.9.3-6.3.gitc41536c.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 14:53:32 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ovirt.log (15.71 KB, text/x-log)
2010-07-12 15:31 UTC, Mike Burns
no flags Details
Patch (978 bytes, patch)
2010-07-12 15:38 UTC, Mike Burns
no flags Details | Diff

Description Mike Burns 2010-07-12 15:30:46 UTC
Description of problem:

Due to a race in ovirt-config-storage, partitioning sometimes fails with the following error in ovirt.log

+ echo 'Toggling LVM on'
Toggling LVM on
+ parted /dev/mapper/3600c0ff000d7a2a50e55b74a01000000 -s 'set 3 lvm on'
device-mapper: remove ioctl failed: Device or resource busy
device-mapper: remove ioctl failed: Device or resource busy
device-mapper: create ioctl failed: Device or resource busy
device-mapper: create ioctl failed: Device or resource busy
Warning: parted was unable to re-read the partition table on /dev/mapper/3600c0ff000d7a2a50e55b74a01000000 (Device or resource busy).  This means Linux won't know anything about the modifications you made. 




Version-Release number of selected component (if applicable):
6.0

How reproducible:
In my experience, always, but no one else had seen it before

Steps to Reproduce:
1. run in firstboot
2. configure drive
3. commit changes to drive
  
Actual results:
Failure as above

Expected results:
Partitioning successful

Additional info:

Comment 1 Mike Burns 2010-07-12 15:31:24 UTC
Created attachment 431202 [details]
ovirt.log

Comment 2 Mike Burns 2010-07-12 15:38:06 UTC
Created attachment 431205 [details]
Patch

Comment 5 Ying Cui 2010-08-21 06:40:16 UTC
Failed to verify this bug on rhev-hypervisor-6.0-12.el6 build, the bug can be reproduced.

Steps to Reproduce:
1. run in firstboot
2. Partition on local disk A
3. Commit this change
3. repartition 

Actual results:
Aug 20 16:35:44 Saving parameters
Aug 20 16:35:44 Removing old LVM partitions
Aug 20 16:35:44 Unmounting log partition
umount: /var/log: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
Aug 20 16:35:44 Unmounting log partition
umount: /var/log: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
++ bc -l
++ echo 'scale=0; 867 / 1024;'
+ MEM_SIZE_MB=0
++ bc -l
++ echo 'scale=0; 50 * (1024 * 1024) / (1000 * 1000)'
+ boot_size_si=52
+ '[' '' = y ']'
+ '[' y = y ']'
+ log 'Partitioning root drive: /dev/vdb'
++ date '+%b %d %H:%M:%S'
+ printf 'Aug 20 16:35:45 '
Aug 20 16:35:45 + '[' 0 = 1 ']'
+ echo 'Partitioning root drive: /dev/vdb'
+ wipe_partitions /dev/vdb
+ local drive=/dev/vdb
+ log 'Wiping old boot sector'
Partitioning root drive: /dev/vdb
++ date '+%b %d %H:%M:%S'
+ printf 'Aug 20 16:35:45 '
Aug 20 16:35:45 + '[' 0 = 1 ']'
+ echo 'Wiping old boot sector'
+ dd if=/dev/zero of=/dev/vdb bs=1024K count=1
Wiping old boot sector
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0961918 s, 10.9 MB/s
+ log 'Wiping secondary gpt header'
++ date '+%b %d %H:%M:%S'
+ printf 'Aug 20 16:35:45 '
Aug 20 16:35:45 + '[' 0 = 1 ']'
+ echo 'Wiping secondary gpt header'
Wiping secondary gpt header
++ sfdisk -s /dev/vdb
+ local disk_kb_count=5120000
+ dd if=/dev/zero of=/dev/vdb bs=1024 seek=5119999 count=1
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.0565375 s, 18.1 kB/s
+ kpartx -d /dev/vdb
+ '[' -L /dev/mapper/HostVG-Swap ']'
+ swapoff -a
++ find /dev/mapper/HostVG-Config /dev/mapper/HostVG-Data /dev/mapper/HostVG-Logging /dev/mapper/HostVG-Swap
+ for lv in '$(find /dev/mapper/HostVG*)'
+ dmsetup remove /dev/mapper/HostVG-Config
device-mapper: remove ioctl failed: Device or resource busy
Command failed
+ __st=1
+ stop_log
+ '[' 0 '!=' 1 ']'
+ exec
+ exec
+ _log_status=1
+ exit 1

ERROR: Configure storage partitions FAILED. See /var/log/ovirt.log

Note: pls confirm whether it is a duplicate bug with bug 625871.

Comment 6 Ying Cui 2010-08-23 11:46:38 UTC
Verified this bug on clean partition with build rhev-hypervisor-6.0-12.el6.

When partition on clean disk, it is successfully, verified this bug.
When partition on dirty disk, there exist the exact bug: 625871 to record.

Comment 7 releng-rhel@redhat.com 2010-11-11 14:53:32 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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