aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2019-07-30 06:04:05 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-07-30 06:04:05 +0000
commit9268e8d64adec086ac2698a885f57872c725fd88 (patch)
tree6c60de19d41863911dd6f481ec766f4cf73eaedb
parent996cd16af2b0e2804becb9cb73fe7f92a57b3c94 (diff)
parent7a42faa5f2f719709cba436eac5059e54bf4acc5 (diff)
Merge "[deploy] Explicitly set NS for resolvconf in VMs"
-rw-r--r--mcp/scripts/lib_jump_deploy.sh7
-rw-r--r--mcp/scripts/xdf_data.sh.j21
2 files changed, 5 insertions, 3 deletions
diff --git a/mcp/scripts/lib_jump_deploy.sh b/mcp/scripts/lib_jump_deploy.sh
index 24fc4ee72..532508a58 100644
--- a/mcp/scripts/lib_jump_deploy.sh
+++ b/mcp/scripts/lib_jump_deploy.sh
@@ -154,7 +154,7 @@ function __mount_image {
if [[ "${MCP_OS:-}" =~ ubuntu1804 ]]; then
# Ubuntu Bionic (18.04) or newer defaults to using netplan.io, revert it
sudo mkdir -p "${OPNFV_MNT_DIR}/run/systemd/resolve"
- sudo cp -f --remove-destination /etc/resolv.conf \
+ echo "nameserver ${dns_public}" | sudo tee \
"${OPNFV_MNT_DIR}/run/systemd/resolve/stub-resolv.conf"
sudo chroot "${OPNFV_MNT_DIR}" systemctl stop \
systemd-networkd.socket systemd-networkd \
@@ -172,8 +172,9 @@ function __mount_image {
sudo sed -i -e 's/^\(SELINUX\)=.*$/\1=permissive/g' \
"${OPNFV_MNT_DIR}/etc/selinux/config"
fi
- sudo cp -f --remove-destination \
- /etc/resolv.conf "${OPNFV_MNT_DIR}/etc/resolv.conf"
+ sudo rm -f "${OPNFV_MNT_DIR}/etc/resolv.conf"
+ echo "nameserver ${dns_public}" | sudo tee \
+ "${OPNFV_MNT_DIR}/etc/resolv.conf"
echo "GRUB_DISABLE_OS_PROBER=true" | \
sudo tee -a "${OPNFV_MNT_DIR}/etc/default/grub"
sudo sed -i -e 's/^\(GRUB_TIMEOUT\)=.*$/\1=1/g' -e 's/^GRUB_HIDDEN.*$//g' \
diff --git a/mcp/scripts/xdf_data.sh.j2 b/mcp/scripts/xdf_data.sh.j2
index 032b00acf..79bc16c81 100644
--- a/mcp/scripts/xdf_data.sh.j2
+++ b/mcp/scripts/xdf_data.sh.j2
@@ -100,6 +100,7 @@ OPNFV_BRIDGES=(
)
export CLUSTER_DOMAIN={{ conf.cluster.domain }}
+dns_public={{ nm.dns_public[0] }}
cluster_states={{ bash_arr(arch.default.cluster.states + cluster_states) }}
virtual_nodes={{ filter_nodes('virtual') }}
control_nodes_query={{ filter_nodes(['baremetal', 'virtual'], True, ['control']) }}