Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / upstart / ceph-rbd-mirror-all-starter.conf
1 description "Ceph rbd-mirror (task to start all instances)"
2
3 start on starting ceph-rbd-mirror-all
4
5 task
6
7 script
8   set -e
9   # TODO what's the valid charset for cluster names and daemon ids?
10   find -L /var/lib/ceph/rbd-mirror/ -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/rbd-mirror/$f/done" ]; then
13         cluster="${f%%-*}"
14         id="${f#*-}"
15         initctl emit ceph-rbd-mirror cluster="$cluster" id="$id"
16     fi
17   done
18 end script