Bug 881741

Summary: Restarting l3_agent causes Stderr: 'RTNETLINK answers: Invalid argument\n'
Product: [Fedora] Fedora Reporter: Etsuji Nakai <enakai>
Component: openstack-quantumAssignee: Bob Kukura <rkukura>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: apevec, breu, chrisw, Jan.van.Eldik, jose.castro.leon, lpeer, markmc, maurizio.antillon, rkukura
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 08:22:33 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Description Flags
top 100lines from l3-agent.log just after restarting l3_agent none

Description Etsuji Nakai 2012-11-29 08:42:14 EST
Description of problem:

When restarting l3_agent, it causes the following error.

Command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ip', 'link', 'set', 'qg-8dd02d72-d5', 'netns', 'qrouter-08ad50c6-4081-45f8-954d-b76595a8bcb9']
Exit code: 2
Stdout: ''
Stderr: 'RTNETLINK answers: Invalid argument\n'

Version-Release number of selected component (if applicable):
# rpm -qa | grep quantum

Additional info:
I found the same error report in the upstream.


I checked that the patches in that report has been already applied, but I still see the error. There may be a different root cause.
Comment 1 Gary Kotton 2012-11-29 08:49:11 EST
I think that the reason for this is that the interface already exists. Can you please do the following:
1. Can you please clear the log
2. Can you please reboot
Does the message appear?
Comment 2 Etsuji Nakai 2012-11-29 21:25:19 EST
Yes, after rebooting the server, l3_agent worked well again. 

But as seen in the result below, I think it's still a problem that I cannot restart l3_agent without rebooting the server.

Here's the detailed result.

1. Starting from a router without any networks.

2. Create an external network and set it as a gateway. 
$ tenant=$(keystone tenant-list | awk '/service/ {print $2}')
$ quantum net-create --tenant-id $tenant public01 --provider:network_type flat --provider:physical_network physnet1 --router:external=True
Created a new network:
| Field                     | Value                                |
| admin_state_up            | True                                 |
| id                        | 2c614b55-2fd0-45ed-9190-018005f5199d |
| name                      | public01                             |
| provider:network_type     | flat                                 |
| provider:physical_network | physnet1                             |
| provider:segmentation_id  |                                      |
| router:external           | True                                 |
| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tenant_id                 | 2ff618d48d054638a9384e64b04d49b5     |
$ quantum subnet-create --tenant-id $tenant --name pub_subnet01 --gateway public01 --enable_dhcp False
Created a new subnet:
| Field            | Value                                            |
| allocation_pools | {"start": "", "end": ""} |
| cidr             |                                   |
| dns_nameservers  |                                                  |
| enable_dhcp      | False                                            |
| gateway_ip       |                                    |
| host_routes      |                                                  |
| id               | 5722cb45-b3d4-4c1a-9ef3-46ce4e45acf8             |
| ip_version       | 4                                                |
| name             | pub_subnet01                                     |
| network_id       | 2c614b55-2fd0-45ed-9190-018005f5199d             |
| tenant_id        | 2ff618d48d054638a9384e64b04d49b5                 |
$ quantum router-gateway-set router01 public01
Set gateway for router router01
$ quantum port-list
| id                                   | name | mac_address       | fixed_ips                                                                          |
| 3851239a-5b22-41e1-92fa-0832121a6c13 |      | fa:16:3e:85:fb:34 | {"subnet_id": "5722cb45-b3d4-4c1a-9ef3-46ce4e45acf8", "ip_address": ""} |

3. No error in l3-agent.log and the router's IP is reachable from an external server.

[From external server]$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=2 ttl=63 time=3.19 ms
64 bytes from icmp_seq=3 ttl=63 time=0.517 ms

4. Restart l3_agent and see the errors.

$ systemctl restart quantum-l3-agent.service

Command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ip', 'netns', 'exec', 'qrouter-08ad50c6-4081-45f8-954d-b76595a8bcb9', 'ip', '-o', 'link', 'list']
Exit code: 1
Stdout: ''
Stderr: 'seting the network namespace failed: Invalid argument\n'
Command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ip', 'netns', 'exec', 'qrouter-08ad50c6-4081-45f8-954d-b76595a8bcb9', 'sysctl', '-w', 'net.ipv4.ip_forward=1']
Exit code: 1
Stdout: ''
Stderr: 'seting the network namespace failed: Invalid argument\n'
Command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ip', 'link', 'set', 'qg-3851239a-5b', 'netns', 'qrouter-08ad50c6-4081-45f8-954d-b76595a8bcb9']
Exit code: 2
Stdout: ''
Stderr: 'RTNETLINK answers: Invalid argument\n'

And now, ping from an external server _fails_.
[From external server]$ ping
-- No response.

5. Reboot the server and start quantum.

Now no error is seen in l3-agent.log, and ping from an external server works again.

[From external server]$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=63 time=2.05 ms
64 bytes from icmp_seq=2 ttl=63 time=0.522 ms
Comment 3 Etsuji Nakai 2012-11-29 21:28:40 EST
Created attachment 654708 [details]
top 100lines from l3-agent.log just after restarting l3_agent
Comment 4 Gary Kotton 2012-11-30 13:50:31 EST
I'll take care of this next week.
Comment 5 Etsuji Nakai 2012-11-30 20:43:46 EST
Hi Gary,

I got the clue :)

It's related to the system-d's private tmp setting. In my Fedora18 setting, it's reolved by applying the following workarounds.

1. Apply this patch -> https://bugzilla.redhat.com/show_bug.cgi?id=881733#c1
This is not directly related to this problem. But it's necessary to run l3_agent.

2. Set "PrivateTmp=false" in the follwing files.


See https://bugzilla.redhat.com/show_bug.cgi?id=872689#c2 for the background.

Now you can restart l3_agent and it works well without restarting the server.

The side effect of this setting is that when l3_agent runs "ip netns exec ...", it breaks the /sys mounting as in https://bugzilla.redhat.com/show_bug.cgi?id=882047 .

As a result, systemctl stop working as below.
$ systemctl 
Failed to get D-Bus connection: No connection to service manager.

I'm not sure the reason but by "run-and-stop systemd" as below makes systemctl works again.
$ systemd
Failed to open private bus connection: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
(Stop it with Ctrl+C)

Comment 6 Gary Kotton 2012-12-02 03:36:33 EST
I have validated the "PrivateTmp=false". I think that this should just be done in the dhcp and l3 agent files as they are the only ones that make use of namespaces.
Comment 7 Fedora End Of Life 2013-12-21 04:32:46 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 8 Fedora End Of Life 2014-02-05 08:22:37 EST
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.