]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
namespace: add // FIXME comments on some suplicate logging 29562/head
authorLennart Poettering <lennart@poettering.net>
Mon, 16 Oct 2023 11:16:55 +0000 (13:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 16 Oct 2023 11:35:36 +0000 (13:35 +0200)
@bluca thinks duplicate logging as a feature, hence simply mark these
log messages as // FIXME, but don't bother.

src/core/namespace.c

index 7d14a9314465d1c235bb812a95a6b0d0d8481737..273eb962b5358973e13d136de84ea34e32a111ba 100644 (file)
@@ -1361,7 +1361,7 @@ static int mount_image(
         if (r == -ENOENT && m->ignore)
                 return 0;
         if (r == -ESTALE && host_os_release_id)
-                return log_error_errno(r,
+                return log_error_errno(r, // FIXME: this should not be logged ad LOG_ERR, as it will result in duplicate logging.
                                        "Failed to mount image %s, extension-release metadata does not match the lower layer's: ID=%s%s%s%s%s%s%s",
                                        mount_entry_source(m),
                                        host_os_release_id,
@@ -1637,7 +1637,7 @@ static int apply_one_mount(
 
                         q = make_mount_point_inode_from_path(what, mount_entry_path(m), 0755);
                         if (q < 0) {
-                                if (q != -EEXIST)
+                                if (q != -EEXIST) // FIXME: this shouldn't be logged at LOG_WARNING, but be bubbled up, and logged there to avoid duplicate logging
                                         log_warning_errno(q, "Failed to create destination mount point node '%s', ignoring: %m",
                                                           mount_entry_path(m));
                         } else
@@ -1647,7 +1647,7 @@ static int apply_one_mount(
                 if (try_again)
                         r = mount_nofollow_verbose(LOG_DEBUG, what, mount_entry_path(m), NULL, MS_BIND|(rbind ? MS_REC : 0), NULL);
                 if (r < 0)
-                        return log_error_errno(r, "Failed to mount %s to %s: %m", what, mount_entry_path(m));
+                        return log_error_errno(r, "Failed to mount %s to %s: %m", what, mount_entry_path(m)); // FIXME: this should not be logged here, but be bubbled up, to avoid duplicate logging
         }
 
         log_debug("Successfully mounted %s to %s", what, mount_entry_path(m));