Bug 196944 - Anaconda's isys.py in makeDevInode() incorrect procedure
Anaconda's isys.py in makeDevInode() incorrect procedure
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Anaconda Maintenance Team
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2006-06-27 15:20 EDT by Jasper O. Hartline
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-06-27 22:20:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
isys.py patch for makeDevInode() (374 bytes, patch)
2006-06-27 15:20 EDT, Jasper O. Hartline
no flags Details | Diff

  None (edit)
Description Jasper O. Hartline 2006-06-27 15:20:07 EDT
Description of problem:
While using Kadischi which uses Anaconda, from a LiveCD environment to initiate
a harddrive installation from the LiveCD I have come across an error which
occurs if /dev/ nodes already exist. This looks to have been attempted to be
rectified however the procedure is slightly wrong I think.

A patch will be attached below.

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

How reproducible:
Run Anaconda from LiveCD with Kadischi to initiate a HDD installation.

Steps to Reproduce:
1. Run Kadischi
2. Anaconda stops with an exception in makeDevInode() in isys.py
Actual results:
Anaconda fails

Expected results:
Anaconda should continue to install to the selected drives and with the selected

Additional info:
A patch will be attached for the offending code.
Comment 1 Jasper O. Hartline 2006-06-27 15:20:07 EDT
Created attachment 131625 [details]
isys.py patch for makeDevInode()
Comment 2 Jeremy Katz 2006-06-27 15:42:51 EDT
That patch doesn't make any sense at all.  Please provide the exception you're
actually receiving.
Comment 3 Jasper O. Hartline 2006-06-27 18:04:37 EDT
Ok. I wasn't sure if it would or not, and is merely trivial.
Here is a small snippet of the exception I see:
------- Exception Text Start --------
  ***  running anaconda  ***

Probing for video card:   Cirrus Logic GD 5430/40 [Alpine]
Probing for monitor type:   Unknown monitor
Starting graphical installation...
Traceback (most recent call last):
  File "/usr/sbin/anaconda", line 1126, in ?
  File "/usr/lib/anaconda/iutil.py", line 473, in makeDriveDeviceNodes
  File "/usr/lib/anaconda/iutil.py", line 430, in makeDMNode
    isys.makedev(major, minor))
  File "/usr/lib/anaconda/isys.py", line 391, in mknod
    return _isys.mknod(pathname, mode, dev)
SystemError: (17, 'File exists')

  ***  Fatal error: /usr/sbin/anaconda returned non zero (256) exit code.
Aborting execution.

You should clean temporary files.
------ Exception Text End -----

Note: The asterisked "Running Anaconda" and "You should clean temporary files"
is a product of Kadischi while and after running Anaconda.

I am unsure exactly what that section of code is exactly for or was for however
from a brief look at it it made no sense to me as to why the "path" would be set
to "/dev/%s" originally, and then an os.stat(name) is called. When the catching
of the exception occurs the switch "path" to "/tmp" when mknod fails anyways.. 
(Within the LiveCD environment, remember udev has already started.)

Of course if you remove /dev/mapper this exception goes away, though is this right?
Comment 4 Jasper O. Hartline 2006-06-27 22:09:48 EDT
The exception is actually in iutil.py during makeDMNode().
I don't know why I said makeDevInode().

In any case if /dev/mapper exists we get an exception, I'm curious if this can
be useful to catch say we are running from a LiveCD doing a HDD install, as udev
has already started along with mdadm and other services.

(Apologies for the crazy bug report, was confused between two things)
Comment 5 Jeremy Katz 2006-06-27 22:20:19 EDT
This is already fixed in CVS

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