All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Xen Devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH RFC] A script to use with OpenStack instead of vif-bridge
Date: Wed, 15 Jul 2015 11:14:18 +0100	[thread overview]
Message-ID: <1436955258.11153.48.camel@citrix.com> (raw)
In-Reply-To: <20150715095101.GC1166@perard.uk.xensource.com>

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
> 

  reply	other threads:[~2015-07-15 10:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15  9:51 [PATCH RFC] A script to use with OpenStack instead of vif-bridge Anthony PERARD
2015-07-15 10:14 ` Ian Campbell [this message]
2015-07-15 10:38   ` Anthony PERARD
2015-07-15 10:46     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436955258.11153.48.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.