Bug 196944

Summary: Anaconda's isys.py in makeDevInode() incorrect procedure
Product: [Fedora] Fedora Reporter: Jasper O. Hartline <jasperhartline>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-06-28 02:20:19 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
isys.py patch for makeDevInode() none

Description Jasper O. Hartline 2006-06-27 19:20:07 UTC
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):
anaconda-11.0.5-1

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
3. 
  
Actual results:
Anaconda fails

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

Additional info:
A patch will be attached for the offending code.

Comment 1 Jasper O. Hartline 2006-06-27 19:20:07 UTC
Created attachment 131625 [details]
isys.py patch for makeDevInode()

Comment 2 Jeremy Katz 2006-06-27 19:42:51 UTC
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 22:04:37 UTC
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 ?
    iutil.makeDriveDeviceNodes()
  File "/usr/lib/anaconda/iutil.py", line 473, in makeDriveDeviceNodes
    makeDMNode()
  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-28 02:09:48 UTC
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-28 02:20:19 UTC
This is already fixed in CVS