[Pacemaker] /.crm_help_index file (in system root aka /)

Simon Horman horms at verge.net.au
Tue Jul 13 23:46:09 EDT 2010


On Tue, Jul 13, 2010 at 08:47:47PM +0100, Maros Timko wrote:
> > Date: Tue, 13 Jul 2010 13:42:00 +0200
> > From: Lars Ellenberg <lars.ellenberg at linbit.com>
> > To: pacemaker at oss.clusterlabs.org
> > Subject: Re: [Pacemaker] /.crm_help_index file (in system root aka /)
> > Message-ID: <20100713114200.GC4254 at barkeeper1-xen.linbit>
> > Content-Type: text/plain; charset=iso-8859-1
> >
> > On Tue, Jul 13, 2010 at 12:12:12PM +0200, Raoul Bhatia [IPAX] wrote:
> >> hi,
> >>
> >> On 07/12/2010 05:36 PM, Lars Ellenberg wrote:
> >> > put some "( date ; env) >> /tmp/tmp.debug.log" into your script,
> >> > then we can determine if the crm shell assumes too much.
> >>
> >> i did some digging around and found that cron seems to set
> >> the correct environment. so i used "inotifywait -m /"
> >> to watch for changes to /:
> >>
> >> # tail -f /var/log/syslog &
> >> # inotifywait -m / | grep --color crm_ &
> >
> > are you aware of the grep option --line-buffered ?
> >
> >> please find a c/p from three of such events attached.
> >>
> >> it now seems to me that the drbd monitor action creates these files.
> >
> > Highly unlikely. No DRBD provided script calls the crm shell.
> >
> 
> The python crm scripts use os.getenv("HOME") to decide where to look
> for or store the history file. Some of the environments (cronjob or
> sudo) do have HOME set to "/".
> Try to prepend crm call with:
> export HOME=/root

How about using pwd.getpwuid(os.getuid())[5] if its non-NULL,
otherwise defaulting to something arbitrary like "/root".

On a related note, do the scripts always run as root?

Also, IIRC, Solaris uses "/" as root's home directory.
Not sure if it still does. Not sure if its relevant.





More information about the Pacemaker mailing list