yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #46701
[Bug 1398768] Re: If we set a gateway outside subnet neutron-l3-agent fails when trying to set the route in the virtual router.
*** This bug is a duplicate of bug 1335023 ***
https://bugs.launchpad.net/bugs/1335023
Reviewed: https://review.openstack.org/233287
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=b6126bc0f17f348ff6303b9bd6041cb018479ef9
Submitter: Jenkins
Branch: master
commit b6126bc0f17f348ff6303b9bd6041cb018479ef9
Author: Sreekumar S <sreesiv@xxxxxxxxx>
Date: Sat Oct 10 03:18:00 2015 +0530
Fix for adding gateway with IP outside subnet
Currently 'force_gateway_on_subnet' configuration is set to True
by default and enforces the subnet on to the gateway. With this
fix 'force_gateway_on_subnet' can be changed to False, and
gateway outside the subnet can be added.
Before adding the default route, a route to the gateway IP is
added. This applies to both external and internal networks.
This configuration option is deprecated, and should be removed
in a future release. It should always allow gateway outside the
subnet. This is done as a separate patch
https://review.openstack.org/#/c/277303/
Change-Id: I3a942cf98d263681802729cf09527f06c80fab2b
Closes-Bug: #1335023
Closes-Bug: #1398768
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1398768
Title:
If we set a gateway outside subnet neutron-l3-agent fails when trying
to set the route in the virtual router.
Status in neutron:
Fix Released
Bug description:
014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent Traceback (most recent call last):
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent File "/usr/lib/python2.7/site-packages/neutron/common/utils.py", line 341, in call
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent return func(*args, **kwargs)
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent File "/usr/lib/python2.7/site-packages/neutron/agent/l3_agent.py", line 938, in process_router
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent self.external_gateway_added(ri, ex_gw_port, interface_name)
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent File "/usr/lib/python2.7/site-packages/neutron/agent/l3_agent.py", line 1318, in external_gateway_added
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent ri.ns_name, preserve_ips)
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent File "/usr/lib/python2.7/site-packages/neutron/agent/l3_agent.py", line 1362, in _external_gateway_added
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent preserve_ips=preserve_ips)
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/interface.py", line 120, in init_l3
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent device.route.add_gateway(gateway)
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 395, in add_gateway
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent self._as_root(*args)
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 242, in _as_root
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent kwargs.get('use_root_namespace', False))
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 74, in _as_root
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent log_fail_as_error=self.log_fail_as_error)
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 86, in _execute
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent log_fail_as_error=log_fail_as_error)
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py", line 84, in execute
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent raise RuntimeError(m)
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent RuntimeError:
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent Command: ['sudo', 'neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qrouter-bcfe22ff-049c-4eb9-9b57-235d903ee52f', 'ip', 'route', 'replace', 'default', 'via', '37.187.128.254', 'dev', 'qg-eaa2de59-95']
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent Exit code: 2
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent Stdout: ''
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent Stderr: 'RTNETLINK answers: Network is unreachable\n'
2014-11-30 16:25:10.113 8086 TRACE neutron.agent.l3_agent
This happens because we should set an on-link route to the gateway IP
on the external network interface first.
Once this works, we can remove the "force_gateway_on_subnet" deprecation,
to allow this not to be enforced, as it's a valid use case in many data centers.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1398768/+subscriptions
References