OVN port loses its virtual type after port update
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Cloud Archive |
Fix Released
|
Undecided
|
Unassigned | ||
Ussuri |
Fix Released
|
High
|
Unassigned | ||
Victoria |
Fix Released
|
High
|
Unassigned | ||
Wallaby |
Fix Released
|
Undecided
|
Unassigned | ||
Xena |
Fix Released
|
Undecided
|
Unassigned | ||
Yoga |
Fix Released
|
Undecided
|
Unassigned | ||
Zed |
Fix Released
|
Undecided
|
Unassigned | ||
neutron |
Fix Released
|
Medium
|
Rodolfo Alonso | ||
neutron (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
High
|
Unassigned |
Bug Description
Bug found in Octavia (master)
Octavia creates at least 2 ports for each load balancer:
- the VIP port, it is down, it keeps/stores the IP address of the LB
- the VRRP port, plugged into a VM, it has the VIP address in the allowed-address list (and the VIP address is configured on the interface in the VM)
When sending an ARP request for the VIP address, the VRRP port should reply with its mac-address.
In OVN the VIP port is marked as "type: virtual".
But when the VIP port is updated, it loses its "port: virtual" status and that breaks the ARP resolution (OVN replies to the ARP request by sending the mac-address of the VIP port - which is not used/down).
Quick reproducer that simulates the Octavia behavior:
=======
import subprocess
import time
import openstack
conn = openstack.
network = conn.network.
sg = conn.network.
if not sg:
sg = conn.network.
vip_port = conn.network.
name="lb-vip",
network_
device_
device_
is_
vip_address = [
fixed_
for fixed_ip in vip_port.fixed_ips
if '.' in fixed_ip[
vrrp_port = conn.network.
name="lb-vrrp",
device_
device_
network_
vrrp_port = conn.network.
vrrp_port,
allowed_
time.sleep(1)
output = subprocess.
f"sudo ovn-nbctl show | grep -A2 'port {vip_port.id}'",
shell=True)
output = output.
if 'type: virtual' in output:
print("Port is virtual, this is ok.")
print(output)
conn.network.
vip_port,
security_
time.sleep(1)
output = subprocess.
f"sudo ovn-nbctl show | grep -A2 'port {vip_port.id}'",
shell=True)
output = output.
if 'type: virtual' not in output:
print("Port is not virtual, this is an issue.")
print(output)
=======
In my env (devstack master on c9s):
$ python3 /mnt/host/
Port is virtual, this is ok.
port e0fe2894-
type: virtual
addresses: ["fa:16:3e:93:00:8f 172.24.4.111 2001:db8::178"]
Port is not virtual, this is an issue.
port e0fe2894-
addresses: ["fa:16:3e:93:00:8f 172.24.4.111 2001:db8::178"]
port 8ec36278-
In Octavia, the "port: virtual" is _sometimes_ back after other updates of the ports, but in some cases the LB is unreachable.
(and "ovn-nbctl lsp-set-type <vip-port-id> virtual" fixes the LB)
=== Ubuntu SRU Details ===
[Impact]
This bug causes loadbalancer vip ports to lose their "virtual" type in ovn and results in broken connectivity to amphora vms after failover. There are two patches, one that fixes new ports and one that retroactively fixes existing ones. We are backporting the former since it is clean and simple but the latter does not apply cleanly so we will defer.
[Test Case]
* deploy openstack ussuri or victoria with neutron + ovn and octavia
* create a loadbalancer
* check ovn-nbctl for the vip port and check that type is virtual
* failover the loadbalancer
* check ovn-nbctl for the vip port and check that type is still virtual and that lb vip is reachable
[Where things could go wrong]
There are not anticipated to be any regressions from this backport.
Changed in neutron: | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in neutron: | |
status: | Confirmed → New |
Changed in neutron: | |
status: | Invalid → In Progress |
importance: | High → Medium |
assignee: | nobody → Rodolfo Alonso (rodolfo-alonso-hernandez) |
tags: | added: ovn |
description: | updated |
Hello Gregory:
I can't reproduce this behaviour in master branch. Reproducer: https:/ /paste. opendev. org/show/ bTstD8079kCv6MQ TxAvu/
I've executed this reproducer while checking the OVN NB logical_switch_port register:
$ watch -n1 -d "ovn-nbctl list logical_switch_port <vip_id>"
What is different in your system? Apart from Octavia.
Regards.