To fix sporadic keystone errors occur during multinode installation

In order to avoid keystone sporadical errors related to keys directory
mounted by glusterfs during multinode configuration glusterfs cluster
should be assembled before keystone.server state in installOpenstackControl()
function. To perform the above installation steps of componets should
have to be changed.

Change-Id: Ic5144af6dc436b338dcef7b8288122dc998cdc7a
Depends-On: I69d33a5b3478925425e3441c28c34d5249d35af0
Related-Prod: PROD-13874
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 7cb35f8..c24f9b6 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -67,6 +67,11 @@
         salt.runSaltProcessStep(master, 'I@glusterfs:server', 'cmd.run', ['gluster volume status'], null, true)
     }
 
+    // Ensure glusterfs clusters is ready
+    if (salt.testTarget(master, 'I@glusterfs:client')) {
+        salt.enforceState(master, 'I@glusterfs:client', 'glusterfs.client', true)
+    }
+
     // Install galera
     if (salt.testTarget(master, 'I@galera:master') || salt.testTarget(master, 'I@galera:slave')) {
         withEnv(['ASK_ON_ERROR=false']){
@@ -169,24 +174,16 @@
         salt.runSaltProcessStep(master, 'I@keystone:server', 'cmd.run', ['. /root/keystonercv3; openstack service list'], null, true)
     }
 
-    // Install glance and ensure glusterfs clusters
+    // Install glance
     if (salt.testTarget(master, 'I@glance:server')) {
         //runSaltProcessStep(master, 'I@glance:server', 'state.sls', ['glance.server'], 1)
         salt.enforceState(master, 'I@glance:server and *01*', 'glance.server', true)
        salt.enforceState(master, 'I@glance:server', 'glance.server', true)
     }
-    if (salt.testTarget(master, 'I@glusterfs:client')) {
-        salt.enforceState(master, 'I@glusterfs:client', 'glusterfs.client', true)
-    }
 
-    // Update fernet tokens before doing request on keystone server
-    if (salt.testTarget(master, 'I@keystone:server')) {
-        salt.enforceState(master, 'I@keystone:server', 'keystone.server', true)
-
-        // Check glance service
-        if (salt.testTarget(master, 'I@glance:server')){
-            salt.runSaltProcessStep(master, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; glance image-list'], null, true)
-        }
+    // Check glance service
+    if (salt.testTarget(master, 'I@glance:server')){
+        salt.runSaltProcessStep(master, 'I@keystone:server', 'cmd.run', ['. /root/keystonerc; glance image-list'], null, true)
     }
 
     // Create glance resources