Description of problem: When an ovnmeta port is deleted, the next restart of neutron_api creates it again but with an ip address, even if the only subnet on the network is created without dhcp. Version-Release number of selected component (if applicable): RHOSP 16.2 How reproducible: I've reproduced the issue in 16.2.3 and 16.2.4 Steps to Reproduce: 1. Create a network ~~~ (overcloud) [stack.lab ~]$ openstack network create --provider-network-type vlan --provider-physical-network datacentre --provider-segment 1000 --share testport-vlan-1000 +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | UP | | availability_zone_hints | | | availability_zones | | | created_at | 2023-03-15T11:36:43Z | | description | | | dns_domain | | | id | b5d9944a-f1f1-4f8b-911c-41613b760efb | | ipv4_address_scope | None | | ipv6_address_scope | None | | is_default | False | | is_vlan_transparent | None | | location | cloud='', project.domain_id=, project.domain_name='Default', project.id='ac500269e66f46ffb988b66a309c84f4', project.name='admin', region_name='regionOne', zone= | | mtu | 1500 | | name | testport-vlan-1000 | | port_security_enabled | True | | project_id | ac500269e66f46ffb988b66a309c84f4 | | provider:network_type | vlan | | provider:physical_network | datacentre | | provider:segmentation_id | 1000 | | qos_policy_id | None | | revision_number | 1 | | router:external | Internal | | segments | None | | shared | True | | status | ACTIVE | | subnets | | | tags | | | updated_at | 2023-03-15T11:36:44Z | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ (overcloud) [stack.lab ~]$ ~~~ 2. Create a subnet on top, specifying no-dhcp for the subnet ~~~ (overcloud) [stack.lab ~]$ openstack subnet create --subnet-range 10.11.1.0/24 --dns-nameserver 10.11.1.1 --allocation-pool start=10.11.1.4,end=10.11.1.254 --no-dhcp --network testport-vlan-1000 subnet-vlan100 +-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | allocation_pools | 10.11.1.4-10.11.1.254 | | cidr | 10.11.1.0/24 | | created_at | 2023-03-15T11:37:34Z | | description | | | dns_nameservers | 10.11.1.1 | | enable_dhcp | False | | gateway_ip | 10.11.1.1 | | host_routes | | | id | 756efeab-7534-4788-9fc5-f4fb354e2c15 | | ip_version | 4 | | ipv6_address_mode | None | | ipv6_ra_mode | None | | location | cloud='', project.domain_id=, project.domain_name='Default', project.id='ac500269e66f46ffb988b66a309c84f4', project.name='admin', region_name='regionOne', zone= | | name | subnet-vlan100 | | network_id | b5d9944a-f1f1-4f8b-911c-41613b760efb | | prefix_length | None | | project_id | ac500269e66f46ffb988b66a309c84f4 | | revision_number | 0 | | segment_id | None | | service_types | | | subnetpool_id | None | | tags | | | updated_at | 2023-03-15T11:37:34Z | +-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ (overcloud) [stack.lab ~]$ ~~~ 3. Display port properties (no ip address is assigned): ~~~ (overcloud) [stack.lab ~]$ openstack port list --network testport-vlan-1000 +--------------------------------------+------+-------------------+--------------------+--------+ | ID | Name | MAC Address | Fixed IP Addresses | Status | +--------------------------------------+------+-------------------+--------------------+--------+ | 333518a8-d9a4-452d-ab21-e3bcbd896547 | | fa:16:3e:90:31:e9 | | DOWN | +--------------------------------------+------+-------------------+--------------------+--------+ (overcloud) [stack.lab ~]$ (overcloud) [stack.lab ~]$ openstack port show 333518a8-d9a4-452d-ab21-e3bcbd896547 +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | UP | | allowed_address_pairs | | | binding_host_id | | | binding_profile | | | binding_vif_details | | | binding_vif_type | unbound | | binding_vnic_type | normal | | created_at | 2023-03-15T11:36:47Z | | data_plane_status | None | | description | | | device_id | ovnmeta-b5d9944a-f1f1-4f8b-911c-41613b760efb | | device_owner | network:dhcp | | dns_assignment | | | dns_domain | None | | dns_name | | | extra_dhcp_opts | | | fixed_ips | | | id | 333518a8-d9a4-452d-ab21-e3bcbd896547 | | location | cloud='', project.domain_id=, project.domain_name='Default', project.id='ac500269e66f46ffb988b66a309c84f4', project.name='admin', region_name='regionOne', zone= | | mac_address | fa:16:3e:90:31:e9 | | name | | | network_id | b5d9944a-f1f1-4f8b-911c-41613b760efb | | port_security_enabled | False | | project_id | ac500269e66f46ffb988b66a309c84f4 | | propagate_uplink_status | None | | qos_policy_id | None | | resource_request | None | | revision_number | 1 | | security_group_ids | | | status | DOWN | | tags | | | trunk_details | None | | updated_at | 2023-03-15T11:36:47Z | +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ (overcloud) [stack.lab ~]$ ~~~ 4. Delete the port: ~~~ (overcloud) [stack.lab ~]$ openstack port delete 333518a8-d9a4-452d-ab21-e3bcbd896547 (overcloud) [stack.lab ~]$ ~~~ 5. Restart neutron_api: ~~~ (overcloud) [stack.lab ~]$ ansible -i inventory.yaml -m shell -a 'podman restart neutron_api' -f 1 -b Controller overcloud-controller-0 | CHANGED | rc=0 >> 955450c767141cf039911f175f26be7aa07922c8d5866035b8373daa08c06e58 overcloud-controller-1 | CHANGED | rc=0 >> 29df659abbd3df3c60586785dffb1f21460ce28aa060b4b06ba23ebbe3a9f85d overcloud-controller-2 | CHANGED | rc=0 >> 6148b177cb8025a7152983ce099ac4ac237e40d2089bb5355601d42c4901ead3 (overcloud) [stack.lab ~]$ ~~~ 6. Check ports again: ~~~ (overcloud) [stack.lab ~]$ openstack port list --network testport-vlan-1000 +--------------------------------------+------+-------------------+--------------------------------------------------------------------------+--------+ | ID | Name | MAC Address | Fixed IP Addresses | Status | +--------------------------------------+------+-------------------+--------------------------------------------------------------------------+--------+ | 2dae73b9-875b-4086-a1d1-69d1237480d2 | | fa:16:3e:ba:78:b0 | ip_address='10.11.1.4', subnet_id='756efeab-7534-4788-9fc5-f4fb354e2c15' | DOWN | +--------------------------------------+------+-------------------+--------------------------------------------------------------------------+--------+ (overcloud) [stack.lab ~]$ (overcloud) [stack.lab ~]$ openstack port show 2dae73b9-875b-4086-a1d1-69d1237480d2 +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | UP | | allowed_address_pairs | | | binding_host_id | | | binding_profile | | | binding_vif_details | | | binding_vif_type | unbound | | binding_vnic_type | normal | | created_at | 2023-03-15T11:42:48Z | | data_plane_status | None | | description | | | device_id | ovnmeta-b5d9944a-f1f1-4f8b-911c-41613b760efb | | device_owner | network:dhcp | | dns_assignment | fqdn='host-10-11-1-4.openstacklocal.', hostname='host-10-11-1-4', ip_address='10.11.1.4' | | dns_domain | None | | dns_name | | | extra_dhcp_opts | | | fixed_ips | ip_address='10.11.1.4', subnet_id='756efeab-7534-4788-9fc5-f4fb354e2c15' | | id | 2dae73b9-875b-4086-a1d1-69d1237480d2 | | location | cloud='', project.domain_id=, project.domain_name='Default', project.id='ac500269e66f46ffb988b66a309c84f4', project.name='admin', region_name='regionOne', zone= | | mac_address | fa:16:3e:ba:78:b0 | | name | | | network_id | b5d9944a-f1f1-4f8b-911c-41613b760efb | | port_security_enabled | False | | project_id | ac500269e66f46ffb988b66a309c84f4 | | propagate_uplink_status | None | | qos_policy_id | None | | resource_request | None | | revision_number | 1 | | security_group_ids | | | status | DOWN | | tags | | | trunk_details | None | | updated_at | 2023-03-15T11:42:50Z | +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ (overcloud) [stack.lab ~]$ ~~~ Actual results: When the port is recreated, an ip address matching the subnet range and id is added, even though the original port did not have it. Expected results: The port should be created without and ip address, if the only subnet on the network does not have dhcp. Additional info:
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat OpenStack Platform 16.2.5 (Train) bug fix and enhancement advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:1763
*** Bug 2211146 has been marked as a duplicate of this bug. ***