Skip to content

Commit 4754790

Browse files
authored
Add more logging for missing processes in upgrade variations (#2087)
1 parent f8d84ca commit 4754790

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

e2e/test_operator_upgrades_variations/operator_upgrades_variations_test.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,21 @@ func performUpgrade(config testConfig, preUpgradeFunction func(cluster *fixtures
111111

112112
transactionSystemProcessGroups := make(map[fdbv1beta2.ProcessGroupID]fdbv1beta2.None)
113113
// Wait until the cluster is upgraded and fully reconciled.
114-
Expect(fdbCluster.WaitUntilWithForceReconcile(2, 1200, func(cluster *fdbv1beta2.FoundationDBCluster) bool {
114+
Expect(fdbCluster.WaitUntilWithForceReconcile(2, 1500, func(cluster *fdbv1beta2.FoundationDBCluster) bool {
115115
for _, processGroup := range cluster.Status.ProcessGroups {
116+
missingTime := processGroup.GetConditionTime(fdbv1beta2.MissingProcesses)
117+
// If the Pod is missing check if the fdbserver processes are running and check the logs of the fdb-kubernetes-monitor.
118+
if missingTime != nil && time.Since(time.Unix(*missingTime, 0)) > 60*time.Second {
119+
log.Println("Missing process for:", processGroup.ProcessGroupID)
120+
stdout, stderr, err := factory.ExecuteCmd(cluster.Namespace, processGroup.GetPodName(cluster), fdbv1beta2.MainContainerName, "ps aufx", true)
121+
log.Println("stdout:", stdout, "stderr", stderr, "err", err)
122+
123+
pod, err := factory.GetPod(cluster.Namespace, processGroup.GetPodName(cluster))
124+
if err != nil {
125+
log.Println("logs for", processGroup.ProcessGroupID, ":", factory.GetLogsForPod(*pod, fdbv1beta2.MainContainerName, missingTime))
126+
}
127+
}
128+
116129
if processGroup.ProcessClass == fdbv1beta2.ProcessClassStorage {
117130
continue
118131
}

0 commit comments

Comments
 (0)