Catch right exception for ConnectFailure at activating vif

Change-Id: I4122d73ca6e653b11c856fc7d3576d5e8af496fd
This commit is contained in:
Luis Tomas Bolivar 2019-10-18 12:42:59 +02:00
parent 6446f70da0
commit d442760442
1 changed files with 2 additions and 2 deletions

View File

@ -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)