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