Pin salt-master and salt-minion versions to 2016.3.4
diff --git a/tcp_tests/templates/salt/mk22-qa-lab01-salt.yaml.bak b/tcp_tests/templates/salt/mk22-qa-lab01-salt.yaml.bak
new file mode 100644
index 0000000..e4fb62d
--- /dev/null
+++ b/tcp_tests/templates/salt/mk22-qa-lab01-salt.yaml.bak
@@ -0,0 +1,264 @@
+# Install salt to the config node
+
+- description: Configure tcpcloud repository on the cfg01 node
+  cmd: echo 'deb [arch=amd64] http://apt.tcpcloud.eu/nightly/ xenial main security tcp tcp-salt' > /etc/apt/sources.list;
+    echo 'deb [arch=amd64] http://apt.tcpcloud.eu/nightly/ trusty tcp-salt' >> /etc/apt/sources.list;
+    wget -O - http://apt.tcpcloud.eu/public.gpg | apt-key add -;
+    echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest xenial main" > /etc/apt/sources.list.d/saltstack.list;
+    wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -;
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 1, delay: 1}
+  skip_fail: false
+
+#- description: Configure tcpcloud and saltstack repositories on the rest of nodes
+#  cmd: echo 'deb [arch=amd64] http://apt.tcpcloud.eu/nightly/ trusty main security extra tcp tcp-salt' > /etc/apt/sources.list;
+#    wget -O - http://apt.tcpcloud.eu/public.gpg | apt-key add - ;
+#    echo 'deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main' > /etc/apt/sources.list.d/saltstack.list;
+#    wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
+#  node_name: ***
+#  retry: {count: 1, delay: 1}
+#  skip_fail: false
+
+- description: Update packages on cfg01
+  cmd: apt-get clean; apt-get update && apt-get -y upgrade
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 10}
+  skip_fail: false
+
+- description: Install common packages on cfg01
+  cmd: apt-get install -y python-pip wget curl tmux byobu iputils-ping traceroute htop tree
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 10}
+  skip_fail: false
+
+- description: Install salt formulas, master and minion on cfg01
+  cmd: apt-get install -y salt-formula-* salt-master salt-minion reclass
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 10}
+  skip_fail: false
+
+- description: Configure salt-master on cfg01
+  cmd: |
+    cat << 'EOF' >> /etc/salt/master.d/master.conf
+    file_roots:
+      base:
+      - /usr/share/salt-formulas/env
+    pillar_opts: False
+    open_mode: True
+    reclass: &reclass
+      storage_type: yaml_fs
+      inventory_base_uri: /srv/salt/reclass
+    ext_pillar:
+      - reclass: *reclass
+    master_tops:
+      reclass: *reclass
+    EOF
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 1, delay: 1}
+  skip_fail: false
+
+- description: Configure GIT settings and certificates
+  cmd: touch /root/.git_trusted_certs.pem;
+    for server in git.tcpcloud.eu github.com; do
+        openssl s_client -showcerts -connect $server:443 </dev/null
+        | openssl x509 -outform PEM
+        >> /root/.git_trusted_certs.pem;
+    done;
+    HOME=/root git config --global http.sslCAInfo /root/.git_trusted_certs.pem;
+    HOME=/root git config --global user.email "tcp-qa@example.com";
+    HOME=/root git config --global user.name "TCP QA";
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 1, delay: 1}
+  skip_fail: false
+
+- description: Clone reclass models and perform a workaround for https://mirantis.jira.com/browse/PROD-8078
+  cmd: |
+    git clone https://github.com/Mirantis/mk-lab-salt-model.git /srv/salt/reclass;
+    cd /srv/salt/reclass;
+    git checkout master;
+    cat << 'EOF' >> /srv/salt/reclass/nodes/control/cfg01.mk22-qa-lab01.local.yml
+    # local storage
+      reclass:
+        storage:
+          data_source:
+            engine: local
+    EOF
+    sed -i '/nagios/d' /srv/salt/reclass/classes/system/salt/master/formula/pkg/stacklight.yml
+    cd /srv/salt/reclass; git add -A;git commit -m"use dash repo";
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 1, delay: 1}
+  skip_fail: false
+
+- description: Configure reclass
+  cmd: |
+    mkdir -p /srv/salt/reclass/classes/service;
+    for i in /usr/share/salt-formulas/reclass/service/*; do
+      ln -s $i /srv/salt/reclass/classes/service/;
+    done;
+    [ ! -d /etc/reclass ] && mkdir /etc/reclass;
+    cat << 'EOF' >> /etc/reclass/reclass-config.yml
+    storage_type: yaml_fs
+    pretty_print: True
+    output: yaml
+    inventory_base_uri: /srv/salt/reclass
+    EOF
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 1, delay: 1}
+  skip_fail: false
+
+- description: Configure salt-minion on cfg01
+  cmd: |
+    [ ! -d /etc/salt/minion.d ] && mkdir -p /etc/salt/minion.d;
+    cat << "EOF" >> /etc/salt/minion.d/minion.conf
+    id: cfg01.mk22-qa-lab01.local
+    master: localhost
+    EOF
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 1, delay: 1}
+  skip_fail: false
+
+- description: Restarting salt services with workarounds
+  cmd: service salt-master restart;
+    sleep 60;
+    rm -f /etc/salt/pki/minion/minion_master.pub;
+    service salt-minion restart;
+    reclass -n cfg01.mk22-qa-lab01.local;
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 10}
+  skip_fail: false
+
+- description: Workaround set low max_heap_size for Cassandra
+  cmd: |
+    cat << 'EOF' >> /srv/salt/reclass/classes/system/opencontrail/control/cluster.yml
+    # opencontrail lowmem
+      opencontrail:
+        database:
+          max_heap_size: "1G"
+          heap_newsize: "200M"
+    EOF
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 1, delay: 1}
+  skip_fail: false
+
+# Prepare salt services and nodes settings
+- description: Run 'linux' formula on cfg01
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
+    -C 'I@salt:master' state.sls linux
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 5}
+  skip_fail: false
+
+- description: Run 'openssh' formula on cfg01
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
+    -C 'I@salt:master' state.sls openssh;
+    salt --hard-crash --state-output=mixed --state-verbose=False
+    -C 'I@salt:master' cmd.run "sed -i 's/PasswordAuthentication no/PasswordAuthentication
+    yes/' /etc/ssh/sshd_config && service ssh restart"
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 5}
+  skip_fail: false
+
+- description: '*Workaround* of the bug https://mirantis.jira.com/browse/PROD-7962'
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
+    '*' cmd.run "echo '    StrictHostKeyChecking no' >> /root/.ssh/config"
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 1, delay: 1}
+  skip_fail: false
+
+- description: Run 'salt' formula on cfg01
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
+    -C 'I@salt:master' state.sls salt.master
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 5}
+  skip_fail: true
+
+- description: Accept salt keys from all the nodes
+  cmd: salt-key -A -y
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 1, delay: 5}
+  skip_fail: false
+
+- description: Generate inventory for all the nodes to the /srv/salt/reclass/nodes/_generated
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
+    -C 'I@salt:master' state.sls reclass
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 5}
+  skip_fail: false
+
+- description: Refresh pillars on all minions
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.refresh_pillar
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 5}
+  skip_fail: false
+
+- description: Sync all salt resources
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.sync_all
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 5}
+  skip_fail: false
+
+
+# Bootstrap all nodes
+- description: Workaround for missing kernel modules
+  cmd: salt '*' cmd.run "for module in nf_conntrack_ipv4 ip_tables
+    x_tables nf_defrag_ipv4 nf_nat_ipv4 nf_nat
+    iptable_filter iptable_mangle iptable_nat;
+    do
+    modprobe \$module;
+    echo \$module >> /etc/modules;
+    done"
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 1, delay: 1}
+  skip_fail: false
+
+- description: Configure linux on all nodes
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls
+    linux
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 5, delay: 5}
+  skip_fail: false
+
+- description: Configure openssh on all nodes
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C '* and not
+    cfg*' state.sls openssh;salt --hard-crash --state-output=mixed --state-verbose=False
+    -C '* and not cfg*' cmd.run "sed -i 's/PasswordAuthentication no/PasswordAuthentication
+    yes/' /etc/ssh/sshd_config && service ssh restart"
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 5}
+  skip_fail: false
+
+- description: '*Workaround* for the bug https://mirantis.jira.com/browse/PROD-8025'
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run 'apt-get
+    update && apt-get -y upgrade'
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 5}
+  skip_fail: true
+
+- description: '*Workaround* for the bug https://mirantis.jira.com/browse/PROD-8021'
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run 'apt-get
+    -y install linux-image-extra-$(uname -r)'
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 5}
+  skip_fail: false
+
+- description: '*Workaround* for the bug https://mirantis.jira.com/browse/PROD-8025'
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run 'apt-get
+    -y install python-requests'
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 5}
+  skip_fail: false
+
+- description: Configure salt.minion on controllers
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls
+    salt.minion
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 3, delay: 5}
+  skip_fail: false
+
+- description: Configure ntp on controllers
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls
+    ntp
+  node_name: cfg01.mk22-qa-lab01.local
+  retry: {count: 5, delay: 10}
+  skip_fail: false
+
diff --git a/tcp_tests/templates/underlay/mk22-qa-lab01--user-data1404.yaml b/tcp_tests/templates/underlay/mk22-qa-lab01--user-data1404.yaml
index faadbb5..e88634a 100644
--- a/tcp_tests/templates/underlay/mk22-qa-lab01--user-data1404.yaml
+++ b/tcp_tests/templates/underlay/mk22-qa-lab01--user-data1404.yaml
@@ -46,11 +46,13 @@
    - echo "Preparing base OS"
    - which wget >/dev/null || (apt-get update; apt-get install -y wget)
 
-   - echo "deb [arch=amd64] http://apt.tcpcloud.eu/nightly/ trusty main security tcp tcp-salt" > /etc/apt/sources.list
+   - echo "deb [arch=amd64] http://apt.tcpcloud.eu/nightly/ trusty main security extra tcp tcp-salt" > /etc/apt/sources.list
    - wget -O - http://apt.tcpcloud.eu/public.gpg | apt-key add -
    # saltstack repo is for minions that have the same version in the xenial and trusty (2016.3.3)
-   - echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main" > /etc/apt/sources.list.d/saltstack.list
-   - wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
+   #- echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main" > /etc/apt/sources.list.d/saltstack.list
+   #- wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
+   - 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
diff --git a/tcp_tests/templates/underlay/mk22-qa-lab01--user-data1604.yaml b/tcp_tests/templates/underlay/mk22-qa-lab01--user-data1604.yaml
index ff6539a..62e6372 100644
--- a/tcp_tests/templates/underlay/mk22-qa-lab01--user-data1604.yaml
+++ b/tcp_tests/templates/underlay/mk22-qa-lab01--user-data1604.yaml
@@ -46,11 +46,13 @@
    - echo "Preparing base OS"
    - which wget >/dev/null || (apt-get update; apt-get install -y wget)
 
-   - echo "deb [arch=amd64] http://apt.tcpcloud.eu/nightly/ xenial main security tcp tcp-salt" > /etc/apt/sources.list
+   - echo "deb [arch=amd64] http://apt.tcpcloud.eu/nightly/ xenial main security extra tcp tcp-salt" > /etc/apt/sources.list
    - wget -O - http://apt.tcpcloud.eu/public.gpg | apt-key add -
    # saltstack repo is for minions that have the same version in the xenial and trusty (2016.3.3)
-   - echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest xenial main" > /etc/apt/sources.list.d/saltstack.list
-   - wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
+   #- echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest xenial main" > /etc/apt/sources.list.d/saltstack.list
+   #- wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
+   - 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
    - apt-get update
diff --git a/tcp_tests/tests/system/test_tcp_install.py b/tcp_tests/tests/system/test_tcp_install.py
index 794afb2..ae2871d 100644
--- a/tcp_tests/tests/system/test_tcp_install.py
+++ b/tcp_tests/tests/system/test_tcp_install.py
@@ -46,6 +46,18 @@
             3. Setup compute nodes
 
         """
+        LOG.info("*************** DONE **************")
+
+    def test_tcp_install_run_rally(self, underlay, openstack_deployed,
+                                 show_step, rally):
+        """Test for deploying an tcp environment and check it
+
+        Scenario:
+            1. Prepare salt on hosts
+            2. Setup controller nodes
+            3. Setup compute nodes
+
+        """
         # prepare rally
         rally.prepare()
         rally.pull_image()