Bug 1541013

Summary: [RFE] warn about unknown/erroneous configuration options in NetworkManager.conf
Product: Red Hat Enterprise Linux 8 Reporter: Vladimir Benes <vbenes>
Component: NetworkManagerAssignee: Beniamino Galvani <bgalvani>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: low    
Version: ---CC: atragler, bgalvani, fgiudici, fpokryvk, lrintel, rkhan, sukulkar, thaller
Target Milestone: betaKeywords: FutureFeature
Target Release: 8.1Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 22:28:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1682336    
Bug Blocks:    
Attachments:
Description Flags
journal log none

Description Vladimir Benes 2018-02-01 14:16:20 UTC
Description of problem:
NM seems to be overwriting /etc/resolv.conf even if I set 
[main]
rc-managed=unmanaged

in /etc/NetworkManager/conf.d/00-resolv.conf

$ NetworkManager --print-config
# NetworkManager configuration: /etc/NetworkManager/NetworkManager.conf (lib: 10-slaves-order.conf, 20-connectivity-fedora.conf) (etc: 00-resolv.conf)

[main]
# plugins=ifcfg-rh,ibft
# rc-manager=file
# auth-polkit=true
# dhcp=dhclient
slaves-order=index
rc-managed=unmanaged

[connectivity]
uri=http://fedoraproject.org/static/hotspot.txt
response=OK
interval=300

[logging]
# backend=syslog
# audit=false


but I can see:
$ cat /etc/resolv.conf 
# Generated by NetworkManager
search redhat.com
nameserver 10.38.5.26
nameserver 10.35.255.14
nameserver 192.168.1.1


Version-Release number of selected component (if applicable):
NetworkManager-1.10.2-9.el7.x86_64

Shouldn't be resolv.conf untouched for others to manage it?

Comment 2 Vladimir Benes 2018-02-01 14:17:46 UTC
Created attachment 1389519 [details]
journal log

Comment 3 Vladimir Benes 2018-02-01 14:45:06 UTC
ok, so the correct setup is 
rc-manager=unmanaged
not
rc-managed=unmanaged

the question is if we should accept incorrect configuration. Should I close it or change the subject?

Comment 4 Thomas Haller 2018-02-04 15:47:45 UTC
(In reply to Vladimir Benes from comment #3)
> ok, so the correct setup is 
> rc-manager=unmanaged
> not
> rc-managed=unmanaged
> 
> the question is if we should accept incorrect configuration. Should I close
> it or change the subject?

Yes, NM silently ignores configuration settings that it doesn't understand.

NM does not fail to start in face of unknown configuration keys, because that would make it more complicated to write a configuration that works for various versions of NetworkManager. The unknown option might just be a new setting of a future version. Maybe, the user could workaround such strict policy via:

  [.config]
  enable=nm-version-min:1.12,nm-version-min:1.10.6

Another reason, why we cannot enable strict checking now, is that it might break existing (though bogus) configurations. We really should have done strict validation from the start.


I see however a use in warning about unknown keys (or keys with invalid settings). But it's extra work, and seems low priority to me.

Comment 6 Beniamino Galvani 2018-11-19 14:13:30 UTC
Initial implementation at:
https://github.com/NetworkManager/NetworkManager/pull/251

Comment 12 errata-xmlrpc 2019-11-05 22:28:59 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-2019:3623