Skip to content

Commit

Permalink
Merge pull request rook#55 from subhamkrai/remove-unnecesary-warning
Browse files Browse the repository at this point in the history
Remove unnecesary warning
  • Loading branch information
subhamkrai authored Sep 7, 2022
2 parents 60ed18f + a20f76f commit 27c0fc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kubectl-rook-ceph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function run_cluster_health() {

function check_mon_pods_nodes() {
info_msg " Checking if at least three mon pods are running on different nodes"
mon_unique_node_count=$(KUBECTL_NS_CLUSTER get pod | grep mon | grep -v canary | awk '{print $2}' | sort | uniq | wc -l)
mon_unique_node_count=$(KUBECTL_NS_CLUSTER get pod -o wide | grep mon | grep -v canary | awk '{print $7}' | sort | uniq | wc -l)
if [ "$mon_unique_node_count" -lt 3 ]; then
warn_msg " At least three mon pods should running on different nodes"
fi
Expand All @@ -318,7 +318,7 @@ function check_mon_pods_nodes() {

function check_mon_quorum() {
info_msg " Checking mon quorum and ceph health details"
ceph_health_details=$(KUBECTL_NS_OPERATOR exec deploy/rook-ceph-operator -- ceph health detail --conf="$CEPH_CONF_PATH")
ceph_health_details=$(run_ceph_command health detail)
if [[ "$ceph_health_details" = "HEALTH_OK" ]]; then
echo -e "$ceph_health_details"
elif [[ "$ceph_health_details" =~ "HEALTH_WARN" ]]; then
Expand All @@ -330,7 +330,7 @@ function check_mon_quorum() {

function check_osd_pod_count_and_nodes() {
info_msg " Checking if at least three osd pods are running on different nodes"
osd_unique_node_count=$(KUBECTL_NS_CLUSTER get pod | grep osd | grep -v prepare | awk '{print $2}' | sort | uniq | wc -l)
osd_unique_node_count=$(KUBECTL_NS_CLUSTER get pod -o wide | grep osd | grep -v prepare | awk '{print $7}' | sort | uniq | wc -l)
if [ "$osd_unique_node_count" -lt 3 ]; then
warn_msg " At least three osd pods should running on different nodes"
fi
Expand All @@ -354,7 +354,7 @@ function check_all_pods_status() {

function check_pg_are_active_clean() {
info_msg " checking placement group status"
pg_state=$(KUBECTL_NS_OPERATOR exec deploy/rook-ceph-operator -- ceph pg stat --conf="$CEPH_CONF_PATH")
pg_state=$(run_ceph_command pg stat)
pg_state_code=$(echo "${pg_state}" | awk '{print $4}')
if [[ "$pg_state_code" = *"active+clean;"* ]]; then
info_msg " $pg_state"
Expand Down

0 comments on commit 27c0fc8

Please sign in to comment.