Skip to content

Commit 53b44ff

Browse files
jameshensmancitrixpsafont
authored andcommitted
CA-369446: exit with error if add_vswitch_port fails
cherry-pick of xen-api.git's 7605423441de4c7e3b1e380320ed6a06518665dc Signed-off-by: jameshensmancitrix <james.hensman@citrix.com>
1 parent 72085c0 commit 53b44ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/setup-vif-rules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import sys
2323
import syslog
2424
import time
2525
import common
26-
from common import send_to_syslog, doexec
26+
from common import ON_ERROR_FAIL, send_to_syslog, doexec, run
2727

2828
path = "/sbin:/usr/sbin:/bin:/usr/bin"
2929

@@ -203,7 +203,7 @@ def make_vswitch_external_ids(vif):
203203
def add_vswitch_port(bridge_name, vif):
204204
args = [vsctl, "--timeout=30", "add-port", bridge_name, vif.vif_name]
205205
args += make_vswitch_external_ids(vif)
206-
doexec(args)
206+
run(ON_ERROR_FAIL, args)
207207
set_xs_ofport_path(vif)
208208
setup_pvs_proxy_rules(vif, "add")
209209

0 commit comments

Comments
 (0)