Bug 497407

Summary: IOError: [Errno 21] Is a directory
Product: [Fedora] Fedora Reporter: James Laska <jlaska>
Component: anacondaAssignee: Radek Vykydal <rvykydal>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 11CC: jturner, pjones, rmaximo, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: anaconda_trace_hash:4eb2b7cc10f7ea9d3f058ee81bb9a19d76533373967652ec0d57082dcc2c8a76
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-25 15:33:11 UTC Type: ---
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
Attached traceback automatically from anaconda. none

Description James Laska 2009-04-23 19:13:13 UTC
The following was filed automatically by anaconda:
anaconda 11.5.0.47 exception report
Traceback (most recent call first):
  File "/usr/lib/anaconda/storage/udev.py", line 92, in udev_get_block_device
    entry = open(db_path).read()
  File "/usr/lib/anaconda/storage/deviceaction.py", line 277, in execute
    info = udev_get_block_device("/sys%s" % self.device.sysfsPath)
  File "/usr/lib/anaconda/storage/devicetree.py", line 659, in processActions
    action.execute(intf=self.intf)
  File "/usr/lib/anaconda/storage/__init__.py", line 234, in doIt
    self.devicetree.processActions()
  File "/usr/lib/anaconda/packages.py", line 117, in turnOnFilesystems
    anaconda.id.storage.doIt()
IOError: [Errno 21] Is a directory

Comment 1 James Laska 2009-04-23 19:13:18 UTC
Created attachment 340992 [details]
Attached traceback automatically from anaconda.

Comment 2 James Laska 2009-04-23 19:14:16 UTC
Steps to reproduce
=====================
* Perform a text-mode raid6 kickstart install on a KVM/x86_64 guest

Comment 3 Radek Vykydal 2009-05-12 15:54:22 UTC
The cause is that md device was in active-idle state when we were updating its sysfs path attribute.   We got empty string for path because the device did not have device.status == True, which for md device means being in state active or clean. According to md.txt I think that we can consider active-idle state as device.status == True ("the device is open and ready for use") too.

I can't reproduce the bug, James, can you please reproduce and test if this
http://fedorapeople.org/~rvykydal/updates.497407.img
(updates against version .47) fixes it?

Comment 4 James Laska 2009-05-12 17:02:47 UTC
Greetings Radek, I'm retesting the test I was running when encountering this bug, but am currently not seeing the issue.  I am retesting using the latest anaconda in rawhide (11.5.0.51).  

Given your analysis, I believe the error condition is still present, however I might not be reliably reproducing the failure.  

I'll continue testing and update should I reproduce the failure.

Comment 5 Radek Vykydal 2009-05-13 08:32:54 UTC
Thanks for testing, I think being in active-idle state can be a condition quite hard to meet or reproduce. From md.txt:

active-idle
   like active, but no writes have been seen for a while (safe_mode_delay).

Unfortunately this doesn't give me any hint.

I prepared updates image for 11.5.0.51:
http://fedorapeople.org/~rvykydal/updates.479407.51.img


The images contain this patch:

diff --git a/storage/devices.py b/storage/devices.py
index c6fbdcc..b64c486 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2325,7 +2325,7 @@ class MDRaidArrayDevice(StorageDevice):
         if os.access(state_file, os.R_OK):
             state = open(state_file).read().strip()
             log.debug("%s state is %s" % (self.name, state))
-            if state in ("clean", "active"):
+            if state in ("clean", "active", "active-idle"):
                 status = True
 
         return status

Comment 6 James Laska 2009-05-13 12:57:34 UTC
Radek, yesterday I tested anaconda-11.5.0.51 (without the updates image) for the following cmdline-mode kickstart tests ...
 1) uninitialized disk (clearpart+zerombr+autopart)
 2) raid0
 3) raid1
 4) raid5
 5) raid6 

I repeated this several times on multiple systems and was *not* able to reproduce the original condition.  Should I repeat the tests now using your updates.img?

Or do you feel confident in review of this patch that it can be applied as is?

Comment 7 Radek Vykydal 2009-05-13 13:25:53 UTC
I will send the patch for review on anaconda-devel-list. I am not md expert by far so I am not as sure as I'd like to be that it will not break anything. Also I am not sure if testing with updates is worth spending your time when we can't reproduce, seems like active-idle state occurs only rarely in our tests. Maybe I'd ask you for testing with updates after getting feedback in review.

Comment 8 Chris Lumens 2009-05-14 17:59:05 UTC
After discussion with James, we've decided to move this one off the blocker list due to the lack of a reliable reproducer.  Radek, feel free to commit your fix still since it does look good.  Hopefully that'll still clear this bug up.

Comment 9 Radek Vykydal 2009-05-15 08:36:42 UTC
I commited the patch (from comment #5), should be in version 11.0.5.53 of anaconda.

Comment 10 Bug Zapper 2009-06-09 14:28:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

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