WHY? l3-agent failed to set vlan tag

asked 2015-01-03 20:26:32 -0500

francois gravatar image

updated 2015-01-06 09:33:03 -0500

after days of troubleshooting "create initial network"

I realized that the L3-agent failed to set the tag for the external gateway

I manually set the tag, and everything works fine

reboot - then it's broken again WHY?

I have enabled debug = True in /etc/neutron/l3_agent.ini here are the 2 Exit code: 1

Command: ['sudo', 'neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qrouter-44f8e194-7205-4c37-8c9f-ffd5d60cbff0', 'ip', '-o', 'link', 'show', 'qr-b141a503-f2']
Exit code: 1
Stdout: ''
Stderr: 'Device "qr-b141a503-f2" does not exist.\n' execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:81
2015-01-06 08:07:02.837 2988 DEBUG neutron.agent.linux.utils [-] Running command: ['sudo', 'neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qrouter-44f8e194-7205-4c37-8c9f-ffd5d60cbff0', 'ip', '-o', 'link', 'show', 'qr-b141a503-f2'] create_process /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:46
2015-01-06 08:07:02.942 2988 DEBUG neutron.agent.linux.utils [-] 
Command: ['sudo', 'neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qrouter-44f8e194-7205-4c37-8c9f-ffd5d60cbff0', 'ip', '-o', 'link', 'show', 'qr-b141a503-f2']
Exit code: 1
Stdout: ''
Stderr: 'Device "qr-b141a503-f2" does not exist.\n' execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:81
2015-01-06 08:07:02.942 2988 DEBUG neutron.agent.linux.utils [-] Running command: ['ip', '-o', 'link', 'show', 'br-int'] create_process /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:46
2015-01-06 08:07:02.949 2988 DEBUG neutron.agent.linux.utils [-]

it complains about Device "qr-xxxxxxxx-xx" but nothing about the "qg-xxxxxxxx-xx" but they are both there

[root@network ~]# ovs-vsctl show
a9f7a8c9-c31e-4899-a819-000cdbabeddf
    Bridge br-int
        fail_mode: secure
        Port "tapa1ff09ea-e6"
            tag: 4095
            Interface "tapa1ff09ea-e6"
                type: internal
        Port "qr-b141a503-f2"
            tag: 1
            Interface "qr-b141a503-f2"
                type: internal
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
        Port br-int
            Interface br-int
                type: internal
        Port int-br-vlan
            Interface int-br-vlan
                type: patch
                options: {peer=phy-br-vlan}
    Bridge br-vlan
        Port "eno1"
            Interface "eno1"
        Port "qg-4bed7f0f-ae"
            Interface "qg-4bed7f0f-ae"
                type: internal
        Port phy-br-vlan
            Interface phy-br-vlan
                type: patch
                options: {peer=int-br-vlan}
        Port br-vlan
            Interface br-vlan
                type: internal
    Bridge br-tun
        Port "gre-c0a8075a"
            Interface "gre-c0a8075a"
                type: gre
                options: {df_default="true", in_key=flow, local_ip="192.168.7.80", out_key=flow, remote_ip="192.168.7.90"}
        Port br-tun
            Interface br-tun
                type: internal
        Port "gre-c0a8075b"
            Interface "gre-c0a8075b"
                type: gre
                options: {df_default="true", in_key=flow, local_ip="192.168.7.80", out_key=flow, remote_ip="192.168.7.91"}
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
    ovs_version: "2.1.3"

Just so I can keep moving forward I wrote and after boot script - but really I should not be going in production like that (I use my vlan tag in the name of my net)

#!/usr/bin/bash
. /root/scripts/admin-openrc.sh
VLANTAG=`neutron net-list -F name |awk '/net[0-9]/{print $2}'|sed 's/[^0-9]*//g'`
INTERFACE=`ovs-vsctl show |grep 'Port "qg' |awk -F'"' ' {print $2}'`
ovs-vsctl set port $INTERFACE tag=$VLANTAG

.

[root@network ~]# neutron agent-list
+--------------------------------------+--------------------+-------------------+-------+----------------+---------------------------+
| id                                   | agent_type         | host              | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+-------------------+-------+----------------+---------------------------+
| 24bd59b7-f0b0-4eae-8cd8-c5e3efefdbae | DHCP agent         | network.ececloud  | :-)   | True           | neutron-dhcp-agent        |
| 2591e419-34f3-4d5f-8555-fd81e852490b | L3 agent           | network.ececloud  | :-)   | True           | neutron-l3-agent          |
| 2bd00023-ab2f-4788-8ba8-5ecfa1c596c4 | Open vSwitch agent | network.ececloud  | :-)   | True           | neutron-openvswitch-agent |
| 4966d4ee-ad46-4b6f-8ba0-c6b38fa1ce94 | Open vSwitch agent | compute1.ececloud | :-)   | True           | neutron-openvswitch-agent |
| c22ae49c-3c9e-4ce8-926b-504f6f9409c9 | Metadata agent     | network.ececloud  | :-)   | True ...
(more)
edit retag flag offensive close merge delete