[Pacemaker] crm and sudo

Justin Burket justin.burket at noaa.gov
Mon Sep 27 16:50:21 UTC 2010


 Hi,

I'm just getting started using pacemaker and the crm shell but ran into
a problem using crm via sudo.  Ignore the complaints about no stonith
resources, like I said, i'm just getting started :)


`--> sudo crm configure
crm(live)configure# property stonith-enabled=true
crm(live)configure# commit
crm_verify[4677]: 2010/09/27_16:38:27 ERROR: unpack_resources: Resource
start-up disabled since no STONITH resources have been defined
crm_verify[4677]: 2010/09/27_16:38:27 ERROR: unpack_resources: Either
configure some or disable STONITH with the stonith-enabled option
crm_verify[4677]: 2010/09/27_16:38:27 ERROR: unpack_resources: NOTE:
Clusters with shared data need STONITH to ensure data integrity
Errors found during check: config not valid
Do you still want to commit? y
--norc: no such option: noprofile
ERROR: creating tmp shadow __crmshell.4646 failed

However, if I simulate a login shell for root with "sudo -i" it works
just fine.
`--> sudo -i crm configure
crm(live)configure# property stonith-enabled=true
crm(live)configure# commit
crm_verify[4715]: 2010/09/27_16:39:18 ERROR: unpack_resources: Resource
start-up disabled since no STONITH resources have been defined
crm_verify[4715]: 2010/09/27_16:39:18 ERROR: unpack_resources: Either
configure some or disable STONITH with the stonith-enabled option
crm_verify[4715]: 2010/09/27_16:39:18 ERROR: unpack_resources: NOTE:
Clusters with shared data need STONITH to ensure data integrity
Errors found during check: config not valid
Do you still want to commit? y
crm(live)configure#

I poked around the archives and found a similar issue posted by Marco
van Putten on 25 Apr 2010.  I suppose that makes this an "me too!"
post.  My shell is zsh as my regular user and bash as the root user. 
Looking at Marco's earlier problem I'm wondering if perhaps the users
shell is being called with an option it doesn't support; namely
"--noprofile".  Running with "sudo -i" will put the root shell into play
which will support "noprofile" as by default it's /bin/bash.

This going to be a larger issue for Ubuntu users are we typically don't
have a root password set and do most everything via sudo.

Thanks,
Justin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: justin_burket.vcf
Type: text/x-vcard
Size: 271 bytes
Desc: not available
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20100927/bbc13377/attachment.vcf>


More information about the Pacemaker mailing list