ovs-vsctl: Add --if-exists option to "get" command, for map columns.
[openvswitch] / xenserver / opt_xensource_libexec_interface-reconfigure
index de6043d1619bd0c0c4364a17efb1f05439b0dd2f..f28ae74cced1afd133f800e5944cedd90cc95d8d 100755 (executable)
@@ -1214,7 +1214,9 @@ def datapath_configure_bond(pif,slaves):
     pifrec = db.get_pif_record(pif)
     interface = pif_netdev_name(pif)
 
-    argv = ['--', 'add-bond', bridge, interface] + slaves
+    argv = ['--', '--fake-iface', 'add-bond', bridge, interface]
+    for slave in slaves:
+        argv += [pif_netdev_name(slave)]
 
     # XXX need ovs-vsctl support
     #if pifrec['MAC'] != "":
@@ -1253,11 +1255,10 @@ def datapath_modify_config(commands):
         for c in commands:
             log("  %s" % c)
 
-    rc = run_command(['/usr/bin/ovs-vsctl']
+    rc = run_command(['/usr/bin/ovs-vsctl'] + ['--timeout=20']
                      + [c for c in commands if not c.startswith('#')])
     if not rc:
         raise Error("Failed to modify vswitch configuration")
-    run_command(['/bin/sleep', '5']) # XXX
     return True
 
 #