Add sleep before checking if ovs port is in the namespace
When network device which is ovs internal port is moved to the namespace
it may happend sometimes that it will have "shy port syndrome" [1].
Even though there is wait for device to be in namespace in the set_netns
method it may happend that device is in namespace during this check but
it dissapears for short time later and that causes failures e.g. in
functional tests like described in [2].
To avoid that, this patch proposed simple (and ugly) sleep for 1 second
before checking if port really exists in the namespace. If it will be
"shy" port it should already flap during that 1 second.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/904831 /opendev. org/openstack/ neutron/ commit/ f4e0b023621a922 260b35b37f99408 26327efc6e
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/yoga
commit f4e0b023621a922 260b35b37f99408 26327efc6e
Author: Slawek Kaplonski <email address hidden>
Date: Tue Feb 28 18:27:29 2023 +0100
Add sleep before checking if ovs port is in the namespace
When network device which is ovs internal port is moved to the namespace
it may happend sometimes that it will have "shy port syndrome" [1].
Even though there is wait for device to be in namespace in the set_netns
method it may happend that device is in namespace during this check but
it dissapears for short time later and that causes failures e.g. in
functional tests like described in [2].
To avoid that, this patch proposed simple (and ugly) sleep for 1 second
before checking if port really exists in the namespace. If it will be
"shy" port it should already flap during that 1 second.
[1] https:/ /bugs.launchpad .net/neutron/ +bug/1618987 /bugs.launchpad .net/neutron/ +bug/1961740
[2] https:/
Related-Bug: #1961740 7f4ea873e190bf8 afbc0e911e1 cec21e2bc89f287 a0e4129d0f)
Related-Bug: #1998337
Change-Id: I442587e7ef5591
(cherry picked from commit 2af5fd889b3286d