Skip to content

Commit

Permalink
Merge pull request #112 from fnordahl/branch-22.03-bug/2045865
Browse files Browse the repository at this point in the history
[branch-22.03] snap/hooks/pre-refresh: Add timeout to *-appctl calls.
  • Loading branch information
fnordahl authored Dec 7, 2023
2 parents 1d18f95 + 9df9682 commit 55302f6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions snap/hooks/pre-refresh
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#!/bin/sh

# The amout of time to wait in seconds for the case where the app socket
# accepts connections and the daemon for some reason does not service requests.
TIMEOUT=30

# NOTE(fnordahl): tell the ovn-controller to exit without cleaning up flows nor
# SB DB state on refresh.
${SNAP}/commands/ovn-appctl exit --restart || true
${SNAP}/commands/ovn-appctl --timeout ${TIMEOUT} exit --restart || true

# Note (mkalcok): `microovn.switch` service, by default, stops OVS
# vswitch daemon with `--cleanup` flag that releases datapath
# resources like ports and bridges. This hook prevents such behavior
# by stopping the daemon without `--cleanup` flag during the snap
# refresh.

${SNAP}/commands/ovs-appctl exit || true
${SNAP}/commands/ovs-appctl --timeout ${TIMEOUT} exit || true

0 comments on commit 55302f6

Please sign in to comment.