Ask Your Question

DHCP agent log error:neutron.agent.linux.utils [-] 'Cannot open network namespace: No such file or directory\n'

asked 2014-08-07 02:19:43 -0600

Dongcan Ye gravatar image

updated 2014-08-07 20:17:29 -0600

Hi, all

I have met a problem when create a vm, in the subnet detail DHCP agent port status shows DOWN. Then I check the dhcp-agent log, error info show:

2014-08-07 14:31:17.641 3182 ERROR neutron.agent.linux.utils [-]
Command: ['sudo', 'ip', 'netns', 'exec', 'qdhcp-3f994ac0-c11b-4ac6-abbd-2cbc88327de8', 'ip', 'link', 'set', 'ns-5c472fe7-c3', 'up']
Exit code: 255
Stdout: ''
Stderr: 'Cannot open network namespace: No such file or directory\n'
2014-08-07 14:31:17.662 3182 ERROR neutron.agent.linux.utils [-]
Command: ['sudo', 'ip', 'netns', 'exec', 'qdhcp-3f994ac0-c11b-4ac6-abbd-2cbc88327de8', 'ip', '-o', 'link', 'show', 'ns-5c472fe7-c3']
Exit code: 255
Stdout: ''
Stderr: 'Cannot open network namespace: No such file or directory\n'

I use ip netns command to excute command, it can show :

 # ip netns exec qdhcp-3f994ac0-c11b-4ac6-abbd-2cbc88327de8 ip a show
11: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
12: ns-5c472fe7-c3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether fa:16:3e:94:9f:2e brd ff:ff:ff:ff:ff:ff
    inet brd scope global ns-5c472fe7-c3
    inet6 fe80::f816:3eff:fe94:9f2e/64 scope link 
       valid_lft forever preferred_lft forever

Then I open linux netns directory, the namespace file descriptor still in the directory:

# ls /var/run/netns/
qdhcp-3f994ac0-c11b-4ac6-abbd-2cbc88327de8  qdhcp-6e9d085d-b174-4e28-bc6f-7ab0f3763b1e  qrouter-89d53024-5f0f-459b-8c57-c9e2bd07650f

I also use visudo to make nonroot user("neutron") have priviledge.

When dhcp port create, the dhcp namespace use root:root to append to /var/run/nents.I have to chown -R neutron:neutron to modify /var/run/nents, but when next dhcp namespace is add, the owner and group is also root:root, that's a stupid method.

Please give me some advice to slove this problem.

By the way, the dnsmasq process also normal.

Thanks and regards, Dongcan Ye.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-08-11 05:30:28 -0600

Dongcan Ye gravatar image

Ok, I had sloved this problem.

Reinstall and change OS,and this error info also exists, But the dhcp agent and l3 agent is normal.

In the dhcp log and l3 log, the error info still occurs, but later the linux bridge uses the ip command set the dhcp port up and other operations, log show like this:

2014-08-11 17:55:47.576 3932 DEBUG neutron.agent.linux.utils [-]
Command: ['sudo', 'ip', 'netns', 'exec', 'qdhcp-168a7c7e-0290-4f61-bfb5-022487cf7416', 'ip', 'link', 'set', 'ns-ec8af50d-15', 'up']
Exit code: 0
Stdout: ''
Stderr: '' execute /usr/lib/python2.6/site-packages/neutron/agent/linux/

So the error code 255 is normal, but what's reason for this, I still confused.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2014-08-07 02:19:43 -0600

Seen: 2,211 times

Last updated: Aug 11 '14