[ovs-dev] [PATCH 1/2] xenserver: Warn when installing OVS on a bridged system.

Justin Pettit jpettit at nicira.com
Tue Apr 12 02:02:19 UTC 2011

On Apr 11, 2011, at 6:33 PM, Ethan Jackson wrote:

> ---
> xenserver/openvswitch-xen.spec |    8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
> diff --git a/xenserver/openvswitch-xen.spec b/xenserver/openvswitch-xen.spec
> index 7a2e176..c445f3d 100644
> --- a/xenserver/openvswitch-xen.spec
> +++ b/xenserver/openvswitch-xen.spec
> @@ -235,6 +235,14 @@ if [ "$1" = "1" ]; then    # $1 = 2 for upgrade
> else
>     printf "\nTo use the new Open vSwitch install, you should reboot the\n" 
>     printf "server now.  Failure to do so may result in incorrect operation."
> +
> +    mode=$(cat /etc/xensource/network.conf)
> +    if [ "$mode" != "vswitch" ]; then

In places, "openvswitch" is also a valid name; I'd support both.

> +        printf "\n\nThe server is not configured to run Open vSwitch.  To run in\n"
> +        printf "vswitch mode you must run the following command before rebooting.\n"

I think you want a comma between "mode" and "you".  Also, can you end it in a colon instead of a period?  I think it may be clearer if you drop the following command down a line and indent it a bit.

> +        printf "echo vswitch > /etc/xensource/network.conf"

You may want to use the "xe-switch-network-backend vswitch" command, since I think it's the "proper" way to switch the networking backend.  If you do that, I'd put that "To use the new Open vSwitch..." message as the else to your mode check, since the xe-switch-network-backend will tell the user to reboot.  However, this is more correct, since it's not necessary to reboot on install if OVS isn't the networking backend.

Thanks for taking care of this.  I can wipe it off my board now.


More information about the dev mailing list