summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-06-07 13:30:08 +0200
committerThomas Haller <thaller@redhat.com>2017-06-08 22:01:19 +0200
commit7e2d64a8b23e4606f15fc66ebf953d5effb16ac3 (patch)
tree92190450b07767448671f3211f915d946031d3a9
parent01fd9df6e589ef623a069cb6c46230ba77ad6b0a (diff)
downloadNetworkManager-7e2d64a8b23e4606f15fc66ebf953d5effb16ac3.tar.gz
manager: add more logging to recheck_assume_connection()
and give all lines a logging prefix. (cherry picked from commit 94534e032788e69690c2affcd09d1f306ffa3840)
-rw-r--r--src/nm-manager.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index bf64dfb5b1..aeff01abcb 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -1901,22 +1901,27 @@ recheck_assume_connection (NMManager *self,
if (!nm_device_get_managed (device, FALSE)) {
nm_device_assume_state_reset (device);
+ _LOG2D (LOGD_DEVICE, device, "assume: don't assume because %s", "not managed");
return FALSE;
}
state = nm_device_get_state (device);
if (state > NM_DEVICE_STATE_DISCONNECTED) {
nm_device_assume_state_reset (device);
+ _LOG2D (LOGD_DEVICE, device, "assume: don't assume due to device state %s",
+ nm_device_state_to_str (state));
return FALSE;
}
connection = get_existing_connection (self, device, &generated);
if (!connection) {
- _LOG2D (LOGD_DEVICE, device, "can't assume; no connection");
+ _LOG2D (LOGD_DEVICE, device, "assume: don't assume because %s", "no connection was generated");
return FALSE;
}
- _LOG2D (LOGD_DEVICE, device, "will attempt to assume connection");
+ _LOG2D (LOGD_DEVICE, device, "assume: will attempt to assume %sconnection %s",
+ generated ? "generated " : "",
+ nm_connection_get_uuid (NM_CONNECTION (connection)));
nm_device_sys_iface_state_set (device,
generated
@@ -1951,7 +1956,7 @@ recheck_assume_connection (NMManager *self,
&error);
if (!active) {
- _LOGW (LOGD_DEVICE, "assumed connection %s failed to activate: %s",
+ _LOGW (LOGD_DEVICE, "assume: assumed connection %s failed to activate: %s",
nm_connection_get_path (NM_CONNECTION (connection)),
error->message);
g_error_free (error);
@@ -1963,7 +1968,7 @@ recheck_assume_connection (NMManager *self,
}
if (generated) {
- _LOG2D (LOGD_DEVICE, device, "connection assumption failed. Deleting generated connection");
+ _LOG2D (LOGD_DEVICE, device, "assume: deleting generated connection after assuming failed");
nm_settings_connection_delete (connection, NULL, NULL);
} else {
if (nm_device_sys_iface_state_get (device) == NM_DEVICE_SYS_IFACE_STATE_ASSUME)