Skip to content

Commit a40f06c

Browse files
committed
[DEBUGGING] capture logs of ceph-ods-prepare Pods before running rbd command
1 parent cc0926e commit a40f06c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/rook.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function log_errors() {
2222
kubectl -n rook-ceph get events
2323
kubectl -n rook-ceph describe pods
2424
kubectl -n rook-ceph logs -l app=rook-ceph-operator --tail=-1
25-
kubectl -n rook-ceph logs -l app=rook-ceph-osd-prepare
25+
kubectl -n rook-ceph logs -l app=rook-ceph-osd-prepare --tail=-1 --all-containers
2626
kubectl -n rook-ceph get CephClusters -oyaml
2727
kubectl -n rook-ceph get CephFilesystems -oyaml
2828
kubectl -n rook-ceph get CephBlockPools -oyaml
@@ -153,6 +153,10 @@ function check_ceph_cluster_health() {
153153
CEPH_STATE=$(kubectl_retry -n rook-ceph get cephclusters -o jsonpath='{.items[0].status.state}')
154154
CEPH_HEALTH=$(kubectl_retry -n rook-ceph get cephclusters -o jsonpath='{.items[0].status.ceph.health}')
155155
echo "Checking CEPH cluster state: [$CEPH_STATE]"
156+
157+
# FIXME: extra debugging because "rbd pool stats" hangs (OSDs unavailable)
158+
kubectl -n rook-ceph logs -l app=rook-ceph-osd-prepare --all-containers --tail=-1
159+
156160
if [ "$CEPH_STATE" = "Created" ]; then
157161
if [ "$CEPH_HEALTH" = "HEALTH_OK" ]; then
158162
echo "Creating CEPH cluster is done. [$CEPH_HEALTH]"
@@ -238,6 +242,9 @@ function check_rbd_stat() {
238242
continue
239243
}
240244

245+
# FIXME: extra debugging because "rbd pool stats" hangs (OSDs unavailable)
246+
kubectl -n rook-ceph logs -l app=rook-ceph-osd-prepare --all-containers --tail=-1
247+
241248
if kubectl_retry exec -n rook-ceph "$TOOLBOX_POD" -it -- rbd pool stats "$RBD_POOL_NAME" &>/dev/null; then
242249
echo "RBD ($RBD_POOL_NAME) is successfully created..."
243250
break

0 commit comments

Comments
 (0)