X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fupstart%2Fceph-rbd-mirror.conf;fp=src%2Fceph%2Fsrc%2Fupstart%2Fceph-rbd-mirror.conf;h=a9901113c0e15109ee780c4d180943f697be637a;hb=812ff6ca9fcd3e629e49d4328905f33eee8ca3f5;hp=0000000000000000000000000000000000000000;hpb=15280273faafb77777eab341909a3f495cf248d9;p=stor4nfv.git diff --git a/src/ceph/src/upstart/ceph-rbd-mirror.conf b/src/ceph/src/upstart/ceph-rbd-mirror.conf new file mode 100644 index 0000000..a990111 --- /dev/null +++ b/src/ceph/src/upstart/ceph-rbd-mirror.conf @@ -0,0 +1,26 @@ +description "Ceph rbd mirror" + +start on ceph-rbd-mirror +stop on runlevel [!2345] or stopping ceph-rbd-mirror-all + +respawn +respawn limit 3 1800 + +limit nofile 8096 65536 + +pre-start script + set -e + test -x /usr/bin/rbd-mirror || { stop; exit 0; } + test -d "/var/lib/ceph/rbd-mirror/${cluster:-ceph}-$id" || { stop; exit 0; } + + install -d -m0770 -o ceph -g ceph /var/run/ceph +end script + +instance ${cluster:-ceph}/$id +export cluster +export id + +# this breaks oneiric +#usage "cluster = name of cluster (defaults to 'ceph'); id = instance id" + +exec /usr/bin/rbd-mirror --cluster="${cluster:-ceph}" --id "$id" -f --setuser ceph --setgroup ceph