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"
|
||||
}
|
||||
|
||||
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() {
|
||||
name=$1
|
||||
daemon=$2
|
||||
@@ -979,6 +984,11 @@ for name in $what; do
|
||||
|
||||
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 [ -n "$pid_file" ]; then
|
||||
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}>&-`
|
||||
RC=$?
|
||||
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'`
|
||||
hung_procs=`echo "$result" | sort | uniq | awk ' /hung/ {printf "%s ", $target}' | 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'`
|
||||
stuck_peering_procs=`echo "$result" | sort | uniq | awk ' /stuck peering/ {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 ", $1}' | 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 ", $1}' | sed 's/://g' | sed 's/, $//g'`
|
||||
invalid=0
|
||||
host=`hostname`
|
||||
if [[ "$system_type" == "All-in-one" ]] && [[ "$system_mode" != "simplex" ]]; then
|
||||
|
Reference in New Issue
Block a user