Bug 569377 - CDROM install unable to eject disc - storage: error ejecting cdrom sr0: (5, 'Input/output error')
CDROM install unable to eject disc - storage: error ejecting cdrom sr0: (5, '...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
https://fedoraproject.org/wiki/Common...
: CommonBugs
Depends On:
Blocks: F13Beta/F13BetaBlocker
  Show dependency treegraph
 
Reported: 2010-03-01 08:34 EST by James Laska
Modified: 2013-09-02 02:45 EDT (History)
3 users (show)

See Also:
Fixed In Version: anaconda-13.37-1.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-27 00:53:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
/tmp/*log.tgz (70.93 KB, application/x-gzip)
2010-03-01 08:34 EST, James Laska
no flags Details

  None (edit)
Description James Laska 2010-03-01 08:34:26 EST
Created attachment 397067 [details]
/tmp/*log.tgz

Description of problem:


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

How reproducible:
 * 1 out of 1 attempts on *bare* metal (not virt)

Steps to Reproduce:
1. Follow instructions at https://fedoraproject.org/wiki/QA/TestCases/InstallSourceCdrom

 
Actual results:

[anaconda.log]
08:38:20,984 INFO anaconda: switching from media #1 to #2 for Packages/system-config-lvm-1.1.12-2.fc13.noarch.rpm
08:38:25,894 DEBUG anaconda: isys.py:umount()- going to unmount /mnt/source, removeDir = False

[storage.log]
08:38:25,893 DEBUG storage: found OpticalDevice instance (0x7f9d03611790) --
  name = sr0  status = True  parents = []
  kids = 0
  id = 4
  uuid = None  format = <storage.formats.fs.Iso9660FS object at 0x7f9d03611810>  size = 691.609375
  major = 11  minor = 0  exists = True
  sysfs path = /devices/pci0000:00/0000:00:06.0/host0/target0:0:0/0:0:0:0/block/sr0  partedDevice = <parted.device.Device object at 0x7f9d03611850>
  target size = 0  path = /dev/sr0
  format args = []
08:38:26,000 DEBUG storage:                     OpticalDevice.eject: sr0 ; status: True ;
08:38:26,005 DEBUG storage:                      OpticalDevice.teardown: sr0 ; status: True ;
08:38:26,112 WARNING storage: error ejecting cdrom sr0: (5, 'Input/output error')

Expected results:

Ejected disc

Additional info:
 * See attached log files

-rw-r--r-- root/root     31466 2010-03-01 08:39 tmp/X.log
-rw-r--r-- root/root     13278 2010-03-01 08:38 tmp/anaconda.log
-rw-r--r-- root/root     57716 2010-03-01 08:38 tmp/program.log
-rw-r--r-- root/root    183168 2010-03-01 08:38 tmp/storage.log
-rw-r--r-- root/root     80675 2010-03-01 08:39 tmp/syslog
-rw-r--r-- root/root    136712 2010-03-01 08:22 tmp/yum.log
Comment 1 James Laska 2010-03-01 08:35:53 EST
= Additional information =

From tty2, I can successfully eject the disc by typing: 

# eject /dev/cdrom
Comment 2 James Laska 2010-03-01 08:39:47 EST
= Tested workaround =
1) change to tty2
2) type: eject /dev/cdrom
3) insert next disc
4) type: mount -o ro /dev/cdrom /mnt/source
5) Return to tty6
6) Select OK to proceed with install

NOTE: step#4 was required, for some reason anaconda wouldn't continue the install unless I manually mounted the next ISO
Comment 3 Chris Lumens 2010-03-01 18:03:22 EST
What about if you flip to tty2 and instead:

PYTHONPATH=/usr/lib/anaconda python
>>> import _isys
>>> import os
>>> fd = os.open("/dev/sr0", os.RD_ONLY|os.NONBLOCK)
>>> _isys.ejectcdrom(fd)
Comment 4 James Laska 2010-03-02 09:02:58 EST
Figures, when retesting ... the problem did not occur.  I'll continue testing ...
Comment 5 James Laska 2010-03-02 09:54:53 EST
Reproduced, the problem surfaces only when you mediacheck the disc in loader.  The suggestion in comment#3 does not resolve the issue.

>>> _isys.ejectcdrom(fd) 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: (5, 'Input/output error')
Comment 6 Chris Lumens 2010-03-02 10:04:03 EST
Well, the point of the suggestion in comment #3 was to isolate that it was the same code anaconda's using that causes the problem without involving all of anaconda.
Comment 7 James Laska 2010-03-02 10:29:04 EST
Moving to F13Beta per point#3 of the Beta release criteria (https://fedoraproject.org/wiki/Fedora_13_Beta_Release_Criteria#Beta_Release_Requirements)
Comment 8 James Laska 2010-03-02 10:33:15 EST
Documented known issue and workaround for Alpha users at https://fedoraproject.org/wiki/Common_F13_bugs#failure-to-eject-cdrom
Comment 9 Hans de Goede 2010-03-08 05:48:00 EST
James,

I've taken a quick look at what the eject command does differently,
Can you try some python code on tty2 again, but this time this one:

PYTHONPATH=/usr/lib/anaconda python
>>> import _isys
>>> import os
>>> fd = os.open("/dev/sr0", os.O_RDWR|os.O_NONBLOCK)
>>> _isys.ejectcdrom(fd)    

And can you also run eject in verbose mode:
eject -v /dev/sr0

Thanks,

Hans
Comment 10 Chris Lumens 2010-03-09 09:15:27 EST
Hans - I already asked him to do that.  Please see comment #3 and comment #5.
Comment 11 Hans de Goede 2010-03-15 09:13:05 EDT
(In reply to comment #10)
> Hans - I already asked him to do that.  Please see comment #3 and comment #5.    

Chris,

Look closer:
1) My python code has other open flags (the same as the eject binary uses)
2) The eject command I gave has a "-v"

James,

Could you please provide the info I requested in comment #9. Note that it would be good to have the output of both when booted with and without mediacheck.

Thanks,

Hans
Comment 12 James Laska 2010-03-15 11:05:13 EDT
(In reply to comment #11)
> (In reply to comment #10)
> > Hans - I already asked him to do that.  Please see comment #3 and comment #5.    
> 
> Chris,
> 
> Look closer:
> 1) My python code has other open flags (the same as the eject binary uses)
> 2) The eject command I gave has a "-v"
> 
> James,
> 
> Could you please provide the info I requested in comment #9. Note that it would
> be good to have the output of both when booted with and without mediacheck.

Due to further hal-ectomy changes during the F-13-Alpha release process, the bits released as F-13-Alpha no longer have the 'eject' binary available.

I have copied the /usr/sbin/eject binary from the F13 eject package and run it on the system.

= with mediacheck =

# eject -v -v -v /dev/cdrom 
/tmp/eject: device name is `/dev/cdrom'
/tmp/eject: expanded name is `/dev/cdrom'
/tmp/eject: `/dev/cdrom' is a link to `/dev/sr0'
/tmp/eject: `/dev/sr0' is mounted at `/mnt/source'
/tmp/eject: checking if device "/dev/sr0" has a removable or hotpluggable flag
/tmp/eject: unmounting device `/dev/sr0' from `/mnt/source'
/tmp/eject: `/dev/sr0' is not a multipartition device
/tmp/eject: trying to eject `/dev/sr0' using CD-ROM eject command
/tmp/eject: CD-ROM eject command failed
/tmp/eject: trying to eject `/dev/sr0' using SCSI commands
/tmp/eject: SCSI eject succeeded


= without mediacheck =

# eject -v -v -v /dev/cdrom 
/tmp/eject: device name is `/dev/cdrom'
/tmp/eject: expanded name is `/dev/cdrom'
/tmp/eject: `/dev/cdrom' is a link to `/dev/sr0'
/tmp/eject: `/dev/sr0' is not mounted
/tmp/eject: unable to open /etc/fstab: No such file or directory
/tmp/eject: checking if device "/dev/sr0" has a removable or hotpluggable flag
/tmp/eject: `/dev/sr0' is not a multipartition device
/tmp/eject: trying to eject `/dev/sr0' using CD-ROM eject command
/tmp/eject: CD-ROM eject command succeeded
Comment 13 Hans de Goede 2010-03-16 06:21:41 EDT
Moving this over to pjones as discussed on irc.
Comment 14 James Laska 2010-03-25 09:15:16 EDT
Retested and confirmed the reported behavior remains present in F-13-Beta-TC1
Comment 15 Fedora Update System 2010-03-26 23:26:14 EDT
anaconda-13.37-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/anaconda-13.37-1.fc13
Comment 16 Fedora Update System 2010-03-27 00:53:00 EDT
anaconda-13.37-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

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