X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fupstart%2Fceph-mon-all-starter.conf;fp=src%2Fceph%2Fsrc%2Fupstart%2Fceph-mon-all-starter.conf;h=9b9c8199cc64f2f54a79363d1b1f0a79ad31c363;hb=812ff6ca9fcd3e629e49d4328905f33eee8ca3f5;hp=0000000000000000000000000000000000000000;hpb=15280273faafb77777eab341909a3f495cf248d9;p=stor4nfv.git diff --git a/src/ceph/src/upstart/ceph-mon-all-starter.conf b/src/ceph/src/upstart/ceph-mon-all-starter.conf new file mode 100644 index 0000000..9b9c819 --- /dev/null +++ b/src/ceph/src/upstart/ceph-mon-all-starter.conf @@ -0,0 +1,19 @@ +description "Ceph MON (start all instances)" + +start on starting ceph-mon-all + +task + +script + set -e + # TODO what's the valid charset for cluster names and mon ids? + find -L /var/lib/ceph/mon/ -mindepth 1 -maxdepth 1 -regextype posix-egrep -regex '.*/[A-Za-z0-9]+-[A-Za-z0-9._-]+' -printf '%P\n' \ + | while read f; do + if [ -e "/var/lib/ceph/mon/$f/done" ] && [ -e "/var/lib/ceph/mon/$f/upstart" ] && [ ! -e "/var/lib/ceph/mon/$f/sysvinit" ]; then + cluster="${f%%-*}" + id="${f#*-}" + + initctl emit ceph-mon cluster="$cluster" id="$id" + fi + done +end script