Bug 239002 - Eject command
Eject command
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda (Show other bugs)
5.0
All Linux
medium Severity urgent
: ---
: ---
Assigned To: Chris Lumens
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-04 08:44 EDT by Ian Nicholls
Modified: 2009-01-14 13:52 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-04 11:03:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Nicholls 2007-05-04 08:44:24 EDT
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 11:03:13 EDT
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 03:48:05 EST
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 10:22:48 EST
This will be fixed in RHEL5.2.
Comment 4 Edouard Bourguignon 2008-02-29 02:55:14 EST
thanks for the information
I will patch and rebuild anaconda until then.
Comment 5 Florin Malita 2008-08-18 15:18:43 EDT
The issue is still present in RHEL5.2. What's going on?
Comment 6 Edouard Bourguignon 2008-08-19 02:36:28 EDT
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 11:25:01 EDT
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.