[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.
Conflicts: neutron/agent/ovn/metadata/server.py
Related-Bug: #1922934
Signed-off-by: Daniel Alvarez Sanchez <email address hidden>
Change-Id: I708904b982d243359f2eeda809beae0321f1a7db
(cherry picked from commit 32e938e698f260af6896f6179a5ffc0838677124)
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/788237 /opendev. org/openstack/ neutron/ commit/ a9ed835e6910239 7b192a3d23d8008 4b5d76a7f8
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/ussuri
commit a9ed835e6910239 7b192a3d23d8008 4b5d76a7f8
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.
Conflicts:
neutron/ agent/ovn/ metadata/ server. py
Related-Bug: #1922934 359f2eeda809bea e0321f1a7db f6896f6179a5ffc 0838677124)
Signed-off-by: Daniel Alvarez Sanchez <email address hidden>
Change-Id: I708904b982d243
(cherry picked from commit 32e938e698f260a