Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / upstart / ceph-mgr-all-starter.conf
1 description "Ceph Manager (start all instances)"
2
3 start on starting ceph-mgr-all
4
5 task
6
7 script
8   set -e
9   find -L /var/lib/ceph/mgr/ -mindepth 1 -maxdepth 1 -regextype posix-egrep -regex '.*/[A-Za-z0-9]+-[A-Za-z0-9._-]+' -printf '%P\n' \
10   | while read f; do
11     if [ -e "/var/lib/ceph/mgr/$f/done" ] && [ -e "/var/lib/ceph/mgr/$f/upstart" ] && [ ! -e "/var/lib/ceph/mgr/$f/sysvinit" ]; then
12         cluster="${f%%-*}"
13         id="${f#*-}"
14         initctl emit ceph-mgr cluster="$cluster" id="$id"
15     fi
16   done
17 end script