ip_lib does not properly handle existing route for add_gateway

Bug #1129741 reported by dan wendlandt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Gary Kotton

Bug Description

when adding a gateway route, ip_lib should ignore an error if the route already exists. it does not.

ntum/agent/dhcp_agent.py", line 538, in setup 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent device.route.add_gateway(gateway_ip) 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent File "/opt/stack/quantum/quantum/agent/linux/ip_lib.py", line 304, in add_gateway 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent self._as_root(*args) 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent File "/opt/stack/quantum/quantum/agent/linux/ip_lib.py", line 160, in _as_root 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent kwargs.get('use_root_namespace', False)) 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent File "/opt/stack/quantum/quantum/agent/linux/ip_lib.py", line 47, in _as_root 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent namespace) 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent File "/opt/stack/quantum/quantum/agent/linux/ip_lib.py", line 58, in _execute 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent root_helper=root_helper) 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent File "/opt/stack/quantum/quantum/agent/linux/utils.py", line 60, in execute 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent raise RuntimeError(m) 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent RuntimeError: 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent Command: ['sudo', '/usr/local/bin/quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ip', 'netns', 'exec', 'qdhcp-562f78f3-c9a8-43c4-b8e5-5fee1414c9ed', 'ip', 'route', 'add', 'default', 'via', '169.254.169.253', 'dev', 'tap52bd9baf-89'] 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent Exit code: 2 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent Stdout: '' 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent Stderr: 'RTNETLINK answers: File exists\n' 2013-02-18 18:32:39.964 10421 TRACE quantum.agent.dhcp_agent

Tags: l3-ipam-dhcp
dan wendlandt (danwent)
Changed in quantum:
importance: Undecided → Medium
assignee: nobody → dan wendlandt (danwent)
dan wendlandt (danwent)
Changed in quantum:
milestone: grizzly-3 → grizzly-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/22791

Changed in quantum:
assignee: dan wendlandt (danwent) → Gary Kotton (garyk)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/22791
Committed: http://github.com/openstack/quantum/commit/063b7ee3a35a266eaf6548c30c697e3d55748288
Submitter: Jenkins
Branch: master

commit 063b7ee3a35a266eaf6548c30c697e3d55748288
Author: Gary Kotton <email address hidden>
Date: Sun Feb 24 10:30:08 2013 +0000

    Enabled add gateway to refrain from checking exit code

    Fixes bug 1129741

    Change-Id: Ibb9a0e1c0f0e5ad610c4f45ae65eb82e25a57b94

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: grizzly-rc1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.