From 3f969d3b5b95f3d0f4fc0ba7e8d42bdf85bdef38 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 4 Apr 2018 18:26:31 +0200 Subject: [PATCH] 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: [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. --- src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c | 1 + 1 file changed, 1 insertion(+) 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"); }