Reset device namespace when adding to the namespace fails
In case when during adding device to the namespace, device will be "shy"
and will disappear for a moment and NetworkInterfaceNotFound exception
will be raised, we need to reset device.namespace to be None.
Otherwise, in the next attempt of adding interface to namespace, when it
will be added back to ovs (and will be in global scope), Neutron will
already look for it in the "namespace" and that will always be failing.
Closes-bug: #1961740
Change-Id: Ie9331c72c44084b0a382598c3359214cce2f2ebd
(cherry picked from commit 76578393ab401a33084921c4355af8e82c5d02ee)
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/904826 /opendev. org/openstack/ neutron/ commit/ b27ea5fe2da47d1 34ac9b4a50341a0 ecc0934eb3
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit b27ea5fe2da47d1 34ac9b4a50341a0 ecc0934eb3
Author: Slawek Kaplonski <email address hidden>
Date: Wed Sep 7 12:07:38 2022 +0200
Reset device namespace when adding to the namespace fails
In case when during adding device to the namespace, device will be "shy" eNotFound exception
and will disappear for a moment and NetworkInterfac
will be raised, we need to reset device.namespace to be None.
Otherwise, in the next attempt of adding interface to namespace, when it
will be added back to ovs (and will be in global scope), Neutron will
already look for it in the "namespace" and that will always be failing.
Closes-bug: #1961740 b0a382598c33592 14cce2f2ebd 3084921c4355af8 e82c5d02ee)
Change-Id: Ie9331c72c44084
(cherry picked from commit 76578393ab401a3