From 4d6a6ec507820a02d956c7a28cfe78b53b4ea852 Mon Sep 17 00:00:00 2001 From: Jing Xu Date: Wed, 1 Mar 2017 17:15:14 -0800 Subject: [PATCH] Add bind mount /etc/resolv.conf from host to containerized mounter Currently, in containerized mounter rootfs, there is no DNS setup. By bind mount the host's /etc/resolv.conf to mounter rootfs, vm hosts name could be resolved when using host name during mount. --- cluster/gce/gci/configure-helper.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 8b2b608e72..8cf7ad87dd 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -890,6 +890,7 @@ function prepare-mounter-rootfs { mount --make-rshared "${CONTAINERIZED_MOUNTER_ROOTFS}/var/lib/kubelet" mount --bind -o ro /proc "${CONTAINERIZED_MOUNTER_ROOTFS}/proc" mount --bind -o ro /dev "${CONTAINERIZED_MOUNTER_ROOTFS}/dev" + mount --bind -o ro /etc/resolv.conf "${CONTAINERIZED_MOUNTER_ROOTFS}/etc/resolv.conf" } # A helper function for removing salt configuration and comments from a file.