Ask Your Question

abhishek-i's profile - activity

2016-10-09 00:08:00 -0500 received badge  Famous Question (source)
2015-06-05 22:09:52 -0500 received badge  Notable Question (source)
2015-05-29 10:56:34 -0500 received badge  Popular Question (source)
2015-05-29 09:57:14 -0500 received badge  Scholar (source)
2015-05-29 00:19:43 -0500 received badge  Nice Answer (source)
2015-05-28 13:10:53 -0500 asked a question Neutron DHCP issues on Juno

I'm running Juno. When my network node reboots, the dnsmasq process and the metadata namespace proxy does not start up. DHCP agent does start up, and it's logs has

2015-05-28 17:49:14.629 475 ERROR neutron.agent.dhcp_agent [-] Unable to enable dhcp for 70671d80-6d49-4e3a-9d12-a474828dc653. 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent Traceback (most recent call last): 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/site-packages/neutron/agent/dhcp_agent.py", line 128, in call_driver 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent
getattr(driver, action)(**action_kwargs) 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/dhcp.py", line 204, in enable 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent
interface_name = self.device_manager.setup(self.network) 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/dhcp.py", line 994, in setup 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent
namespace=network.namespace) 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/interface.py", line 265, in plug 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent
namespace_obj.add_device_to_namespace(ns_dev) 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 168, in add_device_to_namespace 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent
device.link.set_netns(self.namespace) 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 267, in set_netns 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent
self._as_root('set', self.name, 'netns', namespace) 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 242, in _as_root 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent
kwargs.get('use_root_namespace', False)) 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 74, in _as_root 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent
log_fail_as_error=self.log_fail_as_error) 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 86, in _execute 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent
log_fail_as_error=log_fail_as_error) 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py", line 84, in execute 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent raise RuntimeError(m) 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent RuntimeError: 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent Command: ['sudo', 'ip', 'link', 'set', 'tap6e2fb7e8-b1', 'netns', 'qdhcp-70671d80-6d49-4e3a-9d12-a474828dc653'] 2015-05-28 17:49:14.629 475 TRACE neutron.agent.dhcp_agent Exit code: 2 2015-05-28 17:49:14.629 475 TRACE ...








(more)
2015-03-31 12:34:47 -0500 received badge  Famous Question (source)
2015-02-12 14:12:35 -0500 received badge  Enthusiast
2015-02-11 16:28:11 -0500 commented answer Permission denied in dhcp agent

I totally second that. Took me a day to debug this!

2015-02-11 01:10:34 -0500 received badge  Teacher (source)
2015-02-11 01:10:34 -0500 received badge  Self-Learner (source)
2015-02-10 23:27:29 -0500 received badge  Notable Question (source)
2015-02-10 19:13:53 -0500 answered a question Permission denied in dhcp agent

It turned out that apparmor was blocking writes to that directory. This worked fine on disabling apparmor. Thanks to everyone who looked into it.

2015-02-10 16:00:32 -0500 commented question Permission denied in dhcp agent

neutron is running as root. Also, those files are owned by root.

2015-02-10 12:28:21 -0500 commented question Permission denied in dhcp agent

That did not help :(

2015-02-10 12:28:06 -0500 commented answer Permission denied in dhcp agent

I'm on opensuse, so that file is called openstack-neutron. But I do have it and sudoers does include that directory. This is what I have:

Defaults:neutron !syslog
neutron ALL = (root) NOPASSWD: /usr/bin/neutron-rootwrap
2015-02-10 12:23:48 -0500 received badge  Popular Question (source)
2015-02-10 01:34:27 -0500 received badge  Student (source)
2015-02-09 16:49:52 -0500 asked a question 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?

2014-03-12 23:23:34 -0500 received badge  Famous Question (source)
2013-12-23 13:03:58 -0500 received badge  Popular Question (source)
2013-12-23 13:03:58 -0500 received badge  Notable Question (source)
2013-11-25 23:51:07 -0500 asked a question Error while running tox on python-novaclient

I am trying to run tox on python-novaclient that I checked out right now. It says that all tests passed and then I see an InvocationError

abhishek@docean01:~/workspace/openstack/python-novaclient$ tox -e py26
GLOB sdist-make: /home/abhishek/workspace/openstack/python-novaclient/setup.py
py26 create: /home/abhishek/workspace/openstack/python-novaclient/.tox/py26
py26 installdeps: -r/home/abhishek/workspace/openstack/python-novaclient/requirements.txt, -r/home/abhishek/workspace/openstack/python-novaclient/test-requirements.txt
py26 inst: /home/abhishek/workspace/openstack/python-novaclient/.tox/dist/python-novaclient-2.15.0.92.g915b0a4.zip
py26 runtests: commands[0] | python setup.py testr --testr-args=
running testr
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ./
Killed
======================================================================
FAIL: process-returncode
tags: worker-0
----------------------------------------------------------------------
Binary content:
  traceback (test/plain; charset="utf8")
Ran 428 tests in 18.940s
FAILED (id=0, failures=2)
error: testr failed (1)
ERROR: InvocationError: '/home/abhishek/workspace/openstack/python-novaclient/.tox/py26/bin/python setup.py testr --testr-args='
__________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
ERROR:   py26: commands failed

It runs fine when I run it by hand:

abhishek@docean01:~/workspace/openstack/python-novaclient$ .tox/py26/bin/python setup.py testr --testr-args=
running testr
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ./
Ran tests in 5.066s (-13.842s)
PASSED (id=1)

Why is it failing?