Fix DNS resolver issue

This commit is contained in:
Pearl Dsilva 2024-07-31 08:54:21 -04:00 committed by nvazquez
parent c884423b96
commit 1952f2e7dd
No known key found for this signature in database
GPG Key ID: 656E1BCC8CB54F84
3 changed files with 5 additions and 7 deletions

View File

@ -113,9 +113,7 @@ class CsDhcp(CsDataBag):
if (self.config.is_vpc() or self.config.is_router()) and ('is_vr_guest_gateway' in gn.data and gn.data['is_vr_guest_gateway']):
if gateway in dns_list:
dns_list.remove(gateway)
if gn.data['router_guest_ip'] != gn.data['router_guest_gateway']:
dns_list.insert(0, gn.data['router_guest_ip'])
else:
if gn.data['router_guest_ip'] != ip:
dns_list.insert(0, ip)
elif self.config.is_dhcp() and not self.config.use_extdns():
guest_ip = self.config.address().get_guest_ip()

View File

@ -19,7 +19,7 @@
function install_packages() {
apt-get install -y rsyslog logrotate cron net-tools ifupdown cloud-guest-utils conntrack apt-transport-https ca-certificates curl \
gnupg gnupg-agent software-properties-common gnupg lsb-release
apt-get install -y python3-json-pointer python3-jsonschema cloud-init
apt-get install -y python3-json-pointer python3-jsonschema cloud-init resolvconf
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

View File

@ -16,15 +16,15 @@
# specific language governing permissions and limitations
# under the License.
# build script which wraps around packer and virtualbox to create the systemvm template
# build script which wraps around packer and virtualbox to create the CKS template
function usage() {
cat <<END
Usage:
./build.sh [template] [version] [BUILD_NUMBER]
* Set \$appliance to provide definition name to build
(or use command line arg, default systemvmtemplate)
* Set \$template to provide definition name to build
(or use command line arg, default ckstemplate)
* Set \$version to provide version to apply to built appliance
(or use command line arg, default empty)
* Set \$BUILD_NUMBER to provide build number to apply to built appliance