A Proposal to deal with groups

Saravanan Shanmugham (sarvi) sarvi at cisco.com
Fri Jul 24 20:53:17 BST 2009


Responses inline 

-----Original Message-----
From: Matthias Urlichs [mailto:smurf at smurf.noris.de] 
Sent: Friday, July 24, 2009 12:40 PM
To: Saravanan Shanmugham (sarvi)
Cc: Scott James Remnant; Upstart Development
Subject: Re: A Proposal to deal with groups
Importance: High

Hi,

Saravanan Shanmugham (sarvi):
>     Use case 1: We need to group jobs to be able to operate on them as
a
> set.   
>           For us there are a group of processes that may need to be 
> restarted when one or more "critical processes" crash/restart. What 
> constitutes a "critical processes" as well as what contitutes the 
> group that needs restarting, may change over time as one or more 
> packages in the system are upgraded/downgraded or added/deleted.
> 
That should be handled with dependencies. I.e., if mysqld crashes,
upstart should restart all process (Apache, spamassassin, ...) which
depend on it.

Sarvi: 
   I presume because Apache and spamassassin jobs are written as
      while mysqld
   
   May be this is then a question on the behaviour of while.  I am
thinking that when Apache flaps as in crash/restarts but its goal hasn't
changed, that shouldn't affect apache or spamassissin. We atleast need
to be able to differentiate between mysqld stopping and mysql flaping
due to crash. During a crash/restart of mysqld , not everyone who has a
"while mysqld" would want a stop/restart. 


>      Use case 2: a package may have 10 jobs as part of the package.
> Before I remove the package I need to be able to stop all jobs 
> associated with the package. Yes we can try to keep a list of all jobs

> in the package. But this is also a case where concept of group could 
> help me keep it simple.
> 
Let's say the package isn't removed, but upgraded.

Sarvi:
During theupgrade, I would like to stop all the jobs associated with
that package. Then do the upgrade. And then let the new packages come up
as needed based on the current configuration of the system.



How would you remember which jobs have been running, so that you can
restart appropriately? Tell upstart to save the group members' state,
stop the group, then restore the state afterwards?

> -----Original Message-----
> From: Scott James Remnant [mailto:scott at netsplit.com] [ fullquote ]

Umm, we all got that part already ...

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |
smurf at smurf.noris.de
Disclaimer: The quote was selected randomly. Really. |
http://smurf.noris.de
v4sw7$Yhw6+8ln7ma7u7L!wl7DUi2e6t3TMWb8HAGen6g3a4s6Mr1p-3/-6
hackerkey.com
 - -
By doing just a little every day, you can gradually let the task
completely overwhelm you.



More information about the upstart-devel mailing list