summaryrefslogtreecommitdiffstats
path: root/mcp/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/scripts')
-rw-r--r--mcp/scripts/.gitignore1
-rw-r--r--mcp/scripts/lib.sh4
-rwxr-xr-xmcp/scripts/salt.sh3
3 files changed, 6 insertions, 2 deletions
diff --git a/mcp/scripts/.gitignore b/mcp/scripts/.gitignore
index 89af7c473..a7f658e4e 100644
--- a/mcp/scripts/.gitignore
+++ b/mcp/scripts/.gitignore
@@ -1,2 +1,3 @@
+mcp.rsa*
user-data.*.sh
xdf_data.sh
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 7d57fcf5f..ce5db251f 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -38,10 +38,11 @@ function get_base_image {
function __kernel_modules {
# Load mandatory kernel modules: loop, nbd
local image_dir=$1
- sudo modprobe loop
+ test -e /dev/loop-control || sudo modprobe loop
if sudo modprobe nbd max_part=8 || sudo modprobe -f nbd max_part=8; then
return 0
fi
+ if [ -e /dev/nbd0 ]; then return 0; fi # nbd might be inbuilt
# CentOS (or RHEL family in general) do not provide 'nbd' out of the box
echo "[WARN] 'nbd' kernel module cannot be loaded!"
if [ ! -e /etc/redhat-release ]; then
@@ -225,6 +226,7 @@ function cleanup_mounts {
function cleanup_uefi {
# Clean up Ubuntu boot entry if cfg01, kvm nodes online from previous deploy
local cmd_str="ssh ${SSH_OPTS} ${SSH_SALT}"
+ ping -c 1 -w 1 "${SALT_MASTER}" || return 0
[ ! "$(hostname)" = 'cfg01' ] || cmd_str='eval'
${cmd_str} "sudo salt -C 'kvm* or cmp*' cmd.run \
\"which efibootmgr > /dev/null 2>&1 && \
diff --git a/mcp/scripts/salt.sh b/mcp/scripts/salt.sh
index ad4707369..aecfecea4 100755
--- a/mcp/scripts/salt.sh
+++ b/mcp/scripts/salt.sh
@@ -63,6 +63,7 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s -e << SALT_INSTALL_END
ln -sf ${OPNFV_GIT_DIR}${F_GIT_SUBD} ${OPNFV_FUEL_DIR}
ln -sf ${OPNFV_FUEL_DIR}/mcp/reclass /srv/salt
ln -sf ${OPNFV_FUEL_DIR}/mcp/deploy/scripts /srv/salt
+ ln -sf ${OPNFV_FUEL_DIR}/mcp/scripts/mcp.rsa $(dirname "${OPNFV_FUEL_DIR}")
cd /srv/salt/${OPNFV_RDIR} && rm -f arch && ln -sf "\$(uname -i)" arch
cp -r ${OPNFV_FUEL_DIR}/mcp/metadata/service /usr/share/salt-formulas/reclass
@@ -70,7 +71,7 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s -e << SALT_INSTALL_END
ln -sf /usr/share/salt-formulas/reclass/service/opendaylight
# Armband APT-MK nightly/extra repo for forked & extended reclass
- apt-key adv --keyserver keys.gnupg.net --recv 798AB1D1
+ wget -qO - https://linux.enea.com/apt-mk/public.gpg | apt-key add -
echo 'deb http://linux.enea.com/apt-mk/xenial nightly extra' > \
'/etc/apt/sources.list.d/armband_mcp_extra.list'
apt-get update