Merge "Start OSD only after marked as configured"
This commit is contained in:
@@ -746,6 +746,11 @@ daemon_is_running() {
|
|||||||
exit 1 # pid is something else" "" "okfail"
|
exit 1 # pid is something else" "" "okfail"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
osd_is_configured() {
|
||||||
|
# Flag .osd_configured is created once the OSD is configured by puppet
|
||||||
|
[ -f "/var/lib/ceph/osd/ceph-$1/.osd_configured" ]
|
||||||
|
}
|
||||||
|
|
||||||
stop_daemon() {
|
stop_daemon() {
|
||||||
name=$1
|
name=$1
|
||||||
daemon=$2
|
daemon=$2
|
||||||
@@ -979,6 +984,11 @@ for name in $what; do
|
|||||||
|
|
||||||
get_conf pid_file "$run_dir/$type.$id.pid" "pid file"
|
get_conf pid_file "$run_dir/$type.$id.pid" "pid file"
|
||||||
|
|
||||||
|
if [ "$type" = "osd" ] && ! osd_is_configured "$id"; then
|
||||||
|
log "$name" "INFO" "Skipping Ceph $name as it is not configured"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$command" = "start" -o "$command" = "onestart" ]; then
|
if [ "$command" = "start" -o "$command" = "onestart" ]; then
|
||||||
if [ -n "$pid_file" ]; then
|
if [ -n "$pid_file" ]; then
|
||||||
do_cmd "mkdir -p "`dirname $pid_file`
|
do_cmd "mkdir -p "`dirname $pid_file`
|
||||||
|
@@ -605,10 +605,10 @@ status ()
|
|||||||
result=`${CEPH_SCRIPT} status $target {LOCK_CEPH_MON_STATUS_FD}>&- {LOCK_CEPH_OSD_STATUS_FD}>&-`
|
result=`${CEPH_SCRIPT} status $target {LOCK_CEPH_MON_STATUS_FD}>&- {LOCK_CEPH_OSD_STATUS_FD}>&-`
|
||||||
RC=$?
|
RC=$?
|
||||||
if [ "$RC" -ne 0 ]; then
|
if [ "$RC" -ne 0 ]; then
|
||||||
erred_procs=`echo "$result" | sort | uniq | awk ' /not running|dead|failed/ {printf "%s ", $target}' | sed 's/://g' | sed 's/, $//g'`
|
erred_procs=`echo "$result" | sort | uniq | awk ' /not running|dead|failed/ {printf "%s ", $1}' | sed 's/://g' | sed 's/, $//g'`
|
||||||
hung_procs=`echo "$result" | sort | uniq | awk ' /hung/ {printf "%s ", $target}' | sed 's/://g' | sed 's/, $//g'`
|
hung_procs=`echo "$result" | sort | uniq | awk ' /hung/ {printf "%s ", $1}' | sed 's/://g' | sed 's/, $//g'`
|
||||||
blocked_ops_procs=`echo "$result" | sort | uniq | awk ' /blocked ops/ {printf "%s ", $target}' | sed 's/://g' | sed 's/, $//g'`
|
blocked_ops_procs=`echo "$result" | sort | uniq | awk ' /blocked ops/ {printf "%s ", $1}' | sed 's/://g' | sed 's/, $//g'`
|
||||||
stuck_peering_procs=`echo "$result" | sort | uniq | awk ' /stuck peering/ {printf "%s ", $target}' | sed 's/://g' | sed 's/, $//g'`
|
stuck_peering_procs=`echo "$result" | sort | uniq | awk ' /stuck peering/ {printf "%s ", $1}' | sed 's/://g' | sed 's/, $//g'`
|
||||||
invalid=0
|
invalid=0
|
||||||
host=`hostname`
|
host=`hostname`
|
||||||
if [[ "$system_type" == "All-in-one" ]] && [[ "$system_mode" != "simplex" ]]; then
|
if [[ "$system_type" == "All-in-one" ]] && [[ "$system_mode" != "simplex" ]]; then
|
||||||
|
Reference in New Issue
Block a user