Skip to content

Commit

Permalink
Merge pull request #304 from mseri/ca-2276055
Browse files Browse the repository at this point in the history
CA-227605: issues with PVS caching under stress tests
  • Loading branch information
robhoes authored Nov 24, 2016
2 parents dd75c3a + 319f6a9 commit 5715144
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/setup-pvs-proxy-rules
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ OFCTL=/usr/bin/ovs-ofctl
XSREAD=/usr/bin/xenstore-read
XSWRITE=/usr/bin/xenstore-write
XSRM=/usr/bin/xenstore-rm
XSLS=/usr/bin/xenstore-ls
XSLIST=/usr/bin/xenstore-list

LOG_TAG="setup-pvs-proxy-rules"

Expand Down Expand Up @@ -51,9 +51,15 @@ fi
# The VIF UUID is maintained across the migration.
# Furthermore, a proxied VIF can be in only one PVS site at once.
pvs_prefix="/xapi/pvs-proxy"
path=$($XSLS -f "$pvs_prefix" | egrep -o "$pvs_prefix/[^/]+/$VIF/state")
PVS_PROXY_STATE=$($XSREAD "$path")
if [ -z "$path" ] || [ "$PVS_PROXY_STATE" != "started" ]; then
started=false
for path in $($XSLIST -p "$pvs_prefix"); do
PVS_PROXY_STATE=$($XSREAD "$path/$VIF/state")
if [ $? -eq 0 ] && [ "$PVS_PROXY_STATE" = "started" ]; then
started=true
break
fi
done
if [ ! started ]; then
handle_error "PVS proxy daemon not configured for this proxy - not installing OVS rules."
fi

Expand Down

0 comments on commit 5715144

Please sign in to comment.