summaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
Diffstat (limited to 'mcp')
-rwxr-xr-xmcp/config/states/baremetal_init5
-rwxr-xr-xmcp/config/states/virtual_control_plane1
-rw-r--r--mcp/salt-formulas/opnfv/route_wrapper.sls27
-rwxr-xr-xmcp/scripts/salt.sh3
4 files changed, 2 insertions, 34 deletions
diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init
index 6a44b788b..3e5f659fd 100755
--- a/mcp/config/states/baremetal_init
+++ b/mcp/config/states/baremetal_init
@@ -25,10 +25,7 @@ salt -C 'kvm* or cmp*' file.replace $debian_ip_source \
salt -C 'kvm* or cmp*' pkg.install bridge-utils
salt -C 'kvm*' state.apply linux.network,linux.system.kernel
wait_for 5.0 "salt -C 'kvm* or cmp*' state.apply salt.minion"
-wait_for 5.0 "salt -C 'cmp*' state.apply linux.system"
-# wrap distro `route` binary to silence errors when route already exists
-wait_for 5.0 "salt -C 'kvm* or cmp*' state.apply opnfv.route_wrapper"
-wait_for 5.0 "salt -C 'cmp*' state.apply linux.network"
+wait_for 5.0 "salt -C 'cmp*' state.apply linux.system,linux.network"
wait_for 30.0 "salt -C 'kvm* or cmp*' test.ping"
salt -C 'kvm* or cmp*' system.reboot
diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane
index 18e6d1cd2..8105b2666 100755
--- a/mcp/config/states/virtual_control_plane
+++ b/mcp/config/states/virtual_control_plane
@@ -54,7 +54,6 @@ wait_for 10.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply linux,ntp"
wait_for 10.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' ssh.set_auth_key ${SUDO_USER} \
$(awk 'NR==1{print $2}' "$(eval echo "~${SUDO_USER}/.ssh/authorized_keys")")"
-salt -C 'prx*' state.apply opnfv.route_wrapper
salt -C 'prx*' system.reboot
wait_for 30.0 "salt -C 'prx*' test.ping"
diff --git a/mcp/salt-formulas/opnfv/route_wrapper.sls b/mcp/salt-formulas/opnfv/route_wrapper.sls
deleted file mode 100644
index 6132f317e..000000000
--- a/mcp/salt-formulas/opnfv/route_wrapper.sls
+++ /dev/null
@@ -1,27 +0,0 @@
-##############################################################################
-# Copyright (c) 2018 Mirantis Inc., Enea AB and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-/usr/local/sbin/route:
- file.managed:
- - contents: |
- #!/bin/sh
-
- # Workaround salt-managed routes breaking ifup when route already exists
- route_binary='/sbin/route'
- route_output=$("${route_binary}" "$@" 2>&1)
- route_return=$?
-
- if [ -n "${route_output}" ]; then
- if echo "${route_output}" | grep -q 'SIOCADDRT: File exists'; then
- exit 0
- fi
- echo "${route_output}"
- fi
- exit "${route_return}"
- - user: root
- - group: root
- - mode: 755
diff --git a/mcp/scripts/salt.sh b/mcp/scripts/salt.sh
index dc2226e34..2c56d916f 100755
--- a/mcp/scripts/salt.sh
+++ b/mcp/scripts/salt.sh
@@ -115,11 +115,10 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s -e << SALT_INSTALL_END
wait_for 3.0 '(for n in ${LOCAL_VIRT_NODES}; do salt -C \${n}.* test.ping || exit; done)'
fi
wait_for 3.0 'salt -C "E@^(${NODE_MASK}|cfg01).*" saltutil.sync_all'
- wait_for 3.0 'salt -C "E@^(${NODE_MASK}|cfg01).*" state.apply salt'
+ wait_for 3.0 'salt -C "E@^(${NODE_MASK}|cfg01).*" state.apply salt exclude="[{id: /etc/salt/minion.d/_orchestration.conf}]"'
wait_for 3.0 'salt -C "E@^(${NODE_MASK}).*" state.sls linux.system,linux.storage'
wait_for 2.0 'salt -C "E@^(${NODE_MASK}).*" state.sls linux.network'
- salt -C "E@^(${NODE_MASK}).*" state.sls opnfv.route_wrapper
salt -C "E@^(${NODE_MASK}).*" system.reboot
wait_for 90.0 'salt -C "E@^(${NODE_MASK}).*" test.ping'
wait_for 3.0 'salt -C "E@^(${NODE_MASK}).*" pkg.upgrade refresh=False dist_upgrade=True'