After just the IPv4 subnets in the reproducer there is a port with Device Owner: network:distributed which has IP addresess on both network segments.
openstack network create --share --provider-network-type geneve --provider-segment 777 test_net SEGMENT=`openstack network segment list --network test_net | awk '/777/ {print $2}'` openstack network segment set --name segment777 $SEGMENT openstack network segment create --network-type geneve --segment 778 --network test_net segment778
openstack subnet create --network test_net --network-segment segment777 --ip-version 4 --subnet-range 10.77.7.0/24 --dhcp segment777-v4
> DEBUG print's > HARALD - _query_filter_by_fixed_ips_segment allow_multiple_segments: True > HARALD - _query_filter_by_fixed_ips_segment fixed_ips: [{'subnet_id': '24bbf7fe-482b-455a-a24f-3f3445af5759'}]
openstack subnet create --network test_net --network-segment segment778 --ip-version 4 --subnet-range 10.77.8.0/24 --dhcp segment778-v4
> DEBUG print's > HARALD - _query_filter_by_fixed_ips_segment allow_multiple_segments: True > HARALD - _query_filter_by_fixed_ips_segment fixed_ips: [{'subnet_id': 'b2c2a935-8a85-44b2-8a0a-2e0533ad8d56'}, {'subnet_id': '24bbf7fe-482b-455a-a24f-3f3445af5759', 'ip_address': '10.77.7.2'}]
stack@heat-devstack:~$ openstack port list --long --network test_net -f yaml /usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead from cryptography.utils import int_from_bytes /usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead from cryptography.utils import int_from_bytes - Device Owner: network:distributed Fixed IP Addresses: - ip_address: 10.77.7.2 subnet_id: 4bab13e3-bef0-45d6-8c73-491c2e0cf183 - ip_address: 10.77.8.2 subnet_id: 82cd4ea5-fed6-4668-b373-f7d873f3d31c ID: 8e1c95f9-38b0-44c9-8249-dc9d0766fb01 MAC Address: fa:16:3e:49:97:80 Name: '' Security Groups: null Status: DOWN Tags: []
Updating this port with another address when adding the IPv6 subnet is failing.
openstack subnet create --network test_net --network-segment segment777 --ip-version 6 --subnet-range 2001:10:77:7::/64 --dhcp --ipv6-address-mode slaac segment777-v6
> DEBUG print's > HARALD - _query_filter_by_fixed_ips_segment allow_multiple_segments: False > HARALD - _query_filter_by_fixed_ips_segment fixed_ips: [{'subnet_id': '24bbf7fe-482b-455a-a24f-3f3445af5759', 'ip_address': '10.77.7.2'}, {'subnet_id': 'b2c2a935-8a85-44b2-8a0a-2e0533ad8d56', 'ip_address': '10.77.8.2'}]
The difference seems to be that in the IPv4 subnet create case the 'allow_multiple_segments' is True, while in the IPv6 case it is False.
In patch "[OVN] Allow IP allocation with different segments for OVN service ports"[1] the flag "distributed_service" was added.
I believe the problem here is that the flag "distributed_service" is not set in the IPv6 case?
[1] https://opendev.org/openstack/neutron/commit/8d1512afb07a9a77958c44f2e7f5d47865c8a475
After just the IPv4 subnets in the reproducer there is a port with Device Owner: network:distributed which has IP addresess on both network segments.
openstack network create --share --provider- network- type geneve --provider-segment 777 test_net
SEGMENT=`openstack network segment list --network test_net | awk '/777/ {print $2}'`
openstack network segment set --name segment777 $SEGMENT
openstack network segment create --network-type geneve --segment 778 --network test_net segment778
openstack subnet create --network test_net --network-segment segment777 --ip-version 4 --subnet-range 10.77.7.0/24 --dhcp segment777-v4
> DEBUG print's filter_ by_fixed_ ips_segment allow_multiple_ segments: True filter_ by_fixed_ ips_segment fixed_ips: [{'subnet_id': '24bbf7fe- 482b-455a- a24f-3f3445af57 59'}]
> HARALD - _query_
> HARALD - _query_
openstack subnet create --network test_net --network-segment segment778 --ip-version 4 --subnet-range 10.77.8.0/24 --dhcp segment778-v4
> DEBUG print's filter_ by_fixed_ ips_segment allow_multiple_ segments: True filter_ by_fixed_ ips_segment fixed_ips: [{'subnet_id': 'b2c2a935- 8a85-44b2- 8a0a-2e0533ad8d 56'}, {'subnet_id': '24bbf7fe- 482b-455a- a24f-3f3445af57 59', 'ip_address': '10.77.7.2'}]
> HARALD - _query_
> HARALD - _query_
stack@heat- devstack: ~$ openstack port list --long --network test_net -f yaml python3/ dist-packages/ secretstorage/ dhcrypto. py:15: CryptographyDep recationWarning : int_from_bytes is deprecated, use int.from_bytes instead python3/ dist-packages/ secretstorage/ util.py: 19: CryptographyDep recationWarning : int_from_bytes is deprecated, use int.from_bytes instead bef0-45d6- 8c73-491c2e0cf1 83 fed6-4668- b373-f7d873f3d3 1c 38b0-44c9- 8249-dc9d0766fb 01
/usr/lib/
from cryptography.utils import int_from_bytes
/usr/lib/
from cryptography.utils import int_from_bytes
- Device Owner: network:distributed
Fixed IP Addresses:
- ip_address: 10.77.7.2
subnet_id: 4bab13e3-
- ip_address: 10.77.8.2
subnet_id: 82cd4ea5-
ID: 8e1c95f9-
MAC Address: fa:16:3e:49:97:80
Name: ''
Security Groups: null
Status: DOWN
Tags: []
Updating this port with another address when adding the IPv6 subnet is failing.
openstack subnet create --network test_net --network-segment segment777 --ip-version 6 --subnet-range 2001:10:77:7::/64 --dhcp --ipv6-address-mode slaac segment777-v6
> DEBUG print's filter_ by_fixed_ ips_segment allow_multiple_ segments: False filter_ by_fixed_ ips_segment fixed_ips: [{'subnet_id': '24bbf7fe- 482b-455a- a24f-3f3445af57 59', 'ip_address': '10.77.7.2'}, {'subnet_id': 'b2c2a935- 8a85-44b2- 8a0a-2e0533ad8d 56', 'ip_address': '10.77.8.2'}]
> HARALD - _query_
> HARALD - _query_
The difference seems to be that in the IPv4 subnet create case the 'allow_ multiple_ segments' is True, while in the IPv6 case it is False.
In patch "[OVN] Allow IP allocation with different segments for OVN service ports"[1] the flag "distributed_ service" was added.
I believe the problem here is that the flag "distributed_ service" is not set in the IPv6 case?
[1] https:/ /opendev. org/openstack/ neutron/ commit/ 8d1512afb07a9a7 7958c44f2e7f5d4 7865c8a475