Minor fixes to mcp10-contrail

Change-Id: I370001e16b684fbfd67e417bcda7d4923e4fc96b
Signed-off-by: Illia Polliul <ipolliul@mirantis.com>
Reviewed-on: https://review.gerrithub.io/362949
Reviewed-by: Tatyanka Leontovich <tleontovich@mirantis.com>
Tested-by: Tatyanka Leontovich <tleontovich@mirantis.com>
diff --git a/tcp_tests/templates/virtual-mcp10-contrail/openstack.yaml b/tcp_tests/templates/virtual-mcp10-contrail/openstack.yaml
index caec895..e7188bd 100644
--- a/tcp_tests/templates/virtual-mcp10-contrail/openstack.yaml
+++ b/tcp_tests/templates/virtual-mcp10-contrail/openstack.yaml
@@ -3,61 +3,61 @@
 # Install OpenStack control services
 
 - description: Install glance on all controllers
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
      -C 'I@glance:server' state.sls glance -b 1
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
   skip_fail: false
 
 - description: Install keystone service (note that different fernet keys are created on different nodes)
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@keystone:server' state.sls keystone.server -b 1
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 2, delay: 15}
   skip_fail: false
 
-- description: Restart apache due to PROD-10477
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2"
-  node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 1, delay: 15}
-  skip_fail: false
-
-- description: Check apache status to PROD-10477
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2"
-  node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 1, delay: 15}
-  skip_fail: false
+#- description: Restart apache due to PROD-10477
+#  cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2"
+#  node_name: {{ HOSTNAME_CFG01 }}
+#  retry: {count: 1, delay: 15}
+#  skip_fail: false
+#
+#- description: Check apache status to PROD-10477
+#  cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2"
+#  node_name: {{ HOSTNAME_CFG01 }}
+#  retry: {count: 1, delay: 15}
+#  skip_fail: false
 
 - description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users)
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@glance:server' state.sls glusterfs.client
   node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 1, delay: 5}
+  retry: {count: 2, delay: 5}
   skip_fail: false
 
 - description: Update fernet keys for keystone server on the mounted glusterfs volume
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@keystone:server' state.sls keystone.server -b 1
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
   skip_fail: false
 
 - description: Populate keystone services/tenants/admins
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@keystone:client' state.sls keystone.client
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
   skip_fail: false
 
 - description: Check keystone service-list
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@keystone:server' cmd.run '. /root/keystonerc; openstack service list'
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
   skip_fail: false
 
 - description: Check glance image-list
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list'
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
@@ -65,29 +65,29 @@
 
 
 - description: Install nova on all controllers
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@nova:controller' state.sls nova -b 1
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 2, delay: 5}
   skip_fail: false
 
 - description: Check nova service-list
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova service-list'
   node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 1, delay: 5}
+  retry: {count: 3, delay: 5}
   skip_fail: false
 
 
 - description: Install cinder
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@cinder:controller' state.sls cinder -b 1
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
   skip_fail: false
 
 - description: Check cinder list
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
@@ -95,7 +95,7 @@
 
 
 - description: Install neutron service
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@neutron:server' state.sls neutron -b 1
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
@@ -119,7 +119,7 @@
 
 # install contrail
 - description: Install contrail db
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@opencontrail:database' state.sls opencontrail.database
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 2, delay: 20}
@@ -161,14 +161,14 @@
   skip_fail: false
 
 - description: Install heat service
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@heat:server' state.sls heat -b 1
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
   skip_fail: false
 
 - description: Check heat service
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@keystone:server' cmd.run '. /root/keystonerc; heat resource-type-list'
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
@@ -176,14 +176,14 @@
 
 
 - description: Deploy horizon dashboard
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@horizon:server' state.sls horizon
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
   skip_fail: true
 
 - description: Deploy nginx proxy
-  cmd: salt --hard-crash --state-output=mixed --state-verbose=False \
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@nginx:server' state.sls nginx
   node_name: {{ HOSTNAME_CFG01 }}
   retry: {count: 1, delay: 5}
diff --git a/tcp_tests/templates/virtual-mcp10-contrail/salt.yaml b/tcp_tests/templates/virtual-mcp10-contrail/salt.yaml
index e99b83e..30cb33f 100644
--- a/tcp_tests/templates/virtual-mcp10-contrail/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp10-contrail/salt.yaml
@@ -209,7 +209,7 @@
   cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@salt:master' state.sls linux;
   node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 1, delay: 5}
+  retry: {count: 3, delay: 5}
   skip_fail: false
 
 
@@ -285,7 +285,7 @@
   cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C '* and not
     cfg01*' state.sls linux
   node_name: {{ HOSTNAME_CFG01 }}
-  retry: {count: 1, delay: 5}
+  retry: {count: 3, delay: 5}
   skip_fail: false
 
 - description: Configure openssh on all nodes
diff --git a/tcp_tests/templates/virtual-mcp10-contrail/sl.yaml b/tcp_tests/templates/virtual-mcp10-contrail/sl.yaml
new file mode 100644
index 0000000..75cc609
--- /dev/null
+++ b/tcp_tests/templates/virtual-mcp10-contrail/sl.yaml
@@ -0,0 +1,8 @@
+{% from 'virtual-mcp10-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %}
+
+# dummy
+- description: dummy
+  cmd: true
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 1, delay: 10}
+  skip_fail: true
\ No newline at end of file
diff --git a/tcp_tests/templates/virtual-mcp10-contrail/underlay--user-data1404.yaml b/tcp_tests/templates/virtual-mcp10-contrail/underlay--user-data1404.yaml
index d139bb1..aab8699 100644
--- a/tcp_tests/templates/virtual-mcp10-contrail/underlay--user-data1404.yaml
+++ b/tcp_tests/templates/virtual-mcp10-contrail/underlay--user-data1404.yaml
@@ -53,9 +53,9 @@
    - echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.3 trusty main" > /etc/apt/sources.list.d/saltstack.list
    - wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub | apt-key add -
 
-   - apt-get clean
-   - apt-get update
-   - apt-get -y upgrade
+   - eatmydata apt-get clean
+   - eatmydata apt-get update
+   - eatmydata apt-get -y upgrade
 
    # Install common packages
    - apt-get install -y python-pip git
diff --git a/tcp_tests/templates/virtual-mcp10-contrail/underlay--user-data1604.yaml b/tcp_tests/templates/virtual-mcp10-contrail/underlay--user-data1604.yaml
index 2c3cb6c..f521d96 100644
--- a/tcp_tests/templates/virtual-mcp10-contrail/underlay--user-data1604.yaml
+++ b/tcp_tests/templates/virtual-mcp10-contrail/underlay--user-data1604.yaml
@@ -56,8 +56,8 @@
    - echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3 xenial main" > /etc/apt/sources.list.d/saltstack.list
    - wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub | apt-key add -
 
-   - apt-get clean
-   - eatmydata apt-get update && apt-get -y upgrade
+   - eatmydata apt-get clean
+   - eatmydata apt-get update && eatmydata apt-get -y upgrade
 
    # Install common packages
    - eatmydata apt-get install -y python-pip git curl tmux byobu iputils-ping traceroute htop tree mc