Bug 165770 - rm: cannot remove '/var/run/tog-pegasus/socket': Is a directory
Summary: rm: cannot remove '/var/run/tog-pegasus/socket': Is a directory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: tog-pegasus
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jason Vas Dias
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 156322
TreeView+ depends on / blocked
 
Reported: 2005-08-11 22:11 UTC by Ben Levenson
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHEA-2005-494
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-05 13:43:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2005:494 0 qe-ready SHIPPED_LIVE tog-pegasus enhancement update 2005-10-05 04:00:00 UTC

Description Ben Levenson 2005-08-11 22:11:50 UTC
Description of problem:
(filing against distribution -- we need a tog-pegasus component)
rc.sysinit gives the following error message during boot:
rm: cannot remove 'var/run/tog-pegasus/socket': Is a directory

Version-Release number of selected component (if applicable):
tog-pegasus-2.4.1-1
initscripts-7.93.20.EL-1

How reproducible:
100%

Steps to Reproduce:
1. install RHEL4-U2 candidate
2. boot system

Additional info:
I don't know anything about tog-pegasus, so I haven't really spent any time
debugging this.

Comment 1 Ben Levenson 2005-08-11 22:14:58 UTC
I noticed that most of the other *socket* files in /var/run don't live in
their own directory.  Is tog-pegasus going against convention here?

Comment 2 Jason Vas Dias 2005-08-12 19:14:53 UTC
Well, it looks like there are some exceptions built into rc.sysinit for this
(@ line 792):
---
# Clean up /var.  I'd use find, but /usr may not be mounted.
for afile in /var/lock/* /var/run/* ; do
        if [ -d "$afile" ]; then
           case "$afile" in
                */news|*/mon)   ;;
                */sudo)         rm -f $afile/*/* ;;
                */vmware)       rm -rf $afile/*/* ;;
                */samba)        rm -rf $afile/*/* ;;
                *)              rm -f $afile/* ;;
           esac
        else
           rm -f $afile
        fi
done
---

In future, it would be nice to have an exception in rc.sysinit for tog-pegasus.

I'll make tog-pegasus' initscript's 'stop' handler do a 
'rm -rf /var/run/tog-pegasus' 
for the next version (tog-pegasus-2.4.1-2+) - this is now in CVS.


Comment 3 Ben Levenson 2005-08-12 19:56:15 UTC
changed component to tog-pegasus.

Comment 4 Joe Orton 2005-08-13 17:08:10 UTC
That's a workaround more than a fix -- after an unclean shutdown (i.e. power
loss) the message will still appear on next boot.

Comment 9 Jason Vas Dias 2005-08-19 14:35:52 UTC
This is now fixed with latest tog-pegasus-2.4.1-2.rhel4 version :
cimserver no longer creates the /var/run/tog-pegasus/socket/ directory,
but puts its socket in /var/run/tog-pegasus .
It is RHEA-2005:494 that needs the respin (also for bug 165803).


Comment 12 Jason Vas Dias 2005-08-19 17:10:19 UTC
The new tog-pegasus release also fixes Bug 165803 and Bug 165880.
I think it is better to start out with the new tog-pegasus release
since it will be our first distribution of the package, but this is
up to PM.


Comment 14 Jason Vas Dias 2005-09-01 16:12:33 UTC
Yes, this issue may remain after upgrade or erase+install from
tog-pegasus-2.4.1-1 to the fixed tog-pegasus-2.4.1-2.rhel-4 release .

But after a clean install of tog-pegasus-2.4.1-2.rhel4+, as would occur
when RHEL-4 customers receive the tog-pegasus-2.4.1-2.rhel4 for the first
time through the RHN channels, this problem would not occur.

The problem is this: the tog-pegasus-2.4.1-1 release did not list the 
/var/run/tog-pegasus/socket directory in its %files list (it did not
Provide: it), so it was not removed when tog-pegasus-2.4.1-1 was 
erased.

This problem was fixed with tog-pegasus-2.4.1-2.rhel4+: the package now
lists /var/run/tog-pegasus in its %files list, and the directory would
be removed when erasing tog-pegasus-2.4.1-2+ .

Because it is VERY bad practice for any RPM scriplet to do a 'rm -rf' of
ANY directory, as did tog-pegasus-2.4.1-1 with the /opt/tog-pegasus
directory (but not /var/run/tog-pegasus/socket!) we do not want to 
make tog-pegasus-2.4.1-2 do this during install / upgrade - who knows
what some user might have put in this directory?

This issue was inherited from the upstream tog-pegasus release, which
still has this behaviour, though the tog-pegasus maintainers are 
committed to resolving it in subsequent releases.

So, I'm sorry - you'll need to 'rm -rf /var/run/tog-pegasus/socket' to prevent
this message occuring .

After this, all subsequent upgrades / installs will not result in the
message reappearing. 

Any user who clean installs to tog-pegasus-2.4.1-2+, as would all non-beta
customers, will not experience this problem.

Comment 15 Red Hat Bugzilla 2005-10-05 13:43:30 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2005-494.html



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