yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #26604
[Bug 1407618] [NEW] unable to reload allocations neutron-dhcp-agent
Public bug reported:
In some cases dhcp agent dumps an exception because it's trying to use replace_file over a directory
which was never created.
http://logstash.openstack.org/#eyJzZWFyY2giOiJcIlVuYWJsZSB0byByZWxvYWRfYWxsb2NhdGlvbnMgZGhjcCBmb3JcIiIsImZpZWxkcyI6WyJsb2dfdXJsIl0sIm9mZnNldCI6MCwidGltZWZyYW1lIjoiNjA0ODAwIiwiZ3JhcGhtb2RlIjoiY291bnQiLCJ0aW1lIjp7InVzZXJfaW50ZXJ2YWwiOjB9LCJzdGFtcCI6MTQyMDQ1MDU0OTY2M30=
[req-84e8f66a-5401-424c-82d5-068267d81c7b None] Unable to reload_allocations dhcp for c2a866cf-a1db-4e50-9fc8-5da8b7320669.
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent Traceback (most recent call last):
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/opt/stack/new/neutron/neutron/agent/dhcp_agent.py", line 129, in call_driver
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent getattr(driver, action)(**action_kwargs)
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/opt/stack/new/neutron/neutron/agent/linux/dhcp.py", line 445, in reload_allocations
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent self._output_hosts_file()
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/opt/stack/new/neutron/neutron/agent/linux/dhcp.py", line 525, in _output_hosts_file
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent utils.replace_file(filename, buf.getvalue())
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/opt/stack/new/neutron/neutron/agent/linux/utils.py", line 112, in replace_file
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent tmp_file = tempfile.NamedTemporaryFile('w+', dir=base_dir, delete=False)
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/tempfile.py", line 462, in NamedTemporaryFile
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags)
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/tempfile.py", line 239, in _mkstemp_inner
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent fd = _os.open(file, flags, 0600)
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/usr/local/lib/python2.7/dist-packages/eventlet/green/os.py", line 109, in open
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent fd = __original_open__(file, flags, mode)
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent OSError: [Errno 2] No such file or directory: '/opt/stack/data/neutron/dhcp/c2a866cf-a1db-4e50-9fc8-5da8b7320669/tmpJnpUfM'
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent
Proper directory creation must always happen before any attempt to
"replace_file"
** Affects: neutron
Importance: Undecided
Assignee: Miguel Angel Ajo (mangelajo)
Status: New
** Changed in: neutron
Assignee: (unassigned) => Miguel Angel Ajo (mangelajo)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1407618
Title:
unable to reload allocations neutron-dhcp-agent
Status in OpenStack Neutron (virtual network service):
New
Bug description:
In some cases dhcp agent dumps an exception because it's trying to use replace_file over a directory
which was never created.
http://logstash.openstack.org/#eyJzZWFyY2giOiJcIlVuYWJsZSB0byByZWxvYWRfYWxsb2NhdGlvbnMgZGhjcCBmb3JcIiIsImZpZWxkcyI6WyJsb2dfdXJsIl0sIm9mZnNldCI6MCwidGltZWZyYW1lIjoiNjA0ODAwIiwiZ3JhcGhtb2RlIjoiY291bnQiLCJ0aW1lIjp7InVzZXJfaW50ZXJ2YWwiOjB9LCJzdGFtcCI6MTQyMDQ1MDU0OTY2M30=
[req-84e8f66a-5401-424c-82d5-068267d81c7b None] Unable to reload_allocations dhcp for c2a866cf-a1db-4e50-9fc8-5da8b7320669.
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent Traceback (most recent call last):
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/opt/stack/new/neutron/neutron/agent/dhcp_agent.py", line 129, in call_driver
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent getattr(driver, action)(**action_kwargs)
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/opt/stack/new/neutron/neutron/agent/linux/dhcp.py", line 445, in reload_allocations
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent self._output_hosts_file()
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/opt/stack/new/neutron/neutron/agent/linux/dhcp.py", line 525, in _output_hosts_file
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent utils.replace_file(filename, buf.getvalue())
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/opt/stack/new/neutron/neutron/agent/linux/utils.py", line 112, in replace_file
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent tmp_file = tempfile.NamedTemporaryFile('w+', dir=base_dir, delete=False)
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/tempfile.py", line 462, in NamedTemporaryFile
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags)
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/usr/lib/python2.7/tempfile.py", line 239, in _mkstemp_inner
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent fd = _os.open(file, flags, 0600)
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent File "/usr/local/lib/python2.7/dist-packages/eventlet/green/os.py", line 109, in open
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent fd = __original_open__(file, flags, mode)
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent OSError: [Errno 2] No such file or directory: '/opt/stack/data/neutron/dhcp/c2a866cf-a1db-4e50-9fc8-5da8b7320669/tmpJnpUfM'
2015-01-05 09:06:38.554 2489 TRACE neutron.agent.dhcp_agent
Proper directory creation must always happen before any attempt to
"replace_file"
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1407618/+subscriptions
Follow ups
References