Thanks for the patch! This appears to be backwards-compatible with the
old output of ovsdb-server/sync-status, so this can be backported as-is
to other OVN branches.
Acked-by: Mark Michelson <mmich...@redhat.com>
On 7/7/25 5:31 AM, Tao Liu wrote:
In openvswitch e76f8472090e ("ovsdb-server: Database config isolation."),
sync-status has changed the output sequence of bachup node as:
$ ovn-appctl -t /var/run/ovn/ovnnb_db.ctl ovsdb-server/sync-status
database: OVN_Northbound
state: backup
replicating: tcp:hostname:6641
Fix sync_status by matching the state field.
Signed-off-by: Tao Liu <taoliu...@163.com>
---
utilities/ovn-ctl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl
index 23deaa072..acbeacd09 100755
--- a/utilities/ovn-ctl
+++ b/utilities/ovn-ctl
@@ -446,7 +446,8 @@ start_ic_ovsdb () {
sync_status() {
local ctl_file=$1
- ovn-appctl -t $ctl_file ovsdb-server/sync-status | awk '{if(NR==1) print
$2}'
+ ovn-appctl -t $ctl_file ovsdb-server/sync-status | \
+ awk '/state:/ {print $2; exit}'
}
status_ovnnb() {
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev