[OVN] Only account for bound ports in metadata agent
Due to bug #1922934 there might be situations with stale ports
in the OVN database. When instances request metadata, the agent
will try to fetch all ports for that particular network with the
same IP address and there should be only one.
However, when there are stale ports in OVN database but not in
Neutron, those ports may have the same IP address and the result
is that metadata won't work. As the stale ports will never be
bound to any hypervisor, this patch is accounting only for
bound ports so that those ports don't interfere until they
eventually get fixed by the maintenance task.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/787337 /opendev. org/openstack/ neutron/ commit/ 32e938e698f260a f6896f6179a5ffc 0838677124
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 32e938e698f260a f6896f6179a5ffc 0838677124
Author: Daniel Alvarez Sanchez <email address hidden>
Date: Wed Apr 21 11:41:57 2021 +0200
[OVN] Only account for bound ports in metadata agent
Due to bug #1922934 there might be situations with stale ports
in the OVN database. When instances request metadata, the agent
will try to fetch all ports for that particular network with the
same IP address and there should be only one.
However, when there are stale ports in OVN database but not in
Neutron, those ports may have the same IP address and the result
is that metadata won't work. As the stale ports will never be
bound to any hypervisor, this patch is accounting only for
bound ports so that those ports don't interfere until they
eventually get fixed by the maintenance task.
Related-Bug: #1922934 359f2eeda809bea e0321f1a7db
Signed-off-by: Daniel Alvarez Sanchez <email address hidden>
Change-Id: I708904b982d243