Job attributes and Job files

Scott James Remnant scott at netsplit.com
Thu Jul 31 20:19:45 BST 2008


On Thu, 2008-07-31 at 10:26 -0700, Saravanan Shanmugham (sarvi) wrote:
 
> A job has many attributes like restartability, resource limitations,
> and I am sure this will grow over time.
>  
> Right now, once a job is defined the way to update it is to update the
> job file and Upstart will reload it.
>  
> I was wondering about the following questions, 
>  
> 1. When a job file gets updated and reloaded, how does it affect the
> behavior of existing instances of the job. Say I modified the
> restartability field and disable restarts. Will it affect the job
> instance that was started before the job file modification? How is the
> new job file, related to what used to be.
> 
Changes to the job definition do not affect existing instances of the
job, and will not affect new instances while there are running instances
with the old definition.

The rationale being that the changes may result in incompatibilities or
problems with the existing running instances.

For example:

  start foo INSTANCE=1
  start foo INSTANCE=2
# modify foo's definition and change post-stop script
  stop foo INSTANCE=2
	This will be stopped with the *OLD* post-stop script.
  start foo INSTANCE=3
	This will be started with the *OLD* definition.
  stop foo INSTANCE=3
	This will be stopped with the *OLD* post-stop script.
  stop foo INSTANCE=1
	There are now no more instances running, if you watch with
	--debug or dbus-monitor, you'll see the job definition change.
  start foo INSTANCE=4
	This is now started with the new definition.
  stop foo INSTANCE=4
	And stopped with the new post-stop script.

> 2. Would it make sense to have D-Bus client API change modify some of
> the attributes of a job or job instance in memory without modifying
> the job file on disk?
> 
This is most certainly planned.

In this circumstance, I had figured that if a job is registered over
D-Bus, it is up to the registrant to deal with serialising it to make
the job survive a reboot.

However I'm also willing to consider the ability to have Upstart
serialise it itself natively, which would permit online configuration
changes via D-Bus.

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/upstart-devel/attachments/20080731/7fc67b62/attachment.pgp 


More information about the upstart-devel mailing list