|
Zbigniew Jędrzejewski-Szmek |
d743bb |
From 678199bb6dbc8ee15ccffe6dc9d62b42e5ac6da8 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
From: umuttl <umut@tezduyar.com>
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Date: Mon, 10 Apr 2017 13:12:25 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Subject: [PATCH] core: downgrade legit error logs (#5705)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
manager_sync_bus_names() function retrieves the dbus names
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
and compares it with unit bus names. It could be right
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
after the list is retrieved, the dbus peer is disconnected.
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
In this case it is really not an ERROR print if
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
sd_bus_get_name_creds() or sd_bus_creds_get_unique_name()
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
fail.
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
(cherry picked from commit ddbf0d4b92733a54de50724c756fd48237ad70c9)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
---
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
src/core/dbus.c | 4 ++--
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
diff --git a/src/core/dbus.c b/src/core/dbus.c
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
index 065f2d81d6..cfc045d282 100644
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
--- a/src/core/dbus.c
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+++ b/src/core/dbus.c
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
@@ -753,13 +753,13 @@ int manager_sync_bus_names(Manager *m, sd_bus *bus) {
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
/* If it is, determine its current owner */
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
r = sd_bus_get_name_creds(bus, name, SD_BUS_CREDS_UNIQUE_NAME, &creds);
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
if (r < 0) {
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
- log_error_errno(r, "Failed to get bus name owner %s: %m", name);
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+ log_full_errno(r == -ENXIO ? LOG_DEBUG : LOG_ERR, r, "Failed to get bus name owner %s: %m", name);
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
continue;
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
}
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
r = sd_bus_creds_get_unique_name(creds, &unique);
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
if (r < 0) {
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
- log_error_errno(r, "Failed to get unique name for %s: %m", name);
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+ log_full_errno(r == -ENXIO ? LOG_DEBUG : LOG_ERR, r, "Failed to get unique name for %s: %m", name);
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
continue;
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
}
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|