Catch right exception for ConnectFailure at activating vif
Change-Id: I4122d73ca6e653b11c856fc7d3576d5e8af496fd
(cherry picked from commit d442760442
)
This commit is contained in:
parent
33eeb4f704
commit
8a6009d0e4
|
@ -13,9 +13,9 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from keystoneauth1 import exceptions as key_exc
|
||||
from kuryr.lib import constants as kl_const
|
||||
from neutronclient.common import exceptions as n_exc
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from kuryr_kubernetes import clients
|
||||
|
@ -90,7 +90,7 @@ class NeutronPodVIFDriver(base.PodVIFDriver):
|
|||
neutron = clients.get_neutron_client()
|
||||
try:
|
||||
port = neutron.show_port(vif.id).get('port')
|
||||
except n_exc.ConnectionFailed:
|
||||
except (key_exc.ConnectionError, n_exc.ConnectionFailed):
|
||||
LOG.debug("Unable to obtain port information, retrying.")
|
||||
raise k_exc.ResourceNotReady(vif)
|
||||
|
||||
|
|
Loading…
Reference in New Issue