Modify

Ticket #846 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

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

bcfg2-action-always.patch (3.3 KB) - added by somekool <[email protected]…> 12 years ago.
patched!
bcfg2-chkconfig.patch (1.3 KB) - added by somekool <[email protected]…> 12 years ago.
patched!

Change History

comment:1 follow-up: ↓ 3 Changed 12 years ago by 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 .

comment:2 Changed 12 years ago by solj

comment:3 in reply to: ↑ 1 Changed 12 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 12 years ago by desai

I think that we need to fix the supervised mode to enforce service stops as well.

-nld

comment:5 Changed 12 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 12 years ago by somekool <[email protected]…>

patched!

Changed 12 years ago by somekool <[email protected]…>

patched!

comment:6 Changed 12 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.

comment:7 Changed 12 years ago by solj

  • Status changed from new to closed
  • Resolution set to fixed

Chkconfig patch is added in [5859]. Thanks for the patch!

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.