Skip to content

Commit 3654395

Browse files
Merge pull request #133 from karelyatin/OSPRH-27981
Gather OVN NB and SB Cluster status
2 parents 8c9e7df + dc77ea9 commit 3654395

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

collection-scripts/gather_services_status

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,24 @@ get_ovn_status() {
275275
else
276276
echo "Pod ${sb_pod} not found in namespace ${OSP_NS}, skipping OVN SB database collection"
277277
fi
278+
279+
# Collect OVN cluster status
280+
mkdir -p "${OVN_PATH}/cluster-status/nb"
281+
mkdir -p "${OVN_PATH}/cluster-status/sb"
282+
283+
echo "Collecting OVN database cluster status..."
284+
285+
# Collect cluster status from all OVN NB pods
286+
for pod in $(/usr/bin/oc -n "${OSP_NS}" get pods -l service=ovsdbserver-nb -o custom-columns=":metadata.name" --no-headers 2>/dev/null); do
287+
echo "Collecting cluster status from NB pod: $pod"
288+
run_bg /usr/bin/oc -n "${OSP_NS}" rsh "$pod" ovn-appctl -t /tmp/ovnnb_db.ctl cluster/status OVN_Northbound > "${OVN_PATH}/cluster-status/nb/${pod}.txt" 2>/dev/null || echo "Failed to collect status from NB pod: $pod"
289+
done
290+
291+
# Collect cluster status from all OVN SB pods
292+
for pod in $(/usr/bin/oc -n "${OSP_NS}" get pods -l service=ovsdbserver-sb -o custom-columns=":metadata.name" --no-headers 2>/dev/null); do
293+
echo "Collecting cluster status from SB pod: $pod"
294+
run_bg /usr/bin/oc -n "${OSP_NS}" rsh "$pod" ovn-appctl -t /tmp/ovnsb_db.ctl cluster/status OVN_Southbound > "${OVN_PATH}/cluster-status/sb/${pod}.txt" 2>/dev/null || echo "Failed to collect status from SB pod: $pod"
295+
done
278296
}
279297

280298
# Cloudkitty service gathering - module list

0 commit comments

Comments
 (0)