Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Stein - Kolla - Neutron router ports are down - TooManyExternalNetworks

Hi everyone,

I am seeing a strange issue with Stein and creating multiple external networks. Here is a brief rundown of the setup.

I create the following ressources through Terraform. I've also been able to reproduce the issue by creating the ressources manually.

Scenario 1: 1) One network+subnet (EXT) marked as external with X vlan configured on physnet1. This is expected to be used as the SNAT for a router and floating IPs. Not marked as shared.
2) One network+subnet (PROV) marked as external with Y vlan configured on physnet1. Not currently in use on any qrouters. Not marked as shared. Initially not marked as external, but I encountered the issue when I set it as "external" to test it
3) Create one router with SNAT and the external network set as the EXT network.
4) The router is created within Openstack but is never created on the Controllers namespaces. All port are marked as down.
5) I've attached the logs.
6) If I clear the gateway from the router, the router is spawned and the interfaces come up. 7) If I re-add the gateway with the EXT network. The router goes down and the interfaces are deleted.

2019-10-22 18:52:27.199 49 ERROR neutron.agent.l3.agent [-] Router 'b6dba893-1454-4c0f-9088-e61edef31902' is not compatible with this agent.: RouterNotCompatibleWithAgent: Router 'b6dba893-1454-4c0f-9088-e61edef31902' is not compatible with this agent. 2019-10-22 18:52:27.199 49 ERROR neutron.agent.l3.agent Traceback (most recent call last): 2019-10-22 18:52:27.199 49 ERROR neutron.agent.l3.agent   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/agent/l3/agent.py", line 710, in
_process_routers_if_compatible 2019-10-22 18:52:27.199 49 ERROR neutron.agent.l3.agent     self._process_router_if_compatible(router) 2019-10-22 18:52:27.199 49 ERROR neutron.agent.l3.agent   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/agent/l3/agent.py", line 551, in
_process_router_if_compatible 2019-10-22 18:52:27.199 49 ERROR neutron.agent.l3.agent     router_id=router['id']) 2019-10-22 18:52:27.199 49 ERROR neutron.agent.l3.agent RouterNotCompatibleWithAgent: Router 'b6dba893-1454-4c0f-9088-e61edef31902' is not compatible with this agent. 2019-10-22 18:52:27.199 49 ERROR neutron.agent.l3.agent  2019-10-22 18:52:27.200 49 DEBUG neutron.agent.l3.agent [-] Payload:

2019-10-22 18:52:20.296 31 ERROR oslo_messaging.rpc.server [req-f62c802f-d047-45d7-a3eb-b40e8c44f6ae
- - - - -] Exception during message handling: TooManyExternalNetworks: More than one external network exists. 2019-10-22 18:52:20.296 31 ERROR oslo_messaging.rpc.server   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/api/rpc/handlers/l3_rpc.py", line 254, in get_external_network_id 2019-10-22 18:52:20.296 31 ERROR oslo_messaging.rpc.server     net_id = self.plugin.get_external_network_id(context) 2019-10-22 18:52:20.296 31 ERROR oslo_messaging.rpc.server   File "/var/lib/kolla/venv/lib/python2.7/site-packages/neutron/db/external_net_db.py", line 149, in get_external_network_id 2019-10-22 18:52:20.296 31 ERROR oslo_messaging.rpc.server TooManyExternalNetworks: More than one external network exists.

The Terraform resources creation :

resource "openstack_networking_network_v2" "INT-NETWORK" {
  name                  = "INT-NETWORK"
  admin_state_up        = "true"
  description           = "Internal Network - VXLAN"
  port_security_enabled = "false"
}

resource "openstack_networking_subnet_v2" "INT-SUBNET" {
  name        = "INT-SUBNET"
  network_id  = "${openstack_networking_network_v2.INT-NETWORK.id}"
  description = "Internal Subnet"
  cidr        = "10.100.100.0/24"
  enable_dhcp = "true"
  gateway_ip  = "10.100.100.1"
}

resource "openstack_networking_network_v2" "EXT-NETWORK" {
  name                  = "EXT-NETWORK"
  admin_state_up        = "true"
  description           = "External Network - VLAN 70"
  external              = "true"
  port_security_enabled = "false"
  segments {
    physical_network = "physnet1"
    network_type     = "vlan"
    segmentation_id  = "70"
  }
}

resource "openstack_networking_subnet_v2" "EXT-SUBNET" {
  name        = "EXT-SUBNET"
  network_id  = "${openstack_networking_network_v2.EXT-NETWORK.id}"
  description = "External Subnet"
  cidr        = "192.168.70.0/24"
  enable_dhcp = "false"
  gateway_ip  = "192.168.70.1"
}

resource "openstack_networking_network_v2" "PROV-NETWORK" {
  name                  = "PROV-NETWORK"
  admin_state_up        = "true"
  description           = "Provider Network - VLAN 71"
  external              = "true"
  port_security_enabled = "false"
  segments {
    physical_network = "physnet1"
    network_type     = "vlan"
    segmentation_id  = "71"
  }
}

resource "openstack_networking_subnet_v2" "PROV-SUBNET" {
  name        = "PROV-SUBNET"
  network_id  = "${openstack_networking_network_v2.PROV-NETWORK.id}"
  description = "Provider Subnet"
  cidr        = "192.168.71.0/24"
  enable_dhcp = "false"
  gateway_ip  = "192.168.71.1"
}

resource "openstack_networking_router_v2" "ROUTER-LAURENT" {
  name                = "ROUTER-LAURENT"
  description         = "Main router for projects"
  admin_state_up      = "true"
  enable_snat         = "true"
  external_network_id = "${openstack_networking_network_v2.EXT-NETWORK.id}"
  external_fixed_ip {
    ip_address = "192.168.70.2"
    subnet_id  = "${openstack_networking_subnet_v2.EXT-SUBNET.id}"
  }
}

resource "openstack_networking_router_interface_v2" "router_interface_1" {
  router_id = "${openstack_networking_router_v2.ROUTER-LAURENT.id}"
  subnet_id = "${openstack_networking_subnet_v2.INT-SUBNET.id}"
}