Skip to content

Commit

Permalink
ovs-healthcheck: ignore error when log file does not exist (#3456)
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian authored Nov 24, 2023
1 parent f8435b3 commit e334b60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/images/ovs-healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ovn-ctl status_controller
file="/var/log/ovn/ovn-controller.log"
if [ -e $file ]
then
result=$(tail -6 $file)
result=$(tail -6 $file 2>/dev/null || true)
if [[ "$result" =~ "clustered database server has stale data" ]]
then
echo "check write to ovn sb db, clustered database server has stale data, run sb-cluster-state-reset command to restore"
Expand Down

0 comments on commit e334b60

Please sign in to comment.