Skip to content

Commit 8fa7a1a

Browse files
committed
Fixed dumping health status
1 parent cae331c commit 8fa7a1a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docker/mongodb-kubernetes-tests/kubetester/mongotester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ def run(self):
645645
self.health_function(**self.health_function_params)
646646
consecutive_failure = 0
647647
except Exception as e:
648-
print(f"Error in {self.__class__.__name__}: {e})")
648+
logging.error(f"Error in {self.__class__.__name__}: {e})")
649649
self.last_exception = e
650650
consecutive_failure = consecutive_failure + 1
651651
self.max_consecutive_failure = max(self.max_consecutive_failure, consecutive_failure)

scripts/evergreen/e2e/dump_diagnostic_information.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ dump_pod_readiness_state() {
206206
kubectl --context="${context}" cp -c "mongodb-agent" "${namespace}/${pod}:/var/log/mongodb-mms-automation/agent-health-status.json" "${agent_health_status}" &> /dev/null
207207
([[ -f "${agent_health_status}" ]] && jq . < "${agent_health_status}" > tmpfile && mv tmpfile "${agent_health_status}")
208208

209+
if [[ ! -f "${agent_health_status}" ]]; then
210+
kubectl --context="${context}" cp -c "mongodb-enterprise-database" "${namespace}/${pod}:/var/log/mongodb-mms-automation/agent-health-status.json" "${agent_health_status}" &> /dev/null
211+
([[ -f "${agent_health_status}" ]] && jq . < "${agent_health_status}" > tmpfile && mv tmpfile "${agent_health_status}")
212+
fi
213+
209214
if [[ ! -f "${agent_health_status}" ]]; then
210215
echo "Agent health status not found; trying community health status: "
211216
kubectl --context="${context}" cp -c "mongodb-agent" "${namespace}/${pod}:/var/log/mongodb-mms-automation/healthstatus/agent-health-status.json" "${agent_health_status}" &> /dev/null

0 commit comments

Comments
 (0)