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/ +/904829 /opendev. org/openstack/ neutron/ commit/ c5e70ad716604a7 a379fa51ff16500 cd0ad0094c
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2023.1
commit c5e70ad716604a7 a379fa51ff16500 cd0ad0094c
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