OS-8319: lx centos family resolver logic should match ubuntu

Details

Issue Type:Bug
Priority:4 - Normal
Status:Resolved
Created at:2021-09-23T13:48:01.627Z
Updated at:2021-09-29T22:25:05.224Z

People

Created by:Michael Zeller
Reported by:Michael Zeller
Assigned to:Michael Zeller

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2021-09-29T22:08:33.843Z)

Fix Versions

2021-10-07 Case (Release Date: 2021-10-07)

Related Links

Description

Ubuntu/Debian lx brand scripts have updated zone attr parsing for /etc/resolv.conf generation.  On newer centos images resolv.conf fails to be populated.  We should bring the centos family of OSes in line with the Ubuntu family.

Comments

Comment by Michael Zeller
Created at 2021-09-29T19:52:08.186Z

Before the patch:

centos 7

[root@9679d26d-0392-4c97-9211-a2399f9a1ea8 ~]# cat /etc/resolv.conf
# AUTOMATIC ZONE CONFIG
nameserver 8.8.8.8
nameserver 8.8.4.4
search local

centos 8

[root@7ecb4fd5-ad46-4c50-945a-8ba59298d875 ~]# cat /etc/resolv.conf
[root@7ecb4fd5-ad46-4c50-945a-8ba59298d875 ~]# cat /etc/systemd/resolved.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details

[Resolve]
#DNS=
#FallbackDNS=
#Domains=
#LLMNR=yes
#MulticastDNS=yes
#DNSSEC=allow-downgrade
#DNSOverTLS=no
#Cache=yes
#DNSStubListener=udp

After the patch:

centos 7

[root@a39ec187-fff1-4f5b-90d3-33b568a310cc ~]# cat /etc/resolv.conf
# AUTOMATIC ZONE CONFIG
nameserver 8.8.8.8
nameserver 8.8.4.4
search local

centos 8

[root@e6625719-70ac-4478-91c2-29c47f830c74 ~]# cat /etc/resolv.conf
# AUTOMATIC ZONE CONFIG
nameserver 8.8.8.8
nameserver 8.8.4.4
search local
[root@e6625719-70ac-4478-91c2-29c47f830c74 ~]# cat /etc/systemd/resolved.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details

[Resolve]
#DNS=
#FallbackDNS=
#Domains=
#LLMNR=yes
#MulticastDNS=yes
#DNSSEC=allow-downgrade
#DNSOverTLS=no
#Cache=yes
#DNSStubListener=udp
DNS=8.8.8.8,8.8.4.4
Domains=local

With the patch in place both cents 7 and 8 can resolve things on the network, which I tested by running yum update and dnf update respectively.


Comment by Michael Zeller
Created at 2021-09-29T19:56:02.950Z
Updated at 2021-09-29T22:24:36.865Z

Additionally I tested an ancient centos 6 container image and confirmed that it still functions with the patch.