diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2022-10-11 13:44:31 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2022-10-11 16:20:45 +0200 |
commit | ad497301d015664c2a7bf782c2f735e8c4ced50a (patch) | |
tree | a3847173084a2c3bc9c442f8664e01562df1dac4 | |
parent | 93ec6abf16a5af54b96a9ee953c3cca8cb437449 (diff) |
team: don't log failures to connect to teamd on error levellr/team-connect-log
ensure_teamd_connection() is called from multiple spots. Sometimes
we call opportunistically without having started teamd (e.g. when on
update_connection() when generating a connection for teaming device that
was created) and handle the failure to connect gracefully.
Let's not pollute the logs with things on ERROR level that are not
actually serious. Demote the logging statement to DEBUG and log an ERROR
only when we expect ensure_teamd_connection() to actually succeed.
-rw-r--r-- | src/core/devices/team/nm-device-team.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/devices/team/nm-device-team.c b/src/core/devices/team/nm-device-team.c index 49ce953df1..9103bfb97f 100644 --- a/src/core/devices/team/nm-device-team.c +++ b/src/core/devices/team/nm-device-team.c @@ -168,7 +168,7 @@ ensure_teamd_connection(NMDevice *device) priv->tdc = _tdc_connect_new(self, nm_device_get_iface(device), &error); if (!priv->tdc) { - _LOGE(LOGD_TEAM, "failed to connect to teamd: %s", error->message); + _LOGD(LOGD_TEAM, "failed to connect to teamd: %s", error->message); return FALSE; } @@ -412,6 +412,8 @@ teamd_ready(NMDeviceTeam *self) * device activation. */ success = ensure_teamd_connection(device); + if (!success) + _LOGE(LOGD_TEAM, "Could not connect to teamd"); if (nm_device_get_state(device) != NM_DEVICE_STATE_PREPARE || priv->stage1_state != NM_DEVICE_STAGE_STATE_PENDING) |