[Bug 2015090] Re: neutron.agent.dhcp.agent TypeError: 'bool' object is not subscriptable

Felipe Reyes 2015090 at bugs.launchpad.net
Tue Apr 11 17:39:23 UTC 2023


On Tue, 2023-04-11 at 14:05 +0000, Sahid Orentino wrote:
> Hum... line 33 and 45 of [0] we can see that your networks are not
> attached to any segments. It is not expected that the code go through
> the point that you are mentioning on comment #7, see [1].
> 
> anychance that you print network.segments ? In all cases I will check
> the code to understand what's going on...

I applied this change[0] which produced this output [1] (this is a different environment, so the
list/show for network, subnet and segments are [2] in case you need to cross reference the UUIDs)

The network that has associated a segment with the segment_id set to
None is of network_type flat:

network: 9eb0c107-fc1b-494b-922a-645c2f728fc3
segment: hosts=['juju-aae23a-jammy-antelope-8.project.serverstack',
                'juju-aae23a-jammy-antelope-9.project.serverstack'],
         id=9fa37738-1cd1-48bf-8d2b-426bd65216f6,
         is_dynamic=False,
         name=None,
         network_id=9eb0c107-fc1b-494b-922a-645c2f728fc3,
         network_type=flat,
         physical_network=physnet1,
         segment_index=0,
         segmentation_id=None

[0] https://pastebin.ubuntu.com/p/qRWwZFwcpH/
[1] https://pastebin.ubuntu.com/p/hdRZmjDFvs/
[2] https://pastebin.ubuntu.com/p/VCmBfyZyRk/

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to neutron in Ubuntu.
https://bugs.launchpad.net/bugs/2015090

Title:
  neutron.agent.dhcp.agent TypeError: 'bool' object is not subscriptable

Status in OpenStack Neutron Open vSwitch Charm:
  Invalid
Status in neutron:
  Triaged
Status in neutron package in Ubuntu:
  New

Bug description:
  In a fresh environment running Antelope (on top of Ubuntu 22.04), with
  a DVR configuration (neutron-dhcp-agent and neutron-metadata-agent
  running on compute nodes) the metadata service is not available
  instances, this is an environment using neutron-openvswitch
  environment (not OVN), when looking into the logs the stacktrace below
  indicates an unexpected data type.

  [Stacktrace]

  2023-03-31 19:35:06.093 58625 DEBUG neutron.agent.dhcp.agent [-] Calling driver for network: 6d246d86-11b5-4d5f-aa9c-c2bcbcc28b62/seg=None action: get_metadata_bind_interface _call_driver /usr/lib/python3/dist-packages/neutron/agent/dhcp/agent.py:242
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent [-] 'bool' object is not subscriptable: TypeError: 'bool' object is not subscriptable
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent Traceback (most recent call last):
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/common/utils.py", line 182, in call
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     return func(*args, **kwargs)
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/agent/dhcp/agent.py", line 434, in safe_configure_dhcp_for_network
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     self.configure_dhcp_for_network(network)
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/osprofiler/profiler.py", line 159, in wrapper
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     result = f(*args, **kwargs)
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/agent/dhcp/agent.py", line 447, in configure_dhcp_for_network
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     self.update_isolated_metadata_proxy(network)
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/osprofiler/profiler.py", line 159, in wrapper
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     result = f(*args, **kwargs)
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/agent/dhcp/agent.py", line 763, in update_isolated_metadata_proxy
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     self.enable_isolated_metadata_proxy(network)
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/osprofiler/profiler.py", line 159, in wrapper
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     result = f(*args, **kwargs)
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/agent/dhcp/agent.py", line 819, in enable_isolated_metadata_proxy
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     metadata_driver.MetadataDriver.spawn_monitored_metadata_proxy(
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/agent/metadata/driver.py", line 244, in spawn_monitored_metadata_proxy
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     ip_lib.IpAddrCommand(
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/agent/linux/ip_lib.py", line 609, in wait_until_address_ready
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     common_utils.wait_until_true(
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/common/utils.py", line 744, in wait_until_true
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     while not predicate():
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/agent/linux/ip_lib.py", line 594, in is_address_ready
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     addr_info = self.list(to=address)[0]
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/agent/linux/ip_lib.py", line 574, in list
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     devices = get_devices_with_ip(self._parent.namespace, name=self.name,
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/agent/linux/ip_lib.py", line 431, in name
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     return self._parent.name
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent   File "/usr/lib/python3/dist-packages/neutron/agent/linux/ip_lib.py", line 416, in name
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent     return self._name[:constants.DEVICE_NAME_MAX_LEN]
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent TypeError: 'bool' object is not subscriptable
  2023-03-31 19:35:06.095 58625 ERROR neutron.agent.dhcp.agent
  2023-03-31 19:35:06.099 58625 INFO neutron.agent.dhcp.agent [None req-4298bc12-95ea-476c-8503-7258e4454721 - - - - - -] Synchronizing state complete

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-neutron-openvswitch/+bug/2015090/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list