Add catching the exception in get_control_plane_target
Function for parametrized fixture should take into
account that cluster can be not completed
Change-Id: Ida8d3d1899cf2765e4592d52b2da2b7f1180de66
diff --git a/tcp_tests/tests/system/test_mcp_update.py b/tcp_tests/tests/system/test_mcp_update.py
index 67499b8..f4688b7 100644
--- a/tcp_tests/tests/system/test_mcp_update.py
+++ b/tcp_tests/tests/system/test_mcp_update.py
@@ -31,12 +31,17 @@
config = config_fixtures.config()
underlay = underlay_ssh_manager.UnderlaySSHManager(config)
saltmanager = salt_manager.SaltManager(config, underlay)
-
- targets = saltmanager.run_state(
- "I@keystone:server", 'test.ping')[0]['return'][0].keys()
- targets += saltmanager.run_state(
- "I@nginx:server and not I@salt:master",
- "test.ping")[0]['return'][0].keys()
+ targets = list()
+ try:
+ targets += saltmanager.run_state(
+ "I@keystone:server", 'test.ping')[0]['return'][0].keys()
+ targets += saltmanager.run_state(
+ "I@nginx:server and not I@salt:master",
+ "test.ping")[0]['return'][0].keys()
+ except BaseException as err:
+ LOG.warning("Can't retrieve data from Salt. \
+ Maybe cluster is not deployed completely.\
+ Err: {}".format(err))
# TODO: add check for Manila existence
# # Commented to avoid fails during OpenStack updates.