]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
upstart: simplify start; allow group stop via an abstract job
authorSage Weil <sage@inktank.com>
Sat, 2 Jun 2012 22:19:28 +0000 (15:19 -0700)
committerSage Weil <sage@inktank.com>
Sat, 2 Jun 2012 22:19:28 +0000 (15:19 -0700)
commit3764ca6115fe7c0bf8dcba448af012625ea5abc3
tree7362c7fcc400eac62e2c57d01e310e1f7ee33c3b
parentf871d83785a7b64de829a7d6d892847cea6bd24f
upstart: simplify start; allow group stop via an abstract job

Use a 'ceph-mds' or 'ceph-mon' event to start instances instead of
explicitly calling start.  This avoids the ugly is-this-already-running
check.  [Thanks Guilhem Lettron for that!]

Make the -all job abstract (which means it stays started and can be
stopped).  Trigger a helper task (-all-starter) to trigger instance
start.  Make instances stop with the -all task.  This allows you to do

 start ceph-mds-all
 stop ceph-mds-all
 start ceph-mds id=foo
 start ceph-mds-all
 stop ceph-mds id=bar
 stop ceph-mds-all

but not

 start ceph-mds id=foo
 stop ceph-mds-all

because ceph-mds-all isn't running.  Not quite as flexible in sysvinit in
that regard, but good enough for me.

Fixes: #2414
Signed-off-by: Sage Weil <sage@inktank.com>
src/Makefile.am
src/upstart/ceph-mds-all-starter.conf [new file with mode: 0644]
src/upstart/ceph-mds-all.conf
src/upstart/ceph-mds.conf
src/upstart/ceph-mon-all-starter.conf [new file with mode: 0644]
src/upstart/ceph-mon-all.conf
src/upstart/ceph-mon.conf