Bug 923788 - Cannot remove MD RAID array
Summary: Cannot remove MD RAID array
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Lehman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-20 12:52 UTC by Jan Safranek
Modified: 2013-05-22 03:12 UTC (History)
3 users (show)

Fixed In Version: anaconda-19.24-1.fc19
Clone Of:
Environment:
Last Closed: 2013-05-22 03:12:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
reproducer (1.44 KB, text/x-python)
2013-03-20 12:52 UTC, Jan Safranek
no flags Details
experimental patch (1.01 KB, patch)
2013-03-20 13:04 UTC, Jan Safranek
no flags Details | Diff

Description Jan Safranek 2013-03-20 12:52:03 UTC
Created attachment 713221 [details]
reproducer

If I remove MD RAID array using attached reproducer, I get a traceback:

  File "/mnt/home/project/blivet/examples/delete-raid.py", line 47, in <module>
    storage.devicetree.processActions(dryRun=False)
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 211, in processActions
    action.device.preCommitFixup(mountpoints=mpoints)
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 3097, in preCommitFixup
    if self.size < 1000 or self.format.type == "swap":
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 2782, in size
    if not self.exists or not self.partedDevice:
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 584, in partedDevice
    if self.exists and self.status and not self._partedDevice:
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 3006, in status
    state = open(state_file).read().strip()
IOError: [Errno 16] Device or resource busy

The reason is:
1) storage.devicetree.registerAction(action) actually stops the MD RAID (shouldn't it be stopped in processActions()???)
2) storage.devicetree.processActions reads its /sys/block/md0/md/array_state, which still exists (even though the MD RAID is already stopped?!), but returns 'Device or resource busy' upon reading.

Comment 1 Jan Safranek 2013-03-20 12:54:13 UTC
Usage of the reproducer:

python delete-raid.py /dev/sdb1 /dev/sdb2

It creates new MD raid with $* (/dev/sdb1 + /dev/sdb2) and then deletes it. Log is in /tmp/blivet.log.

Comment 2 Jan Safranek 2013-03-20 13:04:40 UTC
Created attachment 713233 [details]
experimental patch

Comment 3 Fedora Update System 2013-05-03 23:04:58 UTC
anaconda-19.24-1.fc19, python-blivet-0.12-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-blivet-0.12-1.fc19,anaconda-19.24-1.fc19

Comment 4 Fedora Update System 2013-05-04 18:51:21 UTC
Package anaconda-19.24-1.fc19, python-blivet-0.12-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-19.24-1.fc19 python-blivet-0.12-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-7403/python-blivet-0.12-1.fc19,anaconda-19.24-1.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-05-22 03:12:39 UTC
anaconda-19.24-1.fc19, python-blivet-0.12-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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