View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016948 | CentOS-8 | Cloud-Images | public | 2020-01-17 16:55 | 2021-11-07 19:23 |
Reporter | uwktower | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | new | Resolution | open | ||
Summary | 0016948: CentOS 8 cloud images have static 192.168.122.1 nameserver in /etc/resolv.conf | ||||
Description | The CentOS 8 cloud images have the line "nameserver 192.168.122.1" statically defined in /etc/resolv.conf: $ sudo losetup -f -P CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.raw /mnt/test $ losetup -l | grep CentOS /dev/loop4 0 0 0 0 /data/tmp/CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.raw 0 512 $ sudo mount -o ro /dev/loop4p1 /mnt/test $ cat /mnt/test/etc/resolv.conf # Generated by NetworkManager nameserver 192.168.122.1 In certain environments, this line will stick around, even if it is invalid for the environment. This causes DNS lookup timeouts: $ ssh centos@192.168.10.12 Warning: Permanently added '192.168.10.12' (ECDSA) to the list of known hosts. Activate the web console with: systemctl enable --now cockpit.socket [centos@c8test1 ~]$ ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8950 qdisc fq_codel state UP group default qlen 1000 link/ether fa:16:3e:d4:12:12 brd ff:ff:ff:ff:ff:ff inet 192.168.10.12/24 brd 192.168.10.255 scope global dynamic noprefixroute eth0 valid_lft 86384sec preferred_lft 86384sec inet6 fe80::f816:3eff:fed4:1212/64 scope link valid_lft forever preferred_lft forever [centos@c8test1 ~]$ cat /etc/resolv.conf ; Created by cloud-init on instance boot automatically, do not edit. ; # Generated by NetworkManager nameserver 192.168.122.1 nameserver x.x.120.2 # valid nameserver x.x.112.2 # valid In at least one environment, however, the entry is scrubbed and looks correct: $ ssh centos@10.155.176.31 Warning: Permanently added '10.155.176.31' (ECDSA) to the list of known hosts. Activate the web console with: systemctl enable --now cockpit.socket [centos@c8test2 ~]$ ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc fq_codel state UP group default qlen 1000 link/ether fa:16:3e:5e:8d:65 brd ff:ff:ff:ff:ff:ff inet 10.155.176.31/23 brd 10.155.177.255 scope global dynamic noprefixroute eth0 valid_lft 86300sec preferred_lft 86300sec inet6 fe80::f816:3eff:fe5e:8d65/64 scope link valid_lft forever preferred_lft forever [centos@c8test2 ~]$ cat /etc/resolv.conf # Generated by NetworkManager search openstacklocal novalocal nameserver x.x.120.2 # valid nameserver x.x.112.2 # valid The only obvious difference I can find at the moment is that the problematic environment is in the same /16 (192.168.0.0/16) as the nameserver IP address that was left behind in the image, but I don't know if that is relevant or not. | ||||
Steps To Reproduce | See description. | ||||
Tags | No tags attached. | ||||
I have never contributed to centos builds before but here's a PR, happy to test it further but I would need some guidance to figure out how to run the build locally with the tools that centos is using. https://git.centos.org/centos/kickstarts/pull-request/12 |
|
Hi there, We've exactly the same issue with "CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.qcow2" and OpenStack. A new machine has the following DNS entries: [root@centos8 centos]# cat /etc/resolv.conf ; Created by cloud-init on instance boot automatically, do not edit. ; # Generated by NetworkManager nameserver 192.168.122.1 nameserver 8.8.8.8 Our network is 192.168.3.0/24 and we have just specified 8.8.8.8 during the deployment. DNS lookups are now really slow. Best regards Reto |
|
The same behaviour in a non 192.168.x network: [centos@juhu ~]$ cat /etc/resolv.conf ; Created by cloud-init on instance boot automatically, do not edit. ; # Generated by NetworkManager nameserver 192.168.122.1 nameserver 8.8.8.8 [centos@juhu ~]$ ip addr show eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc fq_codel state UP group default qlen 1000 link/ether fa:16:3e:1b:c7:8d brd ff:ff:ff:ff:ff:ff inet 172.31.0.244/20 brd 172.31.15.255 scope global dynamic noprefixroute eth0 valid_lft 86353sec preferred_lft 86353sec inet6 fe80::f816:3eff:fe1b:c78d/64 scope link valid_lft forever preferred_lft forever |
|
I used Proxmox to deploy CentOS images to my clients. Any ideas how to fix this manually (in new to Cloud-Init) So far in Proxmox Cloud-Init UI I added a space delimited list of preferred DNS servers: 1.1.1.1 8.8.4.4 Yet I get this on deployment: ``` $ cat /etc/resolv.conf ; Created by cloud-init on instance boot automatically, do not edit. ; # Generated by NetworkManager nameserver 192.168.122.1 nameserver 1.1.1.1 nameserver 8.8.4.4 ... ``` My goal would be to update the CentOS cloud image and remove that line, but I don't know where to start! |
|
Hello, I opened https://git.centos.org/centos/kickstarts/pull-request/15 which is exactly like https://git.centos.org/centos/kickstarts/pull-request/12 but for CentOS 7 cloud-images. I realize this is very, very late in the game for CentOS 7, but some folks are just now considering getting off 7 and into 8 Stream; moving infra first to cloud-images still running on CentOS 7 makes sense for a more streamlined migration experience. |
|