Merge "Provide configuration name for reporter job"
diff --git a/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-cookiecutter.yaml b/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-cookiecutter.yaml
index a440e29..bdcb398 100644
--- a/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-cookiecutter.yaml
+++ b/tcp_tests/templates/heat-cicd-pike-dvr-sl/salt-context-cookiecutter.yaml
@@ -312,6 +312,7 @@
   #openstack_public_neutron_subnet_allocation_end: 172.17.16.245
   manila_enabled: 'False'
   barbican_enabled: 'True'
+  barbican_backend: dogtag
   barbican_integration_enabled: 'False'
 
   openstack_barbican_address: 10.167.4.44
diff --git a/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-cookiecutter.yaml b/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-cookiecutter.yaml
index 1614be8..976e782 100644
--- a/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-cookiecutter.yaml
+++ b/tcp_tests/templates/heat-cicd-queens-dvr-sl/salt-context-cookiecutter.yaml
@@ -313,6 +313,7 @@
   #openstack_public_neutron_subnet_allocation_end: 172.17.16.245
   manila_enabled: 'False'
   barbican_enabled: 'True'
+  barbican_backend: dogtag
   barbican_integration_enabled: 'False'
 
   openstack_barbican_address: 10.167.4.44
diff --git a/tcp_tests/tests/system/test_mcp_update.py b/tcp_tests/tests/system/test_mcp_update.py
index f4688b7..4a1cfa2 100644
--- a/tcp_tests/tests/system/test_mcp_update.py
+++ b/tcp_tests/tests/system/test_mcp_update.py
@@ -61,6 +61,19 @@
         "release/proposed/2019.2.0",
         "cluster/*/infra/init.yml"
     )
+
+    proposed_branch = "http://mirror.mirantis.com/update/proposed/"
+    url_param = "parameters._param.linux_system_repo_update_url"
+    reclass_actions.add_key(url_param, proposed_branch,
+                            "cluster/*/infra/init.yml")
+    reclass_actions.add_key(url_param, proposed_branch,
+                            "cluster/*/openstack/init.yml")
+    reclass_actions.add_key(url_param, proposed_branch,
+                            "cluster/*/stacklight/init.yml")
+    reclass_actions.add_key(url_param, proposed_branch,
+                            "cluster/*/ceph/init.yml")
+
+    salt_actions.run_state("*", "saltutil.refresh_pillar")
     salt_actions.enforce_state("I@jenkins:client", "jenkins.client")
 
 
@@ -225,7 +238,7 @@
                              "cluster/*/infra/init.yml")
 
         show_step(4)
-        salt.enforce_state("dbs*", "saltutil.refresh_pillar")
+        salt.run_state("dbs*", "saltutil.refresh_pillar")
 
         # ############# Add repositories with new Galera packages #######
         show_step(5)
diff --git a/tcp_tests/tests/system/test_upgrade_pike_queens.py b/tcp_tests/tests/system/test_upgrade_pike_queens.py
index 0ddf20b..6314364 100644
--- a/tcp_tests/tests/system/test_upgrade_pike_queens.py
+++ b/tcp_tests/tests/system/test_upgrade_pike_queens.py
@@ -26,6 +26,8 @@
     """
     def execute_pre_post_steps(self, underlay_actions,
                                cfg_node, verbose, type):
+
+        # ### Get the list of all upgradable OpenStack components ############
         ret = underlay_actions.check_call(
             node_name=cfg_node, verbose=verbose,
             cmd="salt 'cfg01*' config.get"
@@ -36,11 +38,21 @@
             for j in cfg_nodes_list[i]:
                 services_for_upgrade.append(j)
         LOG.info(services_for_upgrade)
+
+        # ###### Get the list of all target node #############################
         list_nodes = underlay_actions.check_call(
             node_name=cfg_node, verbose=verbose,
             cmd="salt-key -l accepted | grep -v cfg01 | "
                 "grep -v Accepted")['stdout_str'].splitlines()
         LOG.info(list_nodes)
+
+        # #### guarantee that the KeystoneRC metadata is exported to mine ####
+        ret = underlay_actions.check_call(
+            node_name=cfg_node, verbose=verbose,
+            cmd="salt -C 'I@keystone:client:enabled' state.sls"
+                " keystone.upgrade.pre")
+
+        # ## For each target node, get the list of the installed applications
         for node in list_nodes:
             salt_pillars = underlay_actions.check_call(
                 node_name=cfg_node, verbose=verbose,
@@ -49,6 +61,7 @@
             node_app_output = json.loads(salt_pillars['stdout_str'])
             need_output = '__reclass__:applications'
             LOG.info(node_app_output)
+            # ###### Apply -upgrade- states for node with component #########
             if need_output in node_app_output[node]:
                 node_applications = node_app_output[node][need_output]
                 LOG.info(node_applications)