diff options
author | Thomas Haller <thaller@redhat.com> | 2018-04-04 18:26:31 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-04-05 11:30:14 +0200 |
commit | 3f969d3b5b95f3d0f4fc0ba7e8d42bdf85bdef38 (patch) | |
tree | 6a3655702c4eec0a555cf02d4f52b2d350b79887 | |
parent | 95d24929aa6d6cae5cb5ea20b4920735aef8ade1 (diff) | |
download | NetworkManager-3f969d3b5b95f3d0f4fc0ba7e8d42bdf85bdef38.tar.gz |
ifcfg-rh: suppress warning about NM_CONTROLLED=no without restricting profile to device
NM_CONTROLLED=no has the primary use of marking devices as unmanaged.
For that to work, the ifcfg file must contain either a MAC address,
an interface-name, or s390-subchannels that match a device.
In case the profile doesn't contain such specifiers, the profile
is ignored and a warning was logged:
<warn> [1522849679.7866] ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-ens99" fails: NM_CONTROLLED was false but device was not uniquely identified; device will be managed
Downgrade this warning to a debug message. It's not unreasonable
that a user marks a ifcfg file with NM_CONTROLLED=no, to avoid
NetworkManager handling it. Yes, that way, the user did not explicitly
mark a device as unmanaged. But NetworkManager will ignore the profile,
as the user might resonably desire. No need to warn about that.
-rw-r--r-- | src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c index 1769541a26..51a72d7e15 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c @@ -5344,6 +5344,7 @@ connection_from_file_full (const char *filename, if (!svGetValueBoolean (parsed, "NM_CONTROLLED", TRUE)) { connection = create_unhandled_connection (filename, parsed, "unmanaged", out_unhandled); if (!connection) { + NM_SET_OUT (out_ignore_error, TRUE); g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED, "NM_CONTROLLED was false but device was not uniquely identified; device will be managed"); } |