adjust monit for broken init script / ceph osds
This commit is contained in:
parent
4682ed9a3a
commit
36b23a4bd9
1 changed files with 15 additions and 2 deletions
|
@ -20,13 +20,26 @@ if echo $to_monitor | grep ^osd; then
|
|||
depends="${depends}, ${to_monitor}-whoami"
|
||||
osd="yes"
|
||||
osdid=$(echo $to_monitor | cut -d. -f2)
|
||||
fi
|
||||
cat > "$conf" <<EOF
|
||||
# Generated by $0
|
||||
check process ${to_monitor} with pidfile /var/run/ceph/${to_monitor}.pid
|
||||
start program = "/usr/bin/ceph-osd -i ${osdid} --pid-file /var/run/ceph/osd.${osdid}.pid -c /etc/ceph/ceph.conf --cluster ceph --setuser ceph --setgroup ceph" with timeout 3600 seconds
|
||||
|
||||
EOF
|
||||
|
||||
cat > "$conf" <<EOF
|
||||
else
|
||||
# monitor, mgr
|
||||
cat > "$conf" <<EOF
|
||||
# Generated by $0
|
||||
check process ${to_monitor} with pidfile /var/run/ceph/${to_monitor}.pid
|
||||
start program = "/etc/init.d/ceph start ${to_monitor}" with timeout 60 seconds
|
||||
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
# final clause same for both
|
||||
cat >> "$conf" <<EOF
|
||||
stop program = "/etc/init.d/ceph stop ${to_monitor}"
|
||||
|
||||
group ceph
|
||||
|
|
Loading…
Reference in a new issue