Bug 105987 - On "Insert CDROM" prompt, anaconda does not search all cdroms for disc
Summary: On "Insert CDROM" prompt, anaconda does not search all cdroms for disc
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Mike McLean
URL:
Whiteboard: FC2
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-01 20:37 UTC by James Laska
Modified: 2013-09-02 05:52 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-16 13:42:09 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description James Laska 2003-10-01 20:37:04 UTC
# TESTED w/ Taroon-re0926.RC1.1 on i386

Appears to be a bug in the cdrom switching code for anaconda.  I've gone through
several manual installs with multiple cdrom drives (ide, and usb).  It appears
that if the cdrom's that anaconda needs are in drives already (doesn't matter
which drives), anaconda will use those drives no questions asked (good, this is
the expected behavior).  However, let's say I only have 3 cd drives w/ discs 1-3
in use.  Anaconda will prompt for disc4.  Here's where I think a problem may lie...

When I insert disc4 and click "Okay", anaconda only seems to search the cdrom
whose mount point is /mnt/source (so which ever drive booted disc1 probably).  I
can put disc4 in any of the other 2+ drives, but anaconda will not look there. 
Seems to be a bug in the code below in image.py.  Seems to me like the following
for loop over the cdlist list in image.py should be used also after the prompt
for the next disk to scan through all the kudzu probed cdrom drives attached to
the system.

------- Suspect code -------

image.py:167
=============
cdlist = []
        for (dev, something, descript) in \
            kudzu.probe(kudzu.CLASS_CDROM, kudzu.BUS_UNSPEC, 0):
                cdlist.append(dev)
                                                                               
                                    
 ...

 # code below should use cdlist when trying to find the next cdrom, instead of
just self.device
 ...

        if not done:
        isys.ejectCdrom(self.device)
                                                                               
                                         
        while not done:
        self.messageWindow(_("Change CDROM"),
            _("Please insert disc %d to continue.") % needed)
                                                                               
                                         
        try:
            if isys.mount(self.device, "/mnt/source",
                  fstype = "iso9660", readOnly = 1):
            time.sleep(3)
            isys.mount(self.device, "/mnt/source",
                   fstype = "iso9660", readOnly = 1)
                                                                               
                                                                               
                                                                               
      if os.access("/mnt/source/.discinfo", os.R_OK):
                        f = open("/mnt/source/.discinfo")
            newStamp = f.readline().strip()
                        try:
                            descr = f.readline().strip()
                        except:
                            descr = None
                        try:
                            arch = f.readline().strip()
                        except:
                            arch = None
                        try:
                            discNum = getDiscNums(f.readline().strip())
                        except:
                            discNum = [ 0 ]
            f.close()
                        if (newStamp == timestamp and
                            arch == _arch and
                            needed in discNum):
                done = 1
                            self.currentDisc = discNum
                            # make /tmp/cdrom again so cd gets ejected
                            isys.makeDevInode(self.device, "/tmp/cdrom")
                                                                               
                                         
            if not done:
            self.messageWindow(_("Wrong CDROM"),
                _("That's not the correct %s CDROM.")
                                           % (productName,))
            isys.umount("/mnt/source")
            isys.ejectCdrom(self.device)
        except:
            self.messageWindow(_("Error"),
                _("The CDROM could not be mounted."))

------- Additional Comments From msf@redhat.com  2003-09-30 16:23 -------

This is a 'by design' behavior.  We eject the CD drive #1, so we expect you to
put it in the CD tray we ejected.  Worth fixing but not a real problem.

Comment 1 Jeremy Katz 2003-10-21 23:03:24 UTC
This isn't really a new behavior, and I've touched this code late one too many
times and had to then deal with a release full of bad cd bugs.  So, targeting to
fix for FC2.

Comment 2 Jeremy Katz 2004-01-06 23:05:38 UTC
Committed something that should fix this to CVS.  Could definitely do
with some testing as it's kind of uber-scary code.

Comment 3 James Laska 2004-08-16 13:42:09 UTC
Sorry, this has been fixed for some time...thanks


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