Comment 0 for bug 1995292

Revision history for this message
Przemyslaw Hausman (phausman) wrote :

According to [1], for each network, an OVN localport for use as a metadata proxy is created. This port is owned by network:dhcp (in Ussuri) or network:distributed (in Yoga) so that it gets auto deleted upon the removal of the network and it remains DOWN and is not bound to any chassis.

openstack-service-checks discovers that ports are DOWN with a "check_ports" check, and triggers Nagios alerts, e.g. "CRITICAL: ports 3/11 are DOWN, 1/11 in UNKNOWN, 7/11 passed". If I understand correctly, these ports are DOWN by design and therefore openstack-service-checks should not report it as failure.

See the commands' results below.

1. https://docs.openstack.org/networking-ovn/latest/contributor/design/metadata_api.html#metadata-proxy-management-logic

```
ubuntu@sdtpdc41s100001:~/deploy$ openstack port list --device-owner network:distributed --long --max-width 80
+----------+------+-------------+--------------------+--------+-----------------+--------------+------+
| ID | Name | MAC Address | Fixed IP Addresses | Status | Security Groups | Device Owner | Tags |
+----------+------+-------------+--------------------+--------+-----------------+--------------+------+
| 2a95c95d | | fa:16:3e:f7 | ip_address='fc00:3 | DOWN | None | network:dist | |
| -9049-41 | | :db:16 | d46:c1c5:8992:f816 | | | ributed | |
| 01-9eb5- | | | :3eff:fef7:db16', | | | | |
| 9398843a | | | subnet_id='e2cac8d | | | | |
| b8e1 | | | 2-f773-4792-836a-3 | | | | |
| | | | cbbfd8c9a8e' | | | | |
| 44e3ac74 | | fa:16:3e:a0 | | DOWN | None | network:dist | |
| -3d67-44 | | :97:d1 | | | | ributed | |
| 51-8246- | | | | | | | |
| 032f5afc | | | | | | | |
| 880f | | | | | | | |
| 51d4a0bb | | fa:16:3e:92 | ip_address='192.16 | DOWN | None | network:dist | |
| -adc9-42 | | :7b:8a | 8.1.2', subnet_id= | | | ributed | |
| 75-aabc- | | | '586d1335-2eca-438 | | | | |
| 83f38045 | | | 5-b27d-969aedade76 | | | | |
| 1dda | | | 6' | | | | |
+----------+------+-------------+--------------------+--------+-----------------+--------------+------+

ubuntu@sdtpdc41s100001:~/deploy$ openstack port show 51d4a0bb-adc9-4275-aabc-83f380451dda --max-width 80
+-------------------------+----------------------------------------------------+
| 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 | 2022-10-31T07:05:04Z |
| data_plane_status | None |
| description | |
| device_id | ovnmeta-47e110ca-4e33-4a18-8505-53edd34ae023 |
| device_owner | network:distributed |
| device_profile | None |
| dns_assignment | fqdn='host-192-168-1-2.lightning.ndc-prod2.lan.', |
| | hostname='host-192-168-1-2', |
| | ip_address='192.168.1.2' |
| dns_domain | |
| dns_name | |
| extra_dhcp_opts | |
| fixed_ips | ip_address='192.168.1.2', |
| | subnet_id='586d1335-2eca-4385-b27d-969aedade766' |
| id | 51d4a0bb-adc9-4275-aabc-83f380451dda |
| ip_allocation | immediate |
| mac_address | fa:16:3e:92:7b:8a |
| name | |
| network_id | 47e110ca-4e33-4a18-8505-53edd34ae023 |
| numa_affinity_policy | None |
| port_security_enabled | False |
| project_id | efd20e7f792f49d6982b9de4dbbb72b6 |
| propagate_uplink_status | None |
| qos_network_policy_id | None |
| qos_policy_id | None |
| resource_request | None |
| revision_number | 2 |
| security_group_ids | |
| status | DOWN |
| tags | |
| trunk_details | None |
| updated_at | 2022-10-31T07:05:04Z |
+-------------------------+----------------------------------------------------+

ubuntu@sdtpdc41s100001:~/deploy$ openstack subnet list --name ubuntu-subnet
+--------------------------------------+---------------+--------------------------------------+----------------+
| ID | Name | Network | Subnet |
+--------------------------------------+---------------+--------------------------------------+----------------+
| 586d1335-2eca-4385-b27d-969aedade766 | ubuntu-subnet | 47e110ca-4e33-4a18-8505-53edd34ae023 | 192.168.1.0/24 |
+--------------------------------------+---------------+--------------------------------------+----------------+

ubuntu@sdtpdc41s100001:~/deploy$ openstack subnet show ubuntu-subnet
+----------------------+--------------------------------------+
| Field | Value |
+----------------------+--------------------------------------+
| allocation_pools | 192.168.1.2-192.168.1.254 |
| cidr | 192.168.1.0/24 |
| created_at | 2022-10-31T07:05:04Z |
| description | |
| dns_nameservers | |
| dns_publish_fixed_ip | None |
| enable_dhcp | True |
| gateway_ip | 192.168.1.1 |
| host_routes | |
| id | 586d1335-2eca-4385-b27d-969aedade766 |
| ip_version | 4 |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| name | ubuntu-subnet |
| network_id | 47e110ca-4e33-4a18-8505-53edd34ae023 |
| project_id | efd20e7f792f49d6982b9de4dbbb72b6 |
| revision_number | 0 |
| segment_id | None |
| service_types | |
| subnetpool_id | None |
| tags | |
| updated_at | 2022-10-31T07:05:04Z |
+----------------------+--------------------------------------+

ubuntu@sdtpdc41s100001:~/deploy$ juju run -a nova-compute sudo ip netns
[...]
- Stdout: |
    ovnmeta-47e110ca-4e33-4a18-8505-53edd34ae023 (id: 0)
  UnitId: nova-compute/6
[...]

ubuntu@sdtpdc41s100001:~/deploy$ juju ssh nova-compute/6 sudo ip netns exec ovnmeta-47e110ca-4e33-4a18-8505-53edd34ae023 ip -o -4 a
1: lo inet 127.0.0.1/8 scope host lo\ valid_lft forever preferred_lft forever
2: tap47e110ca-41 inet 192.168.1.2/24 brd 192.168.1.255 scope global tap47e110ca-41\ valid_lft forever preferred_lft forever
2: tap47e110ca-41 inet 169.254.169.254/32 brd 169.254.169.254 scope global tap47e110ca-41\ valid_lft forever preferred_lft forever

ubuntu@sdtpdc41s100001:~/deploy$ juju ssh nova-compute/6 sudo ip netns exec ovnmeta-47e110ca-4e33-4a18-8505-53edd34ae023 ip r
192.168.1.0/24 dev tap47e110ca-41 proto kernel scope link src 192.168.1.2
```