[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, Jul 15, 2015 at 11:14:18AM +0100, Ian Campbell wrote:
> 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.

There is at least one vif-* in Nova.

> [...]
> > +# 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?

If this was to be the default, then that will break Xen guest creation
under OpenStack if the script is not there.

But I intend to write this in the documentation and try to have devstack do
the setup as well.

Beyond that, it would be for the package to set things up properly. I've
seen a specific nova-libvirt-xen package in ubuntu that already set
libvirt.virt_type=xen in nova.conf.

> > +
> > +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?

I'll add it.

> > +        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.

Ok, I'll add the call_hooks.

Thanks,

-- 
Anthony PERARD

_______________________________________________
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®.