Catch APIException exceptions raised by Mistral
In the change to keystone sessions and Mistral client 3.2.0 the exception raised when fetching an environment that doesn't exist changed. This adds the new exception but continues to catch the previous one. Closes-Bug: #1749186 Change-Id: I304547b9ecabe4e387339c8561bbae8651cd9db6
This commit is contained in:
parent
3e702f3bdf
commit
aabd6e639e
|
@ -38,6 +38,7 @@ from keystoneauth1 import exceptions as ks_exceptions
|
|||
from keystoneclient import discover
|
||||
import keystoneauth1.identity.generic as ks_auth
|
||||
from mistralclient.api import client as mistralclient
|
||||
from mistralclient.api import base as mistralclient_exc
|
||||
from novaclient import client as novaclient
|
||||
from novaclient import exceptions
|
||||
import os_client_config
|
||||
|
@ -1763,7 +1764,7 @@ def _create_mistral_config_environment(instack_env, mistral):
|
|||
env_name = 'tripleo.undercloud-config'
|
||||
try:
|
||||
env_data = mistral.environments.get(env_name).variables
|
||||
except ks_exceptions.NotFound:
|
||||
except (ks_exceptions.NotFound, mistralclient_exc.APIException):
|
||||
# If the environment is not created, we need to
|
||||
# create it with the information in config_data
|
||||
mistral.environments.create(
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed an incompatability with mistralclient 3.2.0, where a different
|
||||
exception type was raised and thus not handled during the undercloud
|
||||
install post config. See #1749186
|
Loading…
Reference in New Issue