Bug 497407 - IOError: [Errno 21] Is a directory
IOError: [Errno 21] Is a directory
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vykydal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-04-23 15:13 EDT by James Laska
Modified: 2013-09-02 02:35 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-25 11:33:11 EDT
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. (394.27 KB, text/plain)
2009-04-23 15:13 EDT, James Laska
no flags Details

  None (edit)
Description James Laska 2009-04-23 15:13:13 EDT
The following was filed automatically by anaconda:
anaconda 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
  File "/usr/lib/anaconda/storage/__init__.py", line 234, in doIt
  File "/usr/lib/anaconda/packages.py", line 117, in turnOnFilesystems
IOError: [Errno 21] Is a directory
Comment 1 James Laska 2009-04-23 15:13:18 EDT
Created attachment 340992 [details]
Attached traceback automatically from anaconda.
Comment 2 James Laska 2009-04-23 15:14:16 EDT
Steps to reproduce
* Perform a text-mode raid6 kickstart install on a KVM/x86_64 guest
Comment 3 Radek Vykydal 2009-05-12 11:54:22 EDT
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
(updates against version .47) fixes it?
Comment 4 James Laska 2009-05-12 13:02:47 EDT
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 (  

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 04:32:54 EDT
Thanks for testing, I think being in active-idle state can be a condition quite hard to meet or reproduce. From md.txt:

   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

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 08:57:34 EDT
Radek, yesterday I tested anaconda- (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 09:25:53 EDT
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 13:59:05 EDT
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 04:36:42 EDT
I commited the patch (from comment #5), should be in version of anaconda.
Comment 10 Bug Zapper 2009-06-09 10:28:57 EDT
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:

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