Commit 3f969d3b authored by Thomas Haller's avatar Thomas Haller
Browse files

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.
parent 95d24929
......@@ -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");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment