<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi Darragh,
<div><br>
</div>
<div>Yes (I should included more background), I have a VM started in KVM, and it has I/Fs associated with scripts for I/F up and down:</div>
<div><br>
</div>
<div>
<div>IFNAME_ETH0=$NAME"__mgmt"</div>
<div>IFNAME_ETH1=$NAME"__public"</div>
<div>IFNAME_ETH2=$NAME"__private"</div>
<div><br>
</div>
<div>kvm -m 8192 -name $NAME \</div>
<div>-smp 4 \</div>
<div>-serial telnet:$TELNET_ACCESS,server,nowait \</div>
<div>-net nic,macaddr=$MACADDR_ETH0,model=e1000,vlan=0 \</div>
<div>-net tap,ifname=$IFNAME_ETH0,vlan=0,script=osn-ifup-mgmt,downscript=osn-ifdown-mgmt \</div>
<div>-net nic,macaddr=$MACADDR_ETH1,model=e1000,vlan=1 \</div>
<div>-net tap,ifname=$IFNAME_ETH1,vlan=1,script=osn-ifup-br-ex,downscript=osn-ifdown-br-ex \</div>
<div>-net nic,macaddr=$MACADDR_ETH2,model=e1000,vlan=2 \</div>
<div>-net tap,ifname=$IFNAME_ETH2,vlan=2,script=osn-ifup-br-int,downscript=osn-ifdown-br-int \</div>
<div>-drive file=$IMAGE \</div>
<div>-boot c \</div>
<div>-vga cirrus \</div>
<div>-vnc $VNC_ACCESS</div>
<div><br>
</div>
<div>ETH2, using osn-ifup-br-int, does this:</div>
<div><br>
</div>
<div>
<div>#!/bin/bash</div>
<div><br>
</div>
<div>source config.ini</div>
<div><br>
</div>
<div>/sbin/ifconfig $1 0.0.0.0 up</div>
<div>if_mac=`ifconfig $1 | awk '{ if ($4 == "HWaddr") print $5 }'`</div>
<div>info_str=`<b>./plug_vif.py</b> ${HOST} ${USER} ${PASSWORD} ${TENANT} ${UUID} ${if_mac} ${HOSTNAME} $1`</div>
<div>if [ "$info_str" == "" ]; then</div>
<div>   echo "VIF plugging failed ($1)! Exiting ..." >&2</div>
<div>   exit 1</div>
<div>fi</div>
<div><br>
</div>
<div># Write for file for later clean-up by osn-ifdown</div>
<div>echo "$1 ${if_mac} ${UUID} $info_str" >> .instance_info</div>
<div><br>
</div>
<div>IFS=' ' read -a info <<< "$info_str"</div>
<div>switch=${info[0]}</div>
<div>echo "Plugging interface: $1 into switch: ${switch}"</div>
<div>ovs-vsctl add-port ${switch} $1</div>
</div>
<div><br>
</div>
<div>Note: T original that used Nova for the plugging of VIF used this for the last line, instead of ovs-vsctl:</div>
<div><br>
</div>
<div>brctl addif ${switch} $1</div>
<div><br>
</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div><br>
</div>
<div apple-content-edited="true">
<div>
<div>PCM (Paul Michali)</div>
<div><br>
</div>
<div>MAIL …..…. <a href="mailto:pcm@cisco.com">pcm@cisco.com</a></div>
<div>IRC ……..… pcm_ (<a href="http://irc.freenode.com">irc.freenode.com</a>)</div>
<div>TW ………... @pmichali</div>
<div>GPG Key … 4525ECC253E31A83</div>
<div>Fingerprint .. 307A 96BB 1A4C D2C7 931D 8D2D 4525 ECC2 53E3 1A83</div>
</div>
<div><br>
</div>
<br class="Apple-interchange-newline">
</div>
<br>
<div>
<div>On Mar 31, 2014, at 9:26 AM, Darragh O'Reilly <<a href="mailto:dara2002-openstack@yahoo.com">dara2002-openstack@yahoo.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div>
<div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;">
<div><span>Hi Paul,</span></div>
<div style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">
<br>
<span></span></div>
<div style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">
<span>tbh I'm not exactly sure what you are trying to do overall. But from your script it seems to me that you are trying to create an OVS port so a libvirt instance outside of Nova control can use it. And you don't need the linux bridge for security group
 iptables.<br>
