Skip to content

Commit 9b9119c

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

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

scripts/rook.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ 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 --container=copy-bins
26+
kubectl -n rook-ceph logs -l app=rook-ceph-osd-prepare --tail=-1 --all-containers
2627
kubectl -n rook-ceph get CephClusters -oyaml
2728
kubectl -n rook-ceph get CephFilesystems -oyaml
2829
kubectl -n rook-ceph get CephBlockPools -oyaml
@@ -153,6 +154,11 @@ function check_ceph_cluster_health() {
153154
CEPH_STATE=$(kubectl_retry -n rook-ceph get cephclusters -o jsonpath='{.items[0].status.state}')
154155
CEPH_HEALTH=$(kubectl_retry -n rook-ceph get cephclusters -o jsonpath='{.items[0].status.ceph.health}')
155156
echo "Checking CEPH cluster state: [$CEPH_STATE]"
157+
158+
# FIXME: extra debugging because "rbd pool stats" hangs (OSDs unavailable)
159+
kubectl -n rook-ceph logs -l app=rook-ceph-osd-prepare --tail=-1 --container=copy-bins
160+
kubectl -n rook-ceph logs -l app=rook-ceph-osd-prepare --all-containers --tail=-1
161+
156162
if [ "$CEPH_STATE" = "Created" ]; then
157163
if [ "$CEPH_HEALTH" = "HEALTH_OK" ]; then
158164
echo "Creating CEPH cluster is done. [$CEPH_HEALTH]"
@@ -238,6 +244,10 @@ function check_rbd_stat() {
238244
continue
239245
}
240246

247+
# FIXME: extra debugging because "rbd pool stats" hangs (OSDs unavailable)
248+
kubectl -n rook-ceph logs -l app=rook-ceph-osd-prepare --tail=-1 --container=copy-bins
249+
kubectl -n rook-ceph logs -l app=rook-ceph-osd-prepare --all-containers --tail=-1
250+
241251
if kubectl_retry exec -n rook-ceph "$TOOLBOX_POD" -it -- rbd pool stats "$RBD_POOL_NAME" &>/dev/null; then
242252
echo "RBD ($RBD_POOL_NAME) is successfully created..."
243253
break

0 commit comments

Comments
 (0)