summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-02-07 21:35:44 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2020-02-11 09:17:11 +0100
commite94d76382c1fef2b4c1e012fdf9f5c55de5f0e91 (patch)
treeea6fd52b76e1685998971e72583c47267afacb96
parent351644d7da2b8195c3576f8d1388d129462fc580 (diff)
team: ignore bus name appearance if we can't determine process id
If the GetConnectionUnixProcessID() call fails, the process that registered on the bus has died and we should ignore the name appearance event.
-rw-r--r--src/devices/team/nm-device-team.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c
index fb9c9c6963..a76a877589 100644
--- a/src/devices/team/nm-device-team.c
+++ b/src/devices/team/nm-device-team.c
@@ -380,11 +380,14 @@ teamd_dbus_appeared (GDBusConnection *connection,
if (pid != priv->teamd_pid)
teamd_cleanup (self, FALSE);
} else {
- _LOGW (LOGD_TEAM, "failed to determine D-Bus name owner");
- /* If we can't determine the bus name owner, don't kill our
- * teamd instance. Hopefully another existing teamd just died and
- * our instance will be able to grab the bus name.
- */
+ /* The process that registered on the bus died. If it's
+ * the teamd instance we just started, ignore the event
+ * as we already detect the failure through the process
+ * watch. If it's a previous instance that got killed,
+ * also ignore that as our new instance will register
+ * again. */
+ _LOGD (LOGD_TEAM, "failed to determine D-Bus name owner, ignoring");
+ return;
}
}