diff options
| author | Ben Pfaff <blp@nicira.com> | 2010-02-23 14:35:08 -0800 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2010-02-25 14:48:16 -0800 |
| commit | 867cc7bd395b32a3516112127a04d41d9f1b15fc (patch) | |
| tree | 453de2d026da313d583afc81446240ab4fdce6be /xenserver/etc_xensource_scripts_vif | |
| parent | dcdf169e831c0697f04eecbdda216959eace2ce8 (diff) | |
| download | openvswitch-867cc7bd395b32a3516112127a04d41d9f1b15fc.tar.gz | |
xenserver: In vif script, tolerate port existing when we (re)add it.
When a Windows VM boots, it initially has "vif" devices. Then, when
XS Tools loads during boot, those "vif" devices disappear and then are
recreated under the same name. The vif script is not called to remove
the old devices, but it is called to add the new ones. It refused to do
this, however, because it saw the new device as having a duplicate name
(because the old was wasn't deleted).
This commit fixes the problem by making the vif script delete the port,
if it exists, before it adds it.
Bug #2425.
CC: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'xenserver/etc_xensource_scripts_vif')
| -rwxr-xr-x | xenserver/etc_xensource_scripts_vif | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xenserver/etc_xensource_scripts_vif b/xenserver/etc_xensource_scripts_vif index 4df1ac968..d27bc10da 100755 --- a/xenserver/etc_xensource_scripts_vif +++ b/xenserver/etc_xensource_scripts_vif @@ -97,7 +97,7 @@ add_to_bridge() logger -t scripts-vif "Failed to retrieve vif details for vswitch" fi - $vsctl add-port $bridge $dev $vif_details + $vsctl -- --if-exists del-port $dev -- add-port $bridge $dev $vif_details ;; esac |
