DHCP agent log error:neutron.agent.linux.utils [-] 'Cannot open network namespace: No such file or directory\n'
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 127.0.0.1/8 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 10.0.2.3/24 brd 10.0.2.255 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.