aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/config
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/config')
-rw-r--r--mcp/config/scenario/defaults-aarch64.yaml (renamed from mcp/config/scenario/virtual/defaults.yaml)4
-rw-r--r--mcp/config/scenario/defaults-x86_64.yaml (renamed from mcp/config/scenario/baremetal/defaults.yaml)0
-rwxr-xr-xmcp/config/states/dpdk2
-rwxr-xr-xmcp/config/states/maas9
-rwxr-xr-xmcp/config/states/openstack_ha5
5 files changed, 14 insertions, 6 deletions
diff --git a/mcp/config/scenario/virtual/defaults.yaml b/mcp/config/scenario/defaults-aarch64.yaml
index b841e88c9..17fbbfcbe 100644
--- a/mcp/config/scenario/virtual/defaults.yaml
+++ b/mcp/config/scenario/defaults-aarch64.yaml
@@ -1,6 +1,6 @@
-base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
+base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64-uefi1.img
virtual:
default:
- vcpus: 2
+ vcpus: 6
ram: 4096
diff --git a/mcp/config/scenario/baremetal/defaults.yaml b/mcp/config/scenario/defaults-x86_64.yaml
index b841e88c9..b841e88c9 100644
--- a/mcp/config/scenario/baremetal/defaults.yaml
+++ b/mcp/config/scenario/defaults-x86_64.yaml
diff --git a/mcp/config/states/dpdk b/mcp/config/states/dpdk
index c1ec07e27..ad435630c 100755
--- a/mcp/config/states/dpdk
+++ b/mcp/config/states/dpdk
@@ -2,7 +2,7 @@
set -x
salt -I 'nova:compute' system.reboot
-while true; do salt -I 'nova:compute' test.ping | fgrep -q 'Not connected' || break; done
+while true; do salt -I 'nova:compute' test.ping | grep -Fq 'Not connected' || break; done
salt -I 'nova:compute' state.sls linux.network
# switch to UCA repos since fuel-infra packages have bugs
diff --git a/mcp/config/states/maas b/mcp/config/states/maas
index 710ec0e82..db0bd3fe6 100755
--- a/mcp/config/states/maas
+++ b/mcp/config/states/maas
@@ -3,10 +3,12 @@ set -x
function wait_for() {
local total_attempts=$1; shift
- local cmdstr=$@
+ local cmdstr=$*
local sleep_time=10
echo "[NOTE] Waiting for cmd to return success: ${cmdstr}"
+ # shellcheck disable=SC2034
for attempt in $(seq "${total_attempts}"); do
+ # shellcheck disable=SC2015
eval "${cmdstr}" && break || true
echo -n '.'; sleep "${sleep_time}"
done
@@ -17,8 +19,10 @@ function maas_fixup() {
local statuscmd="salt 'mas01*' --out yaml state.apply maas.machines.status"
wait_for 180 "${statuscmd} | tee /dev/stderr | " \
"grep -Eq '((Deployed|Ready): 5|status:Failed|status:Allocated)'"
+ # shellcheck disable=SC2155
local statusout=$(eval "${statuscmd}")
+ # shellcheck disable=SC2155
local fcnodes=$(echo "${statusout}" | \
grep -Po '(?<=system_id:)(.*)(?=,status:Failed commissioning)')
for node_system_id in ${fcnodes}; do
@@ -30,6 +34,7 @@ function maas_fixup() {
return 1
fi
+ # shellcheck disable=SC2155
local fdnodes=$(echo "${statusout}" | \
grep -Po '(?<=system_id:)(.*)(?=,status:(Failed deployment|Allocated))')
for node_system_id in ${fdnodes}; do
@@ -106,4 +111,4 @@ wait_for 10 "! salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply linux,ntp |
"tee /dev/stderr | fgrep -q 'Not connected'"
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))"
+ $(awk 'NR==1{print $2}' "$(eval echo "~${SUDO_USER}/.ssh/authorized_keys")")"
diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha
index b9db81729..8ca76e49f 100755
--- a/mcp/config/states/openstack_ha
+++ b/mcp/config/states/openstack_ha
@@ -54,5 +54,8 @@ salt -I 'ceilometer:agent' state.sls ceilometer
salt -I 'horizon:server' state.sls horizon
salt -I 'nginx:server' state.sls nginx
-salt -C 'I@nginx:server and *01*' cp.push /etc/ssl/certs/10.167.4.80-with-chain.crt upload_path='certs/os_cacert'
+clstr_vip_addr=$(salt -C 'I@nginx:server and *01*' --out=yaml \
+ pillar.get _param:cluster_vip_address | awk '{print $2; exit}')
+salt -C 'I@nginx:server and *01*' cp.push \
+ /etc/ssl/certs/${clstr_vip_addr}-with-chain.crt upload_path='certs/os_cacert'
cd /etc/ssl/certs && ln -s /var/cache/salt/master/minions/prx01.*/files/certs/os_cacert