Bug 239002 - Eject command
Summary: Eject command
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda
Version: 5.0
Hardware: All
OS: Linux
medium
urgent
Target Milestone: ---
: ---
Assignee: Chris Lumens
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-05-04 12:44 UTC by Ian Nicholls
Modified: 2009-01-14 18:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-04 15:03:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ian Nicholls 2007-05-04 12:44:24 UTC
In dispatch.py (version not sure but RHEL5/CentOS5) order is 

   ("methodcomplete", doMethodComplete, ),
    ("dopostaction", doPostAction, ),

It was previously up until the RHEL 5 beta

    ("dopostaction", doPostAction, ),
    ("methodcomplete", doMethodComplete, ),

This means the cd is ejected before the %post section is run meaning there is no
access to any files on the CD!!

Comment 1 Chris Lumens 2007-05-04 15:03:13 UTC
This will be fixed in rawhide and in a future update release of RHEL5.  Thanks
for the bug report.

Comment 2 Edouard Bourguignon 2008-02-28 08:48:05 UTC
is it now fixed? I've just looked inside the dispatch.py and dopostaction() is
still after methodcomplete()

Comment 3 Chris Lumens 2008-02-28 15:22:48 UTC
This will be fixed in RHEL5.2.

Comment 4 Edouard Bourguignon 2008-02-29 07:55:14 UTC
thanks for the information
I will patch and rebuild anaconda until then.

Comment 5 Florin Malita 2008-08-18 19:18:43 UTC
The issue is still present in RHEL5.2. What's going on?

Comment 6 Edouard Bourguignon 2008-08-19 06:36:28 UTC
It seems that the doMethodComplete function checks if the ks option was among the boot parameters and only ejects the CD/DVD if anaconda is not kickstarted.

In installmethod.py:

# This handles any cleanup needed for the method.  It occurs *very* late
# and is mainly used for unmounting media and ejecting the CD.  If we're on
# a kickstart install, don't eject the CD since there's a command to do that
# if the user wants.
def doMethodComplete(anaconda):
    anaconda.method.filesDone()

    if not anaconda.isKickstart:
        anaconda.method.ejectCD()

I haven't tried yet.

Comment 7 Florin Malita 2008-08-19 15:25:01 UTC
OK, I should have noticed this bug is related strictly to the CD *eject*. My issue is with the unmounting /mnt/source before %post (performed unconditionally in filesDone()).

While it is obviously possible to remount, it's an unnecessary hassle when dealing with media-agnostic scripts (we need to support CDROM & NFS kickstarts). It's actually easier to keep the mount point busy and cause the umount command to fail, but I would rather have a clean solution instead of playing such games with anaconda.

Is there any good reason for unmounting /mnt/source before %post?


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