Skip to content

Commit

Permalink
fix: use ovn/ovs-ctl to health check
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed May 13, 2019
1 parent 24ef4fd commit 0d86393
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
8 changes: 5 additions & 3 deletions dist/images/ovn-healthcheck.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -euo pipefail

ovn-nbctl show
# wait 5 seconds
ovn-sbctl -t 5 show
alias ovn-ctl='/usr/share/openvswitch/scripts/ovn-ctl'

ovn-ctl status_northd
ovn-ctl status_ovnnb
ovn-ctl status_ovnsb
10 changes: 6 additions & 4 deletions dist/images/ovn-is-leader.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash
set -euo pipefail

ovn-nbctl show
# wait 5 seconds
ovn-sbctl -t 5 show
alias ovn-ctl='/usr/share/openvswitch/scripts/ovn-ctl'

ovn-ctl status_northd
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).*$"
echo $(cat /var/log/openvswitch/ovn-northd.log) | grep -oP "lock acquired(?!.*lock lost).*$"
7 changes: 6 additions & 1 deletion dist/images/ovs-healthcheck.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash
set -euo pipefail

ovs-vsctl show
alias ovs-ctl='/usr/share/openvswitch/scripts/ovs-ctl'
alias ovn-ctl='/usr/share/openvswitch/scripts/ovn-ctl'

ovs-ctl status
ovn-ctl status_controller
ovn-ctl status_controller_vtep

0 comments on commit 0d86393

Please sign in to comment.