Ticket #846 (closed defect: fixed)
supervised service odd behavior
Reported by: | https://www.google.com/accounts/o8/id?id=AItOawntJ05hIp41Y-72vdUTMMBOIn4BrYWCDOE | Owned by: | desai |
---|---|---|---|
Priority: | critical | Milestone: | Bcfg2 1.1.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | supervised | Cc: | [email protected]…, [email protected]… |
Description
I have a bundle for controlling pbs_mom:
<Bundle name='torque-client' version='1.0'>
<Group name='compute-common'>
<ConfigFile? name='/var/spool/PBS/mom_priv/config'/> <ConfigFile? name='/var/spool/PBS/mom_priv/health2.pl' /> <ConfigFile? name='/var/spool/PBS/mom_priv/epilogue' /> <ConfigFile? name='/var/spool/PBS/pbs_environment'/> <ConfigFile? name='/var/spool/PBS/server_name'/> <ConfigFile? name='/etc/init.d/pbs_mom'/> <BoundDirectory? name='/var/spool/PBS' owner='root' group='root' perms='0755'/> <BoundDirectory? name='/var/spool/PBS/spool' owner='root' group='root' perms='1777'/> <BoundDirectory? name='/var/spool/PBS/undelivered' owner='root' group='root' perms='1777'/> <BoundDirectory? name='/var/spool/PBS/aux' owner='root' group='root' perms='0755'/> <BoundDirectory? name='/var/spool/PBS/checkpoint' owner='root' group='root' perms='0700' /> <BoundDirectory? name='/var/spool/PBS/mom_logs' owner='root' group='root' perms='0755' /> <BoundDirectory? name='/var/spool/PBS/mom_priv' owner='root' group='root' perms='0755' /> <BoundDirectory? name='/var/spool/PBS/mom_priv/jobs' owner='root' group='root' perms='0751' />
</Group> <Group name='nondev-node'>
<BoundService? name="pbs_mom" type="chkconfig" status="on" />
</Group> <Group name='dev-node'>
<BoundService? name="pbs_mom" type="chkconfig" status="off" />
</Group>
</Bundle>
If I add mode="supervised" to the "off" binding above, the service isn't enabled but the processes is actually started.
< pbs_mom 0:off 1:off 2:off 3:off 4:off 5:off 6:off
/sbin/service pbs_mom status
< Checking TORQUE Mom: ..dead
/sbin/service pbs_mom start
< Starting TORQUE Mom: ..done
/sbin/service pbs_mom status
< Checking TORQUE Mom: ..running
-Ed
Attachments
Change History
comment:3 in reply to: ↑ 1 Changed 13 years ago by https://www.google.com/accounts/o8/id?id=AItOawntJ05hIp41Y-72vdUTMMBOIn4BrYWCDOE
Replying to solj:
This appears to be intended behavior http://trac.mcs.anl.gov/projects/bcfg2/wiki/TrackingDevelopmentTrunk#ServiceChanges. Are you wanting mode='manual' instead?
As a side note, you can use wiki formatting to make the xml look is intended by using curly braces .
Thanks Solj. I was under the wrong impression that supervised meant that it enforced the status. In some instances it would be appropriate to enforce that a service is actually turned off.
How would you handle the situation where a service is disabled with chkconfig, and bcfg2 has a binding for the service to be off, but the actual process "pbs_mom" is running. Its like I need a "unprivileged" mode.
-Ed
comment:4 Changed 13 years ago by desai
I think that we need to fix the supervised mode to enforce service stops as well.
-nld
comment:5 Changed 13 years ago by somekool <[email protected]…>
- Priority changed from minor to critical
confirmed. this bug exist as far as 0.9.6 and most likely before....
supervised should restart status attribute and enforce service stops like desai mentioned in the previous comments.
there is also another bug here that cause supervised to be executed in ALL modes. including the dryrun -n
Changed 13 years ago by somekool <[email protected]…>
- Attachment bcfg2-action-always.patch added
patched!
Changed 13 years ago by somekool <[email protected]…>
- Attachment bcfg2-chkconfig.patch added
patched!
comment:6 Changed 13 years ago by somekool <[email protected]…>
the patch named bcfg2-action-always.patch is the wrong one. I uploaded by mistake.
my patch were applied on 0.9.6 but this file never changed really much. so it should work with 1.0.1 as well.
if anyone is interested by patched 0.9.6 rpm files. we made several fixes.
This appears to be intended behavior http://trac.mcs.anl.gov/projects/bcfg2/wiki/TrackingDevelopmentTrunk#ServiceChanges. Are you wanting mode='manual' instead?
As a side note, you can use wiki formatting to make the xml look is intended by using curly braces .