Commit 24259dbf authored by MengxinLiu's avatar MengxinLiu Committed by oilbeater
Browse files

fix: use ovsdb-client to get leader info

When log rotated, previous method will lost all leader
parent cb176abc
Showing with 1 addition and 1 deletion
+1 -1
......@@ -8,4 +8,4 @@ ovn-ctl status_ovnnb
ovn-ctl status_ovnsb
# For data consistency, only store leader address in endpoint
echo $(cat /var/log/openvswitch/ovn-northd.log) | grep -oP "lock acquired(?!.*lock lost).*$"
ovsdb-client query tcp:127.0.0.1:6641 "[\"_Server\",{\"table\":\"Database\",\"where\":[[\"name\",\"==\", \"OVN_Northbound\"]],\"columns\": [\"leader\"],\"op\":\"select\"}]" | grep true
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment