Modify

Ticket #1000 (closed defect: wontfix)

Opened 12 years ago

Last modified 12 years ago

Upstart services cannot be enabled/disabled

Reported by: Joe Digilio <[email protected]…> Owned by: desai
Priority: major Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Cc:

Description

Enabling/disabling an upstart service at boot time is currently not possible in Bcfg2. Upstart does not provide an easy way to do this. But there are two ways I know of to disable an upstart service:

  1. change the "start on" line in /etc/init/<service>.conf
  2. mv /etc/init/<service>.conf /etc/init/<service>.conf.disabled
  3. rm /etc/init/<service>.conf

It seems like the best way to do this would be method 2. Upstart.py would need to do something like this to disable a service:

  1. Tell the client to rename /etc/init/<service>.conf to a known name, eg /etc/init/<service>.conf.disabled-by-bcfg2
  2. Insert into the Bundle:
    <BoundPath name="/etc/init/<service>.conf" type="ignore"/>
    <BoundPath name="/etc/init/<service>.conf.disabled-by-bcfg2" type="ignore"/>
    

Maybe it would be better for the <service>.conf Path entry to be of type "nonexistent"? Of course we would need to ensure the rename occurs first.

Thoughts?

Attachments

Change History

comment:1 Changed 12 years ago by solj

As far as I know, you enable/disable upstart services via the file contents of the .conf file. This is similar to the way launchd works. So, I think that doing method 1 is the choice which makes the most sense in this case. Removing/moving the file will also work, but I think it is more explicit if you simply manage that file's contents.

comment:2 Changed 12 years ago by solj

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

Closing for now. Reopen if you think we need to address this (I think upstart profiles would be the way to go).

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.