amansi26for cleaning /etc/resolv.conf for sles we deleting symlink of /etc/resolv.conf . Is there any similar thing done for RHEL also. how are we cleaning old /etc/resolv.conf and generating new one? is it done by cloud init or NetworkManager package?09:50
amansi26I checked the code under rhel_utils.py We are just appending the new dns server, not cleaning the old one. Is there any other place we are cleaning it?10:34
=== vrubiolo1 is now known as vrubiolo
Odd_Blokeamansi26: There's cc_resolv_conf; I've never had to look at it, so I don't really know the details of what it does.13:46
amansi26Odd_Bloke: resolv_conf file seems like to make it work, we need to pass dns details under cloud.cfg .I am not sure it will still clear old data or not. But if we don't use it under cloud.cfg  and passing the dns details with Config Drive itself. Ideally it should update the file with latest dns details13:57
Odd_Blokeamansi26: I'm not sure I follow the use case/issue here.  Could you elaborate a little?14:05
amansi26Odd_Bloke: I have a image with 2 dns details under /etc/resolv.conf When I try to deploy with 2 new dns, the deployed system retains the old 2 dns value under /etc/resolv.conf and append one of the new dns passed. the old didn't get added with log message "ignoring nameserver 'x.x.x.x': adding would exceed the maximum of '3' name servers (see resolv.conf(5))"14:22
amansi26I see this on RHEL14:22
amansi26I understand we can have max of 3 dns in /etc/resolv.conf . but previous/old dns must be cleaned14:22
amansi26I am passing the dns data with ConfigDrive. datasource use is DataSourceConfigDrive . I am not using resolv_conf module in cloud.cfg14:24
amansi26Odd_Bloke: ^^14:24
Odd_Blokeamansi26: "one of the new dns passed" <-- how are you passing these?14:29
Odd_BlokeIn network configuration, or in user-data?14:29
Odd_Bloke(Can you paste whatever config you're using?)14:29
amansi26Odd_Bloke: the details are passed as: https://bit.ly/36M4N2i15:21
meenathat's he second worst pastebin I've seen all day15:41
Odd_Blokeamansi26: Why are there already NetworkManager generated entries in resolv.conf on a first boot?16:16
amansi26Odd_Bloke: Yeah, might be when I installed a fresh RHEL OS at that time this details got added. I am really not sure how that networkmanager message prompt in /etc/resolv.conf16:19
Odd_Blokeamansi26: You're installing Red Hat from an ISO rather than using a cloud image?16:25
amansi26Odd_Bloke: Correct I am using ISO for installation16:30
Odd_Blokeamansi26: OK, I'm not surprised you're hitting issues: cloud-init is generally intended for use in images that have been prepared for use in clouds (or from images captured from instances launched from such images).  This may not be possible for you, of course, but if you're able to move to using the QCOW2 images which (I think) Red Hat provide, then you'll likely run into fewer issues like this.16:37
amansi26Odd_Bloke: Sure I will try that. Thanks for suggestion16:39
Odd_BlokeIn this specific case, I believe cloud-init is assuming that you have configured those DNS servers in your image for a reason, and so is not removing them.  It looks like this has been the behaviour since ~2013, so I don't know that it's something we would want to change for this unusual use case.16:39
Odd_BlokeGiven that you _haven't_ configured them for a reason, then I would just remove resolv.conf during your image mastering process, so cloud-init doesn't use the existing entries.  (Though the QCOW2 should already be in this state, so I would still recommend using that if possible. :)16:41

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!