Public bug reported:

Initially found here: https://bugzilla.redhat.com/show_bug.cgi?id=1256816#c9
Patch https://review.openstack.org/#/c/211963 intreduces a regression with 
force_metadata = True.
Using the option force_metadata = True can will cause neutron to fail:

ERROR neutron.agent.dhcp.agent [-] Unable to enable dhcp for 
ef93213d-2525-4088-abdd-9f7854ca68e7.
TRACE neutron.agent.dhcp.agent Traceback (most recent call last):
TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/dhcp/agent.py", line 115, in call_driver
TRACE neutron.agent.dhcp.agent     getattr(driver, action)(**action_kwargs)
TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 205, in enable
TRACE neutron.agent.dhcp.agent     self.spawn_process()
TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 413, in spawn_process
TRACE neutron.agent.dhcp.agent     
self._spawn_or_reload_process(reload_with_HUP=False)
TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 422, in 
_spawn_or_reload_process
TRACE neutron.agent.dhcp.agent     self._output_config_files()
TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 449, in 
_output_config_files
TRACE neutron.agent.dhcp.agent     self._output_opts_file()
TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 745, in 
_output_opts_file
TRACE neutron.agent.dhcp.agent     options, subnet_index_map = 
self._generate_opts_per_subnet()
TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 797, in 
_generate_opts_per_subnet
TRACE neutron.agent.dhcp.agent     subnet_dhcp_ip = 
subnet_to_interface_ip[subnet.id]
TRACE neutron.agent.dhcp.agent UnboundLocalError: local variable 
'subnet_to_interface_ip' referenced before assignment

Meaning, neutron won't be able to spawn a new instance of dnsmasq.
The reason for this:
when 'force_metadata = True' and 'enable_isolated_metadata = False' (default), 
the subnet_to_interface_ip won't be assigned.

** Affects: neutron
     Importance: Medium
     Assignee: Nir Magnezi (nmagnezi)
         Status: Confirmed

** Changed in: neutron
     Assignee: (unassigned) => Nir Magnezi (nmagnezi)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1499406

Title:
  The option force_metadata = True is broken

Status in neutron:
  Confirmed

Bug description:
  Initially found here: https://bugzilla.redhat.com/show_bug.cgi?id=1256816#c9
  Patch https://review.openstack.org/#/c/211963 intreduces a regression with 
force_metadata = True.
  Using the option force_metadata = True can will cause neutron to fail:

  ERROR neutron.agent.dhcp.agent [-] Unable to enable dhcp for 
ef93213d-2525-4088-abdd-9f7854ca68e7.
  TRACE neutron.agent.dhcp.agent Traceback (most recent call last):
  TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/dhcp/agent.py", line 115, in call_driver
  TRACE neutron.agent.dhcp.agent     getattr(driver, action)(**action_kwargs)
  TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 205, in enable
  TRACE neutron.agent.dhcp.agent     self.spawn_process()
  TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 413, in spawn_process
  TRACE neutron.agent.dhcp.agent     
self._spawn_or_reload_process(reload_with_HUP=False)
  TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 422, in 
_spawn_or_reload_process
  TRACE neutron.agent.dhcp.agent     self._output_config_files()
  TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 449, in 
_output_config_files
  TRACE neutron.agent.dhcp.agent     self._output_opts_file()
  TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 745, in 
_output_opts_file
  TRACE neutron.agent.dhcp.agent     options, subnet_index_map = 
self._generate_opts_per_subnet()
  TRACE neutron.agent.dhcp.agent   File 
"/opt/openstack/neutron/neutron/agent/linux/dhcp.py", line 797, in 
_generate_opts_per_subnet
  TRACE neutron.agent.dhcp.agent     subnet_dhcp_ip = 
subnet_to_interface_ip[subnet.id]
  TRACE neutron.agent.dhcp.agent UnboundLocalError: local variable 
'subnet_to_interface_ip' referenced before assignment

  Meaning, neutron won't be able to spawn a new instance of dnsmasq.
  The reason for this:
  when 'force_metadata = True' and 'enable_isolated_metadata = False' 
(default), the subnet_to_interface_ip won't be assigned.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1499406/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to