Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
I have running NM.
I created 00-resolv.conf as follows:
$ cat /etc/NetworkManager/conf.d/00-resolv.conf
[main]
rc-manager=unmanaged
altered /etc/resolv.conf to contain
nameserver 192.168.100.1
and I rebooted thinking that everything will be correctly set on many boxes, so I can update them, etc
but what I see in /etc/resolv.conf?
# Generated by NetworkManager
and that's it. So resolv.conf was overwritten in the meantime. Is this expected? If I call systemctl reload NetworkManager before reboot then everything works well. Do we really want to clean the resolv.conf file when NM goes down?
Version-Release number of selected component (if applicable):
NetworkManager-1.10.2-9.el7.x86_64
If you edit NetworkManager.conf files, without reloading the configuration (SIGHUP or via D-Bus), then the changes that you made on disk have no effect until you restart NetworkManager.
Yes, this works as expected. We don't automatically reload configuration (for good reasons), so it's up to the user to do that.
I'd close as NOTABUG.
Regardless of that, I wonder if it ever makes sense to write an empty resolv.conf file. Maybe, if we have no name servers to configure, we should leave whatever currently is in resolv.conf file. However, that would mean, that you cannot un-configure all DNS servers if you wanted to. That doesn't seem right either. Beniamino, what do you think?
Comment 4Beniamino Galvani
2018-02-08 17:21:43 UTC
Comment 5Beniamino Galvani
2018-02-08 17:24:09 UTC
(In reply to Thomas Haller from comment #3)
> If you edit NetworkManager.conf files, without reloading the configuration
> (SIGHUP or via D-Bus), then the changes that you made on disk have no effect
> until you restart NetworkManager.
>
> Yes, this works as expected. We don't automatically reload configuration
> (for good reasons), so it's up to the user to do that.
>
>
> I'd close as NOTABUG.
>
>
> Regardless of that, I wonder if it ever makes sense to write an empty
> resolv.conf file. Maybe, if we have no name servers to configure, we should
> leave whatever currently is in resolv.conf file. However, that would mean,
> that you cannot un-configure all DNS servers if you wanted to. That doesn't
> seem right either. Beniamino, what do you think?
In my opinion, the problem is that we shouldn't update resolv.conf without reason when quitting. The patch above should fix that.
(In reply to Beniamino Galvani from comment #4)
> Created attachment 1393270[details]
> [PATCH] dns: on quit only update resolv.conf if dns=dnsmasq
lgtm
Comment 7Beniamino Galvani
2018-02-09 12:23:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:3207