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 <zhangzujian.7@gmail.com>
  • Loading branch information
zhangzujian committed Nov 24, 2023
1 parent 7dc00aa commit df2a9c3
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 df2a9c3

Please sign in to comment.