New Question

Revision history [back]

click to hide/show revision 1
initial version

Neutron Hyper-V agent Exception: too many values to unpack (expected 2)

Hi, I'm using Victoria to configure OpenStack.

The KVM node is working fine, but the Hyper-V node has an error and is stuck.

OpenStack Version: Victoria

Compute Node OS Version : Windows Server 2019 Datacenter Edition

Neutron Hyper-V agent configuration

The following error message log will be output and the Neutron Port will be in the Building state.

2021-06-14 07:57:19.402 6652 DEBUG neutron.agent.securitygroups_rpc [-] Update port filter for 7ae8fafd-1372-40f7-a4a0-a1f03da8cbac _apply_port_filter C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\neutron\agent\securitygroups_rpc.py:166
2021-06-14 07:57:19.402 6652 INFO networking_hyperv.neutron.security_groups_driver [-] Updating port rules.
2021-06-14 07:57:19.402 6652 INFO networking_hyperv.neutron.security_groups_driver [-] Device 7ae8fafd-1372-40f7-a4a0-a1f03da8cbac not yet added. Adding.
2021-06-14 07:57:19.402 6652 DEBUG networking_hyperv.neutron.security_groups_driver [-] Creating port 3 rules prepare_port_filter C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\security_groups_driver.py:141
2021-06-14 07:57:19.402 6652 DEBUG networking_hyperv.neutron.security_groups_driver [-] Creating default reject rules. prepare_port_filter C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\security_groups_driver.py:145
2021-06-14 07:57:19.449 6652 DEBUG oslo_concurrency.lockutils [-] Lock "n-hv-driver-port-lock-7ae8fafd-1372-40f7-a4a0-a1f03da8cbac" acquired by "networking_hyperv.neutron._common_utils.get_port_synchronized_decorator.<locals>._port_synchronized.<locals>.wrapper.<locals>.inner" :: waited 0.000s inner C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\oslo_concurrency\lockutils.py:359
2021-06-14 07:57:19.481 6652 DEBUG oslo_concurrency.lockutils [-] Lock "n-hv-driver-port-lock-7ae8fafd-1372-40f7-a4a0-a1f03da8cbac" released by "networking_hyperv.neutron._common_utils.get_port_synchronized_decorator.<locals>._port_synchronized.<locals>.wrapper.<locals>.inner" :: held 0.032s inner C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\oslo_concurrency\lockutils.py:371
2021-06-14 07:57:19.481 6652 DEBUG oslo_concurrency.lockutils [-] Lock "n-hv-agent-port-lock-7ae8fafd-1372-40f7-a4a0-a1f03da8cbac" released by "networking_hyperv.neutron._common_utils.get_port_synchronized_decorator.<locals>._port_synchronized.<locals>.wrapper.<locals>.inner" :: held 0.344s inner C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\oslo_concurrency\lockutils.py:371
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2 [-] Exception encountered while processing port 7ae8fafd-1372-40f7-a4a0-a1f03da8cbac. Exception: too many values to unpack (expected 2): ValueError: too many values to unpack (expected 2)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2 Traceback (most recent call last):
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\agent\layer2.py", line 314, in process_added_port
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     self._process_added_port(device_details)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\agent\hyperv_neutron_agent.py", line 253, in _process_added_port
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     device_details)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\agent\layer2.py", line 302, in _process_added_port
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     set_port_sriov=set_port_sriov)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\_common_utils.py", line 41, in wrapper
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     return inner()
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\oslo_concurrency\lockutils.py", line 360, in inner
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     return f(*args, **kwargs)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\_common_utils.py", line 40, in inner
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     return f(*args, **kwargs)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\agent\layer2.py", line 479, in _treat_vif_port
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     port_security_enabled, set_port_sriov)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\agent\hyperv_neutron_agent.py", line 216, in _port_bound
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     self._sec_groups_agent.refresh_firewall([port_id])
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\neutron\agent\securitygroups_rpc.py", line 127, in decorated_function
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     *args, **kwargs)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\neutron\agent\securitygroups_rpc.py", line 235, in refresh_firewall
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     self._apply_port_filter(device_ids, update_filter=True)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\neutron\agent\securitygroups_rpc.py", line 167, in _apply_port_filter
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     self.firewall.update_port_filter(device)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\_common_utils.py", line 54, in wrapper
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     return f(*args, **kwargs)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\security_groups_driver.py", line 232, in update_port_filter
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     self.prepare_port_filter(port)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\_common_utils.py", line 54, in wrapper
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     return f(*args, **kwargs)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\security_groups_driver.py", line 154, in prepare_port_filter
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     newrules = self._generate_rules([port])
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\security_groups_driver.py", line 129, in _generate_rules
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     port, constants.INGRESS_DIRECTION))
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2   File "C:\Program Files\Cloudbase Solutions\OpenStack\Nova\Python\lib\site-packages\networking_hyperv\neutron\security_groups_driver.py", line 90, in _select_sg_rules_for_port
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2     for ip, mac in self._sg_members[remote_group_id][ethertype]:
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2 ValueError: too many values to unpack (expected 2)
2021-06-14 07:57:19.481 6652 ERROR networking_hyperv.neutron.agent.layer2

The VM is in ACTIVE STATUS, but it looks like the security group is not being handled properly and there is no communication.

VM port will also remain in BUILD status.

Ubuntu KVM Compute node is working fine.

If you have any information on this, please let me know. Thank you.