[openstack-dev] ipv6 and ipv4 dual stack for floating IP

Harm Weites harm at weites.com
Thu Oct 30 10:32:55 UTC 2014


I'm seeing the same error when trying to setup a whole new network
through Horizon with external gateway and an ipv4 and ipv6 subnet. Eg,
without floating ip.

l3_agent.py is trying this: prefixlen =
netaddr.IPNetwork(port['subnet']['cidr']).prefixlen

Looking inside port[] lists the following items:

2014-10-30 10:26:05.834 21765 ERROR neutron.agent.l3_agent [-] Ignoring
multiple IPs on router port b4d94d2a-0ba2-43f0-be5f-bb53e89abe32
2014-10-30 10:26:05.836 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[status] = DOWN
2014-10-30 10:26:05.837 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[binding:host_id] = myhostname
2014-10-30 10:26:05.839 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[name] =
2014-10-30 10:26:05.840 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[allowed_address_pairs] = []
2014-10-30 10:26:05.841 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[admin_state_up] = True
2014-10-30 10:26:05.843 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[network_id] = 00539791-0b2f-4628-9599-622fa00993b5
2014-10-30 10:26:05.844 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[tenant_id] =
2014-10-30 10:26:05.846 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[extra_dhcp_opts] = []
2014-10-30 10:26:05.847 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[binding:vif_details] = {}
2014-10-30 10:26:05.848 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[binding:vif_type] = binding_failed
2014-10-30 10:26:05.849 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[device_owner] = network:router_gateway
2014-10-30 10:26:05.851 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[mac_address] = fa:16:3e:53:89:8d
2014-10-30 10:26:05.853 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[binding:profile] = {}
2014-10-30 10:26:05.854 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[binding:vnic_type] = normal
2014-10-30 10:26:05.856 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[fixed_ips] = [{u'subnet_id':
u'faaf9c91-19ce-4c14-8f86-c81949cdbac5', u'ip_address':
u'192.168.64.30'}, {u'subnet_id':
u'381d0c54-1a4e-4a27-9858-a81202e81487', u'ip_address':
u'2001:470:ffff:64::aaaa'}]
2014-10-30 10:26:05.857 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[id] = b4d94d2a-0ba2-43f0-be5f-bb53e89abe32
2014-10-30 10:26:05.858 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[security_groups] = []
2014-10-30 10:26:05.860 21765 INFO neutron.agent.l3_agent [-] CHECK:
port[device_id] = d3bbec5a-2075-4229-ba88-698f27cd0943

_set_subnet_info() is set to log an ERROR when it encounters multiple
addresses and then happily continues doing something:

 prefixlen = netaddr.IPNetwork(port['subnet']['cidr']).prefixlen
 port['ip_cidr'] = "%s/%s" % (ips[0]['ip_address'], prefixlen)

Operations with just 1 (ipv6) ip go without any issues, the adress is
added to a namespace and pongs just fine. Adding 2 subnets to this
external net and creating a gateway to it on the l3 router causes a problem.

Do we need to wait for K before we can fully go dual-stack?

- Harm

op 29-10-14 15:29, Jerry Xinyu Zhao schreef:
> Hi
> I want to use both ipv4 and ipv6 for floating ip at the same time.
> However, I have the following issue when setting router gateway or
> associate floating ip to an instance.
> Is it supported in the first place? What should I do to make it work?
> Thanks!
>
> neutron router-list
> +--------------------------------------+----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
> | id                                   | name           |
> external_gateway_info                                                
>                                                                      
>                                                                      
>                                                                     |
> distributed | ha    |
> +--------------------------------------+----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
> | b243c786-4648-4d69-b749-ee5fad02069b | default-router |
> {"network_id": "02eca54a-420d-4d52-b045-1207e17994e5", "enable_snat":
> true, "external_fixed_ips": [{"subnet_id":
> "a188333f-77c3-40d9-9048-e733c4da30b1", "ip_address": "162.3.123.51"},
> {"subnet_id": "14d9dd91-b315-43bc-818d-ab21f62c1ebb", "ip_address":
> "2001:470:1f0f:cb4::7"}]} | False       | False |
> +--------------------------------------+----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
>
>
> neutron-l3-agent log:
>
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> 2014-10-29 14:10:08.941 30286 ERROR neutron.agent.l3_agent [-]
> Ignoring multiple IPs on router port 18c8874c-f9a0-4274-8f38-fab3da754c2b
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> 2014-10-29 14:10:08.941 30286 ERROR neutron.agent.l3_agent [-] 'subnet'
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> 2014-10-29 14:10:08.941 30286 TRACE neutron.agent.l3_agent Traceback
> (most recent call last):
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> 2014-10-29 14:10:08.941 30286 TRACE neutron.agent.l3_agent   File
> "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/neutron/common/utils.py",
> line 341, in call
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> 2014-10-29 14:10:08.941 30286 TRACE neutron.agent.l3_agent     return
> func(*args, **kwargs)
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> 2014-10-29 14:10:08.941 30286 TRACE neutron.agent.l3_agent   File
> "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/neutron/agent/l3_agent.py",
> line 948, in process_router
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> 2014-10-29 14:10:08.941 30286 TRACE neutron.agent.l3_agent    
> self._set_subnet_info(ex_gw_port)
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> 2014-10-29 14:10:08.941 30286 TRACE neutron.agent.l3_agent   File
> "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/neutron/agent/l3_agent.py",
> line 864, in _set_subnet_info
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> 2014-10-29 14:10:08.941 30286 TRACE neutron.agent.l3_agent    
> prefixlen = netaddr.IPNetwork(port['subnet']['cidr']).prefixlen
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> 2014-10-29 14:10:08.941 30286 TRACE neutron.agent.l3_agent KeyError:
> 'subnet'
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> 2014-10-29 14:10:08.941 30286 TRACE neutron.agent.l3_agent 
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> Traceback (most recent call last):
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
> File
> "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/eventlet/greenpool.py",
> line 82, in _spawn_n_impl
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
>   func(*args, **kwargs)
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
> File
> "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/neutron/agent/l3_agent.py",
> line 1837, in _process_router_update
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
>   self._process_router_if_compatible(router)
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
> File
> "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/neutron/agent/l3_agent.py",
> line 1812, in _process_router_if_compatible
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
>   self.process_router(ri)
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
> File
> "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/neutron/common/utils.py",
> line 344, in call
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
>   self.logger(e)
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
> File
> "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/neutron/openstack/common/excutils.py",
> line 82, in __exit__
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
>   six.reraise(self.type_, self.value, self.tb)
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
> File
> "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/neutron/common/utils.py",
> line 341, in call
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
>   return func(*args, **kwargs)
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
> File
> "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/neutron/agent/l3_agent.py",
> line 948, in process_router
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
>   self._set_subnet_info(ex_gw_port)
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
> File
> "/opt/stack/venvs/openstack/local/lib/python2.7/site-packages/neutron/agent/l3_agent.py",
> line 864, in _set_subnet_info
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:  
>   prefixlen = netaddr.IPNetwork(port['subnet']['cidr']).prefixlen
> Oct 29 14:10:08 overcloud-controller0-ghqtsmsgjgck neutron-l3-agent:
> KeyError: 'subnet'
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141030/abedc393/attachment.html>


More information about the OpenStack-dev mailing list