diff options
Diffstat (limited to 'mcp/config')
-rwxr-xr-x | mcp/config/states/baremetal_init | 6 | ||||
-rwxr-xr-x | mcp/config/states/maas | 9 | ||||
-rwxr-xr-x | mcp/config/states/networking_gw | 2 | ||||
-rwxr-xr-x | mcp/config/states/openstack_ha | 2 | ||||
-rwxr-xr-x | mcp/config/states/openstack_noha | 5 | ||||
-rwxr-xr-x | mcp/config/states/virtual_control_plane | 3 |
6 files changed, 20 insertions, 7 deletions
diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init index 5a8cb49fc..5a8b6c75a 100755 --- a/mcp/config/states/baremetal_init +++ b/mcp/config/states/baremetal_init @@ -25,9 +25,13 @@ salt -C 'kvm* or cmp*' file.replace $debian_ip_source \ salt -C 'kvm*' pkg.install bridge-utils salt -C 'kvm*' state.apply linux.network salt -C 'kvm* or cmp*' state.apply salt.minion -salt -C 'kvm* or cmp*' service.force_reload salt-minion salt -C 'cmp*' state.apply linux.system salt -C 'cmp*' state.apply linux.network || true + +# disable dhcp offered routes on compute nodes +salt -C 'cmp*' file.write /etc/dhcp/dhclient-enter-hooks.d/no-default-route \ + args='unset new_routers' + salt -C 'kvm* or cmp*' system.reboot wait_for 90.0 "salt -C 'kvm* or cmp*' test.ping" diff --git a/mcp/config/states/maas b/mcp/config/states/maas index 39f6badef..24249d40d 100755 --- a/mcp/config/states/maas +++ b/mcp/config/states/maas @@ -27,12 +27,19 @@ function maas_fixup() { local fcnodes=$(echo "${statusout}" | \ grep -Pzo 'status: Failed commissioning\n\s+system_id: \K.+\n') + local ftnodes=$(echo "${statusout}" | \ + grep -Pzo 'status: Failed testing\n\s+system_id: \K.+\n') for node_system_id in ${fcnodes}; do salt -C 'mas01*' state.apply maas.machines.delete \ pillar="{'system_id': '${node_system_id}'}" sleep 10 done - if [ -n "${fcnodes}" ]; then + for node_system_id in ${ftnodes}; do + salt -C 'mas01*' state.apply maas.machines.override_failed_testing \ + pillar="{'system_id': '${node_system_id}'}" + sleep 10 + done + if [ -n "${fcnodes}" ] || [ -n "${ftnodes}" ]; then salt -C 'mas01*' state.apply maas.machines return 1 fi diff --git a/mcp/config/states/networking_gw b/mcp/config/states/networking_gw index 70fb67da4..6fa711163 100755 --- a/mcp/config/states/networking_gw +++ b/mcp/config/states/networking_gw @@ -9,4 +9,4 @@ CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x -salt -I 'neutron:gateway' service.restart networking +salt -I 'neutron:gateway' cmd.run 'ifup --force --ignore-errors float-to-ex' diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha index fbddc6e83..02b700975 100755 --- a/mcp/config/states/openstack_ha +++ b/mcp/config/states/openstack_ha @@ -46,7 +46,7 @@ salt -I 'nova:controller' state.sls nova -b 1 salt -I 'heat:server' state.sls heat -b 1 wait_for 5 "salt -I 'cinder:controller' state.sls cinder -b 1" -salt -I 'cinder:volume' state.sls cinder +wait_for 3 "salt -I 'cinder:volume' state.sls cinder" salt -I 'neutron:server' state.sls neutron -b 1 salt -I 'neutron:gateway' state.sls neutron.gateway diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha index 369e16504..cc46ac10e 100755 --- a/mcp/config/states/openstack_noha +++ b/mcp/config/states/openstack_noha @@ -9,6 +9,9 @@ CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x +# shellcheck disable=SC1090 +source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" + salt -I 'nfs:server' file.mkdir /srv/nova/instances salt -I 'nfs:server' state.sls nfs salt -I 'nfs:client' state.sls nfs @@ -34,7 +37,7 @@ salt -I 'nova:controller' state.sls nova salt -I 'heat:server' state.sls heat salt -I 'cinder:controller' state.sls cinder -salt -I 'cinder:volume' state.sls cinder +wait_for 3 "salt -I 'cinder:volume' state.sls cinder" salt -I 'neutron:server' state.sls neutron salt -I 'neutron:gateway' state.sls neutron diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane index 33cc9dce5..f97e9b712 100755 --- a/mcp/config/states/virtual_control_plane +++ b/mcp/config/states/virtual_control_plane @@ -59,10 +59,9 @@ salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' cp.get_file \ "salt://maas/files/$(basename "${APT_CONF_D_CURTIN}")" "${APT_CONF_D_CURTIN}" wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply salt" -wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' service.force_reload salt-minion" wait_for 10.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply linux,ntp" -wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' ssh.set_auth_key ${SUDO_USER} \ +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")")" # Disable proxy dhcp routes after installation |