Skip to content

Commit 8d370a6

Browse files
committed
add some debug logs
Signed-off-by: Yuji Ito <llamerada.jp@gmail.com>
1 parent 2348c50 commit 8d370a6

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

test/e2e/Makefile

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,28 @@ do-test-multik8s: $(GINKGO)
329329
$(GINKGO) --fail-fast -v $(GINKGO_FLAGS) multik8s; \
330330
if [ "$$?" -ne 0 ]; then \
331331
echo "Controller logs for $(MINIKUBE_PROFILE_PRIMARY):"; \
332-
$${KUBECTL_PRIMARY} logs --tail 100 -n $(CEPH_CLUSTER1_NAMESPACE) -l app.kubernetes.io/name=mantle -c mantle; \
332+
$${KUBECTL_PRIMARY} logs --tail 1000 -n $(CEPH_CLUSTER1_NAMESPACE) -l app.kubernetes.io/name=mantle -c mantle; \
333333
echo ""; \
334334
echo "Controller logs for $(MINIKUBE_PROFILE_SECONDARY):"; \
335-
$${KUBECTL_SECONDARY} logs --tail 100 -n $(CEPH_CLUSTER1_NAMESPACE) -l app.kubernetes.io/name=mantle -c mantle; \
335+
$${KUBECTL_SECONDARY} logs --tail 1000 -n $(CEPH_CLUSTER1_NAMESPACE) -l app.kubernetes.io/name=mantle -c mantle; \
336+
echo ""; \
337+
echo "Primary MBs"; \
338+
$${KUBECTL_PRIMARY} get mantlebackups -A -o yaml; \
339+
echo ""; \
340+
echo "Secondary MBs"; \
341+
$${KUBECTL_SECONDARY} get mantlebackups -A -o yaml; \
342+
echo ""; \
343+
echo "Primary PVCs"; \
344+
$${KUBECTL_PRIMARY} get pvc -A -o yaml; \
345+
echo ""; \
346+
echo "Secondary PVCs"; \
347+
$${KUBECTL_SECONDARY} get pvc -A -o yaml; \
348+
echo ""; \
349+
echo "Primary PVs"; \
350+
$${KUBECTL_PRIMARY} get pv -o yaml; \
351+
echo ""; \
352+
echo "Secondary PVs"; \
353+
$${KUBECTL_SECONDARY} get pv -o yaml; \
336354
# Explicitly fail the test to mark the CI job as failed. \
337355
exit 1; \
338356
fi

test/e2e/multik8s/testutil/util.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ func CreatePod(cluster int, namespace, podName, pvcName string) {
468468
}
469469

470470
func CreatePVC(ctx SpecContext, cluster int, namespace, name string) {
471+
GinkgoHelper()
471472
Eventually(ctx, func() error {
472473
return applyPVCTemplate(cluster, namespace, name)
473474
}).Should(Succeed())
@@ -493,15 +494,15 @@ func WriteRandomDataToPV(ctx SpecContext, cluster int, namespace, pvcName string
493494

494495
func CreateMantleBackup(cluster int, namespace, pvcName, backupName string) {
495496
GinkgoHelper()
496-
By("creating a MantleBackup object")
497+
By(fmt.Sprintf("creating a MantleBackup object @%d:%s/%s", cluster, namespace, backupName))
497498
Eventually(func() error {
498499
return ApplyMantleBackupTemplate(cluster, namespace, pvcName, backupName)
499500
}).Should(Succeed())
500501
}
501502

502503
func CreateMantleBackupConfig(cluster int, namespace, pvcName, backupConfigName string) {
503504
GinkgoHelper()
504-
By("creating a MantleBackupConfig object")
505+
By(fmt.Sprintf("creating a MantleBackupConfig object @%d:%s/%s for %s", cluster, namespace, backupConfigName, pvcName))
505506
Eventually(func() error {
506507
return ApplyMantleBackupConfigTemplate(cluster, namespace, pvcName, backupConfigName)
507508
}).Should(Succeed())

0 commit comments

Comments
 (0)