[ovs-dev] [PATCH 4/4] xenserver: In vif script, tolerate port existing when we (re)add it.

Justin Pettit jpettit at nicira.com
Thu Feb 25 07:11:28 UTC 2010


Looks good.

--Justin


On Feb 23, 2010, at 2:36 PM, Ben Pfaff wrote:

> 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 at citrix.com>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> 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 1fbf155..f7b640b 100755
> --- a/xenserver/etc_xensource_scripts_vif
> +++ b/xenserver/etc_xensource_scripts_vif
> @@ -96,7 +96,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
> 	    
> -- 
> 1.6.6.1
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list