<br>
AFAIK the tap must be created first using the ip command. Then when 'ovs-vsctl add-port' is called with the same name as the tap device for the port name, the tap device will be enslaved properly in the OVS bridge.<br>
<br>
<a href="https://github.com/openstack/nova/blob/304df046eaaad6d64ee16898b1eaa76918e98878/nova/virt/libvirt/vif.py#L420-L423">https://github.com/openstack/nova/blob/304df046eaaad6d64ee16898b1eaa76918e98878/nova/virt/libvirt/vif.py#L420-L423</a></span></div>
<div style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">
<br>
<span></span></div>
<div style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">
<span>Regards, Darragh.<br>
</span></div>
<div style="display: block;" class="yahoo_quoted">
<div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 12pt;">
<div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size:
 12pt;">
<div dir="ltr"><font size="2" face="Arial">On Monday, 31 March 2014, 12:36, Paul Michali (pcm) <<a href="mailto:pcm@cisco.com">pcm@cisco.com</a>> wrote:<br>
</font></div>
<blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">
<div class="y_msg_container">
<div id="yiv7857866124">Hi Darragh,
<div><br clear="none">
</div>
<div>Can you elaborate on what the “set interface” arguments do in OVS? Just trying to understand why it is not desired, when plugging into this interface (note I have a management interface on the br-int and it works fine…this one, which is also on br-int,
 but needs to tie to the existing “private” network that devstack sets up, does not work.</div>
<div><br clear="none">
</div>
<div>Regards,</div>
<div><br clear="none">
<div>
<div>
<div>PCM (Paul Michali)</div>
<div><br clear="none">
</div>
<div>MAIL …..…. <a rel="nofollow" shape="rect" ymailto="mailto:pcm@cisco.com" target="_blank" href="mailto:pcm@cisco.com">
pcm@cisco.com</a></div>
<div>IRC ……..… pcm_ (<a rel="nofollow" shape="rect" target="_blank" href="http://irc.freenode.com/">irc.freenode.com</a>)</div>
<div>TW ………... @pmichali</div>
<div>GPG Key … 4525ECC253E31A83</div>
<div>Fingerprint .. 307A 96BB 1A4C D2C7 931D 8D2D 4525 ECC2 53E3 1A83</div>
</div>
<div><br clear="none">
</div>
<br class="yiv7857866124Apple-interchange-newline" clear="none">
</div>
<br clear="none">
<div>
<div class="yiv7857866124yqt0585424631" id="yiv7857866124yqt76644">
<div>On Mar 31, 2014, at 4:20 AM, Darragh O'Reilly <<a rel="nofollow" shape="rect" ymailto="mailto:dara2002-openstack@yahoo.com" target="_blank" href="mailto:dara2002-openstack@yahoo.com">dara2002-openstack@yahoo.com</a>> wrote:</div>
<br class="yiv7857866124Apple-interchange-newline" clear="none">
<blockquote type="cite">
<div>
<div style="background-color:rgb(255, 255, 255);font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-size:12pt;">
Hi Paul,<span style="color:rgb(68, 85, 136);font-family:Consolas, 'Liberation Mono', Courier, monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;letter-spacing:normal;line-height:18px;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;background-color:rgb(255, 255, 255);display:inline;float:none;"></span><br clear="none">
<br clear="none">
the OVSInterfaceDriver creates interfaces with type internal so agents like DHCP/L3 etc can put IP addresses on them. But I don't think type internal will work for instances. You could try subclassing and overriding so it does not do this:<br clear="none">
<br clear="none">
 <a rel="nofollow" shape="rect" target="_blank" href="https://github.com/openstack/neutron/blob/2541ff7cad19941b62dace7e9951a56a16e53f3e/neutron/agent/linux/interface.py#L150">https://github.com/openstack/neutron/blob/2541ff7cad19941b62dace7e9951a56a16e53f3e/neutron/agent/linux/interface.py#L150</a>
<div><br clear="none">
</div>
<div style="font-size:16px;font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;background-color:transparent;font-style:normal;">
Regards,</div>
<div style="font-size:16px;font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;background-color:transparent;font-style:normal;">
Darragh.<br clear="none">
</div>
</div>
</div>
_______________________________________________<br clear="none">
OpenStack-dev mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:OpenStack-dev@lists.openstack.org" target="_blank" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br clear="none">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br clear="none">
</blockquote>
</div>
</div>
<br clear="none">
</div>
</div>
<br>
<br>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>