yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #04564
[Bug 1219893] Re: DHCP agent fails when used with plugin that doesn't supports extra_dhcp_opt extension
** Changed in: neutron
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1219893
Title:
DHCP agent fails when used with plugin that doesn't supports
extra_dhcp_opt extension
Status in OpenStack Neutron (virtual network service):
Fix Released
Bug description:
When DHCP agent is used with ML2 plugin that doesn't yet support
extra_dhcp_opt extension, it fails to serve IP adresses.
Here is the log:
2013-09-02 17:51:14.232 9079 DEBUG neutron.agent.linux.dhcp [-] Unable to access /opt/stack/data/neutron/dhcp/6b7f26d9-a1a4-44f9-b63c-1001f5f0d0ad/pid _get_value_from_conf_file /opt/stack/neutron/neutron/agent/linux/dhcp.py:217
2013-09-02 17:51:14.233 9079 ERROR neutron.agent.dhcp_agent [-] Unable to enable dhcp.
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent Traceback (most recent call last):
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/dhcp_agent.py", line 126, in call_driver
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent getattr(driver, action)(**action_kwargs)
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 165, in enable
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent self.restart()
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 122, in restart
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent self.enable()
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 168, in enable
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent self.spawn_process()
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 319, in spawn_process
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent '--dhcp-hostsfile=%s' % self._output_hosts_file(),
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 401, in _output_hosts_file
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent if port.extra_dhcp_opts:
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent AttributeError: 'DictModel' object has no attribute 'extra_dhcp_opts'
2013-09-02 17:51:14.233 9079 TRACE neutron.agent.dhcp_agent
Changing "if port.extra_dhcp_opts:" to "if hasattr(port,
'extra_dhcp_opts') and port.extra_dhcp_opts:" in the following places
seems to fix the issue.
https://github.com/openstack/neutron/blob/master/neutron/agent/linux/dhcp.py#L401
https://github.com/openstack/neutron/blob/master/neutron/agent/linux/dhcp.py#L466
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1219893/+subscriptions