yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #01867
[Bug 1092763] Re: Cannot find device "qg-0133d262-f9" in l3agent
[Expired for quantum because there has been no activity for 60 days.]
** Changed in: quantum
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to quantum.
https://bugs.launchpad.net/bugs/1092763
Title:
Cannot find device "qg-0133d262-f9" in l3agent
Status in OpenStack Quantum (virtual network service):
Expired
Bug description:
I am using openstack + quantum(folsom) 2012.2 on ubuntu 12.10
I follow the instructions of OpenStack Network (Quantum)
Administration Guide, but vms can not access Internet(they can ping
each other).
I find something is wrong in the l3 agent:
first of all, I set and clear the gateway of router1, but the qg-xxxx
interface attached to the br-ex bridge is removed when clearing
gateway:
110bb4b8-fdb0-4990-8ec3-0a6b4d9d68ef
Bridge br-ex
Port "qg-01c20791-0b"
Interface "qg-01c20791-0b"
type: internal
Port "eth1"
Interface "eth1"
Port "qg-a8f2c734-2b"
Interface "qg-a8f2c734-2b"
type: internal
Port "qg-134cbc8b-af"
Interface "qg-134cbc8b-af"
type: internal
Port "qg-a2921acd-59"
Interface "qg-a2921acd-59"
type: internal
Port "qg-7e9d48b8-d6"
Interface "qg-7e9d48b8-d6"
type: internal
Port br-ex
Interface br-ex
type: internal
Port "qg-ecb15624-16"
Interface "qg-ecb15624-16"
type: internal
Port "qg-7036b293-bb"
Interface "qg-7036b293-bb"
type: internal
Port "qg-aaf480af-ef"
Interface "qg-aaf480af-ef"
type: internal
Port "qg-db5f04e1-57"
Interface "qg-db5f04e1-57"
type: internal
Port "qg-a018f697-2b"
Interface "qg-a018f697-2b"
type: internal
Port "qg-9cd13c59-ba"
Interface "qg-9cd13c59-ba"
type: internal
Port "qg-5c9d0b3f-d4"
Interface "qg-5c9d0b3f-d4"
type: internal
Port "qg-d5de269f-91"
Interface "qg-d5de269f-91"
type: internal
Port "qg-1756d2db-77"
Interface "qg-1756d2db-77"
type: internal
Port "qg-edc584bd-5c"
Interface "qg-edc584bd-5c"
type: internal
Port "qg-4065e9d2-d4"
Interface "qg-4065e9d2-d4"
type: internal
Port "qg-3d4d665e-df"
Interface "qg-3d4d665e-df"
type: internal
Port "qg-45060603-8b"
Interface "qg-45060603-8b"
type: internal
Port "qg-bfa43a09-a4"
Interface "qg-bfa43a09-a4"
type: internal
Port "qg-9b5600fd-4c"
Interface "qg-9b5600fd-4c"
type: internal
Port "qg-687a7b8f-20"
Interface "qg-687a7b8f-20"
type: internal
Port "qg-607fd5f9-ed"
Interface "qg-607fd5f9-ed"
type: internal
Port "qg-b533f09c-56"
Interface "qg-b533f09c-56"
type: internal
Port "qg-0133d262-f9"
Interface "qg-0133d262-f9"<---------------------------------- the new attached device
type: internal
Port "qg-ec611728-9d"
Interface "qg-ec611728-9d"
type: internal
Port "qg-fa2cea93-02"
Interface "qg-fa2cea93-02"
type: internal
Port "qg-d570b84d-a2"
Interface "qg-d570b84d-a2"
type: internal
............................
secondly, I find that the agent can not find new attached gateway interface qg-0133d262-f9 in the namespace qrouter-f08cd99d-1789-4fb5-b0e9-ddf332e1b1ee:
/var/log/quantum/l3-agent.log:
2012-12-21 18:08:22 DEBUG [quantum.agent.linux.utils] Running command: sudo /usr/bin/quantum-rootwrap /etc/quantum/rootwrap.conf ip netns exec qrouter-f08cd99d-1789-4fb5-b0e9-ddf332e1b1ee ip -o link show qg-0133d262-f9
2012-12-21 18:08:23 DEBUG [quantum.agent.linux.utils]
Command: ['sudo', '/usr/bin/quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ip', 'netns', 'exec', 'qrouter-f08cd99d-1789-4fb5-b0e9-ddf332e1b1ee', 'ip', '-o', 'link', 'show', 'qg-0133d262-f9']
Exit code: 1
Stdout: ''
Stderr: 'Device "qg-0133d262-f9" does not exist.\n'
2012-12-21 18:08:23 DEBUG [quantum.agent.linux.utils] Running command: ip -o link show br-ex
2012-12-21 18:08:23 DEBUG [quantum.agent.linux.utils]
Command: ['ip', '-o', 'link', 'show', 'br-ex']
Exit code: 0
Stdout: '5: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT \\ link/ether 52:54:00:14:30:21 brd ff:ff:ff:ff:ff:ff\n'
Stderr: ''
2012-12-21 18:08:23 DEBUG [quantum.agent.linux.utils] Running command: sudo /usr/bin/quantum-rootwrap /etc/quantum/rootwrap.conf ip netns exec qrouter-f08cd99d-1789-4fb5-b0e9-ddf332e1b1ee ip -o link show qg-0133d262-f9
2012-12-21 18:08:23 DEBUG [quantum.agent.linux.utils]
Command: ['sudo', '/usr/bin/quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ip', 'netns', 'exec', 'qrouter-f08cd99d-1789-4fb5-b0e9-ddf332e1b1ee', 'ip', '-o', 'link', 'show', 'qg-0133d262-f9']
Exit code: 1
Stdout: ''
Stderr: 'Device "qg-0133d262-f9" does not exist.\n'
2012-12-21 18:08:23 DEBUG [quantum.agent.linux.utils]
Command: ['sudo', '/usr/bin/quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ip', 'link', 'set', 'qg-0133d262-f9', 'address', 'fa:16:3e:9f:5a:72']
Exit code: 1
Stdout: ''
Stderr: 'Cannot find device "qg-0133d262-f9"\n'
2012-12-21 18:08:23 ERROR [quantum.agent.l3_agent] Error running l3_nat daemon_loop
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/quantum/agent/l3_agent.py", line 174, in daemon_loop
self.do_single_loop()
File "/usr/lib/python2.7/dist-packages/quantum/agent/l3_agent.py", line 236, in do_single_loop
self.process_router(ri)
File "/usr/lib/python2.7/dist-packages/quantum/agent/l3_agent.py", line 320, in process_router
self.external_gateway_added(ri, ex_gw_port, internal_cidrs)
File "/usr/lib/python2.7/dist-packages/quantum/agent/l3_agent.py", line 411, in external_gateway_added
prefix=EXTERNAL_DEV_PREFIX)
File "/usr/lib/python2.7/dist-packages/quantum/agent/linux/interface.py", line 155, in plug
device.link.set_address(mac_address)
File "/usr/lib/python2.7/dist-packages/quantum/agent/linux/ip_lib.py", line 171, in set_address
self._as_root('set', self.name, 'address', mac_address)
File "/usr/lib/python2.7/dist-packages/quantum/agent/linux/ip_lib.py", line 158, in _as_root
kwargs.get('use_root_namespace', False))
File "/usr/lib/python2.7/dist-packages/quantum/agent/linux/ip_lib.py", line 45, in _as_root
namespace)
File "/usr/lib/python2.7/dist-packages/quantum/agent/linux/ip_lib.py", line 56, in _execute
root_helper=root_helper)
File "/usr/lib/python2.7/dist-packages/quantum/agent/linux/utils.py", line 55, in execute
raise RuntimeError(m)
RuntimeError:
Command: ['sudo', '/usr/bin/quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ip', 'link', 'set', 'qg-0133d262-f9', 'address', 'fa:16:3e:9f:5a:72']
Exit code: 1
Stdout: ''
Stderr: 'Cannot find device "qg-0133d262-f9"\n'
I read the code of quantum/agent/l3_agent.py:
if not ip_lib.device_exists(interface_name,
root_helper=self.conf.root_helper,
namespace=ri.ns_name()):
self.driver.plug(ex_gw_port['network_id'],
ex_gw_port['id'], interface_name,
ex_gw_port['mac_address'],
bridge=self.conf.external_network_bridge,
namespace=ri.ns_name(),
prefix=EXTERNAL_DEV_PREFIX)
the namespace is qrouter-f08cd99d-1789-4fb5-b0e9-ddf332e1b1ee, but it
has no interface of qg-0133d262-f9:
root@netnode:~# ip netns
qrouter-f08cd99d-1789-4fb5-b0e9-ddf332e1b1ee
qdhcp-3691ad58-051d-4b2e-8118-fe2e69375634
qdhcp-3e690555-546f-4efe-af61-2369e2c43d18
root@netnode:~# ip netns exec qrouter-f08cd99d-1789-4fb5-b0e9-ddf332e1b1ee ip -o link
22: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT \ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
47: qr-5a268f19-c4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT \ link/ether fa:16:3e:2f:7f:81 brd ff:ff:ff:ff:ff:ff
so ip_lib.device_exists() return false, then it execute
self.driver.plug(), but the set-mac command return false:
root@netnode:~# ip link set qg-0133d262-f9 address fa:16:3e:9f:5a:72
Cannot find device "qg-0133d262-f9"
To manage notifications about this bug go to:
https://bugs.launchpad.net/quantum/+bug/1092763/+subscriptions