diff options
Diffstat (limited to 'mcp/config/states')
-rwxr-xr-x | mcp/config/states/dpdk | 4 | ||||
-rwxr-xr-x | mcp/config/states/maas | 9 | ||||
-rwxr-xr-x | mcp/config/states/neutron_compute | 2 | ||||
-rwxr-xr-x | mcp/config/states/opendaylight | 1 |
4 files changed, 7 insertions, 9 deletions
diff --git a/mcp/config/states/dpdk b/mcp/config/states/dpdk index ad435630c..9eba5c083 100755 --- a/mcp/config/states/dpdk +++ b/mcp/config/states/dpdk @@ -10,9 +10,5 @@ salt -I 'nova:compute' cmd.run 'rm -vrf /etc/apt/preferences.d/*' salt -I 'nova:compute' file.remove '/etc/apt/sources.list.d/mirantis_openstack.list' salt -I 'nova:compute' pkg.refresh_db -salt -I 'nova:compute' pkg.install neutron-common -salt -I 'nova:compute' file.append /etc/sudoers.d/neutron_sudoers \ - args='neutron ALL = (root) NOPASSWD: /usr/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf' - salt -I 'nova:compute' pkg.install libvirt-bin salt -I 'nova:compute' file.chown /var/run/openvswitch libvirt-qemu kvm diff --git a/mcp/config/states/maas b/mcp/config/states/maas index de9d699b9..67ef6d559 100755 --- a/mcp/config/states/maas +++ b/mcp/config/states/maas @@ -17,8 +17,11 @@ function wait_for() { # Wait for MaaS commissioning/deploy to finish, retry on failure function maas_fixup() { local statuscmd="salt 'mas01*' --out yaml state.apply maas.machines.status" + # shellcheck disable=SC2155 + local ncount=$(salt --out yaml 'mas01*' pillar.get maas:region:machines | \ + grep -cE '^\s{2}\w+:$') wait_for 180 "${statuscmd} | tee /dev/stderr | " \ - "grep -Eq '((Deployed|Ready): 5|status:Failed|status:Allocated)'" + "grep -Eq '((Deployed|Ready): ${ncount}|status:Failed|status:Allocated)'" # shellcheck disable=SC2155 local statusout=$(eval "${statuscmd}") @@ -114,7 +117,3 @@ wait_for 10 "! 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} \ $(awk 'NR==1{print $2}' "$(eval echo "~${SUDO_USER}/.ssh/authorized_keys")")" - -# Get the latest packages -wait_for 10 "! salt '*' pkg.upgrade refresh=False | " \ - "tee /dev/stderr | fgrep -q 'Not connected'" diff --git a/mcp/config/states/neutron_compute b/mcp/config/states/neutron_compute index d58162100..6266b0f18 100755 --- a/mcp/config/states/neutron_compute +++ b/mcp/config/states/neutron_compute @@ -2,3 +2,5 @@ set -x salt -I 'neutron:compute' state.sls neutron +salt -I 'neutron:compute' file.append /etc/sudoers.d/neutron_sudoers \ + args='neutron ALL = (root) NOPASSWD: /usr/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf' diff --git a/mcp/config/states/opendaylight b/mcp/config/states/opendaylight index bee4c8586..e1ec1982f 100755 --- a/mcp/config/states/opendaylight +++ b/mcp/config/states/opendaylight @@ -3,4 +3,5 @@ set -x salt -I 'opendaylight:server' state.sls opendaylight salt -I 'opendaylight:client' state.sls opendaylight.client +salt -I 'opendaylight:client' cmd.run 'neutron-odl-ovs-hostconfig --noovs_dpdk' salt -I 'neutron:server' state.sls opendaylight.client |