summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-10-26 10:50:27 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-10-26 10:51:18 -0700
commit675eb15ea9c5b4e57dbd2c022c43c4b4efd1d4be (patch)
treec08b4cf1fd2ef4edca406ee4244a93d59871ade2
parentc72a69e767c9232080fb396695016071e426970c (diff)
Improve resilience against intermittent OS errors
Add workaround for intermittent failure for OpenStack to properly assign default apt mirrors. Change-Id: Id4191327542d9711ab65117522c4160838a66052 Issue-ID: INT-586 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
-rw-r--r--deployment/heat/onap-oom/k8s_vm_entrypoint.sh4
-rw-r--r--deployment/heat/onap-oom/rancher_vm_entrypoint.sh5
2 files changed, 7 insertions, 2 deletions
diff --git a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
index 438529558..6311dfbff 100644
--- a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
+++ b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
@@ -40,10 +40,12 @@ echo "__rancher_private_ip_addr__:/dockerdata-nfs /dockerdata-nfs nfs noauto,noa
echo "vm.max_map_count=262144" >> /etc/sysctl.conf
sysctl -p
+# workaround for OpenStack intermittent failure to change default apt mirrors
+sed -i 's|http://archive.ubuntu.com|http://nova.clouds.archive.ubuntu.com|g' /etc/apt/sources.list
while ! hash jq &> /dev/null; do
apt-get -y update
- apt-get -y install linux-image-extra-$(uname -r) jq nfs-common
+ apt-get -y install apt-transport-https ca-certificates curl software-properties-common linux-image-extra-$(uname -r) jq nfs-common
sleep 10
done
diff --git a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
index f90957a56..18951d937 100644
--- a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
+++ b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
@@ -62,9 +62,12 @@ Acquire::https::Proxy "DIRECT";
EOF
fi
+# workaround for OpenStack intermittent failure to change default apt mirrors
+sed -i 's|http://archive.ubuntu.com|http://nova.clouds.archive.ubuntu.com|g' /etc/apt/sources.list
+
while ! hash jq &> /dev/null; do
apt-get -y update
- apt-get -y install linux-image-extra-$(uname -r) jq make nfs-kernel-server moreutils
+ apt-get -y install linux-image-extra-$(uname -r) apt-transport-https ca-certificates curl software-properties-common jq make nfs-kernel-server moreutils
sleep 10
done