Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Permission denied in dhcp agent

I am running Juno on Open Suse. I see this error:

2015-02-09 20:31:57.483 213 ERROR neutron.agent.dhcp_agent [-] Unable to enable dhcp for 4be52cd6-b2ad-4bc7-9941-d0543380df7b.
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent Traceback (most recent call last):
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/dhcp_agent.py", line 128, in call_driver
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent     getattr(driver, action)(**action_kwargs)
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/dhcp.py", line 206, in enable
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent     self.spawn_process()
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/dhcp.py", line 427, in spawn_process
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent     ip_wrapper.netns.execute(cmd, addl_env=env)
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 550, in execute
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent     check_exit_code=check_exit_code, extra_ok_codes=extra_ok_codes)
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py", line 84, in execute
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent     raise RuntimeError(m)
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent RuntimeError:
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent Command: ['sudo', 'neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qdhcp-4be52cd6-b2ad-4bc7-9941-d0543380df7b', 'env', 'NEUTRON_NETWORK_ID=4be52cd6-b2ad-4bc7-9941-d0543380df7b', 'dnsmasq', '--no-hosts', '--no-resolv', '--strict-order', '--bind-interfaces', '--interface=tapd75afbaa-52', '--except-interface=lo', '--pid-file=/var/lib/neutron/dhcp/4be52cd6-b2ad-4bc7-9941-d0543380df7b/pid', '--dhcp-hostsfile=/var/lib/neutron/dhcp/4be52cd6-b2ad-4bc7-9941-d0543380df7b/host', '--addn-hosts=/var/lib/neutron/dhcp/4be52cd6-b2ad-4bc7-9941-d0543380df7b/addn_hosts', '--dhcp-optsfile=/var/lib/neutron/dhcp/4be52cd6-b2ad-4bc7-9941-d0543380df7b/opts', '--leasefile-ro', '--dhcp-range=set:tag0,192.168.122.0,static,86400s', '--dhcp-lease-max=16', '--conf-file=', '--domain=openstacklocal']
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent Exit code: 3
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent Stdout: ''
2015-02-09 20:31:57.483 213 TRACE neutron.agent.dhcp_agent Stderr: '\ndnsmasq: failed to open pidfile /var/lib/neutron/dhcp/4be52cd6-b2ad-4bc7-9941-d0543380df7b/pid: Permission denied\n'

The root user owns that directory:

z0:/opt/ocs # ls -la /var/lib/neutron/dhcp/4be52cd6-b2ad-4bc7-9941-d0543380df7b/
total 16
drwxr-xr-x 1 root root  54 Feb  9 20:33 .
drwxr-xr-x 1 root root  72 Feb  7 00:59 ..
-rw-r--r-- 1 root root 201 Feb  9 20:33 addn_hosts
-rw-r--r-- 1 root root 198 Feb  9 20:33 host
-rw-r--r-- 1 root root  14 Feb  9 20:33 interface
-rw-r--r-- 1 root root  77 Feb  9 20:33 opts

How do I solve this?