OSA fails to add lxd container interfaces to OVS Bridge

asked 2018-03-13 17:55:27 -0500

OpenStackDude gravatar image

Version: OSA 17.0.0.0rc1 from git OS: CentOS 7

Description: I am using OVS for all of my bridges, OSA requests a bridge for each network "type" so I created bridges and then used the following network-scripts to connect the bridges together with a virtual patch cable as described in the OVS documentation here: http://docs.openvswitch.org/en/latest/faq/configuration/ (http://docs.openvswitch.org/en/latest...) .

It is running brctl commands with this script: https://github.com/openstack/openstack-ansible-lxc_container_create/blob/815ece74543b618bb901864a323cc6f89672022a/files/lxc-veth-wiring.sh (https://github.com/openstack/openstac...)

But because its OVS that will not work as brctl does not show OVS bridges. Is there a way to use all OVS bridges in OSA?

Network Configs:

######## COMPUTE ########

### br-mgmt ###
echo 'DEVICE=br-mgmt
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=10.5.100.9
NETMASK=255.255.255.0
HOTPLUG=no' > /etc/sysconfig/network-scripts/ifcfg-br-mgmt

echo 'DEVICE=br1-patch-br-mgmt
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPatchPort
OVS_BRIDGE=br1
OVS_OPTIONS="tag=10"
OVS_PATCH_PEER=br-mgmt-patch-br1' > /etc/sysconfig/network-scripts/ifcfg-patch-br1-br-mgmt

echo 'DEVICE=br-mgmt-patch-br1
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPatchPort
OVS_BRIDGE=br-mgmt
OVS_PATCH_PEER=br1-patch-br-mgmt' > /etc/sysconfig/network-scripts/ifcfg-patch-br-mgmt-br1


### br-vxlan ###
echo 'DEVICE=br-vxlan
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=10.5.110.9
NETMASK=255.255.255.0
HOTPLUG=no' > /etc/sysconfig/network-scripts/ifcfg-br-vxlan 

echo 'DEVICE=br-vxlan-patch-br1
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPatchPort
OVS_BRIDGE=br-vxlan
OVS_PATCH_PEER=br1-patch-br-vxlan' > /etc/sysconfig/network-scripts/ifcfg-patch-br-vxlan-br1

echo 'DEVICE=br1-patch-br-vxlan
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPatchPort
OVS_BRIDGE=br1
OVS_OPTIONS="tag=11"
OVS_PATCH_PEER=br-vxlan-patch-br1' > /etc/sysconfig/network-scripts/ifcfg-patch-br1-br-vxlan 


######## CONTROLLER ########
### br-mgmt ###
echo 'DEVICE=br-mgmt
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=10.5.100.3
NETMASK=255.255.255.0
HOTPLUG=no' > /etc/sysconfig/network-scripts/ifcfg-br-mgmt

echo 'DEVICE=br0-patch-br-mgmt
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPatchPort
OVS_BRIDGE=br0
OVS_OPTIONS="tag=10"
OVS_PATCH_PEER=br-mgmt-patch-br0' > /etc/sysconfig/network-scripts/ifcfg-patch-br0-br-mgmt

echo 'DEVICE=br-mgmt-patch-br0
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPatchPort
OVS_BRIDGE=br-mgmt
OVS_PATCH_PEER=br0-patch-br-mgmt' > /etc/sysconfig/network-scripts/ifcfg-patch-br-mgmt-br0


### br-vxlan ###
echo 'DEVICE=br-vxlan
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=10.5.110.3
NETMASK=255.255.255.0
HOTPLUG=no' > /etc/sysconfig/network-scripts/ifcfg-br-vxlan 

echo 'DEVICE=br-vxlan-patch-br0
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPatchPort
OVS_BRIDGE=br-vxlan
OVS_PATCH_PEER=br0-patch-br-vxlan' > /etc/sysconfig/network-scripts/ifcfg-patch-br-vxlan-br0

echo 'DEVICE=br0-patch-br-vxlan
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPatchPort
OVS_BRIDGE=br0
OVS_OPTIONS="tag=11"
OVS_PATCH_PEER=br-vxlan-patch-br0' > /etc/sysconfig/network-scripts/ifcfg-patch-br0-br-vxlan

Error:

failed: [infra1_rabbit_mq_container-f1edf427 -> 10.5.100.3] (item={'value': {u'interface': u'eth1', u'bridge': u'br-mgmt', u'netmask': u'255.255.252.0', u'type': u'veth', u'address': u'172.29.238.112'}, 'key': u'container_address'}) => {"changed": false, "cmd": ["/usr/local/bin/lxc-veth-wiring", "infra1_rabbit_mq_container-f1edf427", "f1edf427_eth1", "eth1", "br-mgmt"], "delta": "0:00:00.042994", "end": "2018-03-13 04:27:26.526972", "failed_when_result": true, "item": {"key": "container_address", "value": {"address": "172.29.238.112", "bridge": "br-mgmt", "interface": "eth1", "netmask": "255.255.252.0", "type": "veth"}}, "msg": "non-zero return code", "rc": 1, "start": "2018-03-13 04:27:26.483978", "stderr": "\n# Execution example: lxc-veth-wiring.sh testing VETHTEST eth1 br-mgmt\n\n# CLI variables\nCONTAINER_NAME=\"${1}\"\nVETH=\"${2}\"\nINTERFACE=\"${3}\"\nBRIDGE=\"${4}\"\nVETH_PEER ...
(more)
edit retag flag offensive close merge delete

Comments

How does your openstack_user_config.yml look? I'am also trying to get OSA working with OVS, but my problems are elsewhere, but you need to change your yml, to reference OVS of course. (Although I havent figured out if thats needed even on vlan-bridges...) The docs arent the clearest...

theque42 gravatar imagetheque42 ( 2018-03-15 04:14:03 -0500 )edit
  • network: container_bridge: "br-mgmt-t" container_type: "veth" container_interface: "eth1" ip_from_q: "container" type: "raw" group_binds: - all_containers - hosts is_container_address: true is_ssh_address: true
OpenStackDude gravatar imageOpenStackDude ( 2018-03-16 13:23:47 -0500 )edit