[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC] A script to use with OpenStack instead of vif-bridge



On Wed, 2015-07-15 at 10:51 +0100, Anthony PERARD wrote:
> Hi,
> 
> I have submitted a script to be used by OpenStack instead of our vif-bridge
> script: https://review.openstack.org/201257/
> This is because vif-bridge is calling iptables and OpenStack (nova-network)
> is also updating the iptables (via iptables-{save,restore}).
> 
> Could you review this patch that I have append bellow?
> 
> Also, would it be better to have a similair script in Xen repo instead of
> Nova?

I think either would be fine, I don't currently know of any out of tree
vif-* scripts but there are a few block-* ones and I don't see why vif-*
should be treated differently e.g. from a compatibility PoV so out of
tree is fine.

[...]
> +# usage:
> +#   place the script in $XEN_SCRIPT_DIR (likely to be /etc/xen/scripts)
> +#   and set the following in /etc/nova/nova.conf:
> +#     [libvirt]
> +#     xen_vif_bridge_script_path = vif-bridge-nova-network

Would it be possible/sensible to cause this to be the default if
$somethingelse was set for Xen generally?

> +
> +dir=$(dirname "$0")
> +. "$dir/vif-common.sh"
> +
> +bridge=$(xenstore_read_default "$XENBUS_PATH/bridge" "$bridge")
> +
> +case "$command" in
> +    add|online)
> +        setup_virtual_bridge_port "$dev"

Do you want/need
                set_mtu $bridge $dev
here?

> +        add_to_bridge "$bridge" "$dev"
> +        ;;
> +
> +    remove|offline)
> +      do_without_error brctl delif "$bridge" "$dev"
> +      do_without_error ip link set $dev down
> +      ;;
> +esac

You've omitted the various call_hooks, which means they won't work under
Nova, I don't know if they are useful in that context, but I imagine
they might be.

> +
> +if [ "$type_if" = vif -a "$command" = "online" ]
> +then
> +  success
> +fi
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.