]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
report: downgrade message for org.varlink.service.MethodNotFound
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Thu, 5 Mar 2026 11:44:43 +0000 (12:44 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Wed, 1 Apr 2026 13:34:45 +0000 (15:34 +0200)
We now have three kinds of endpoints under /run/systemd/report/:
those that implement facts, those that implement metrics, and those that
implement both. Let's downgrade the message to avoid pointless warnings.

src/report/report.c

index f93b3076c6f8180d026719f3d9b4a8775540212a..be7b89b8214726a43cc736ef64ff8fece282a075 100644 (file)
@@ -226,7 +226,10 @@ static int metrics_on_query_reply(
         Context *context = ASSERT_PTR(li->context);
 
         if (error_id) {
-                if (streq(error_id, SD_VARLINK_ERROR_DISCONNECTED))
+                if (STR_IN_SET(error_id, SD_VARLINK_ERROR_METHOD_NOT_FOUND,
+                                         SD_VARLINK_ERROR_METHOD_NOT_IMPLEMENTED))
+                        log_debug("Ignoring Varlink endpoint '%s': %s", li->name, error_id);
+                else if (streq(error_id, SD_VARLINK_ERROR_DISCONNECTED))
                         log_warning("Varlink connection to '%s' disconnected prematurely, ignoring.", li->name);
                 else if (streq(error_id, SD_VARLINK_ERROR_TIMEOUT))
                         log_warning("Varlink connection to '%s' timed out, ignoring.", li->name);