Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce messages related to systemd in the logs #3246

Closed
nixpanic opened this issue Jul 18, 2022 · 1 comment · Fixed by #3281
Closed

Reduce messages related to systemd in the logs #3246

nixpanic opened this issue Jul 18, 2022 · 1 comment · Fixed by #3281
Assignees
Labels
component/rbd Issues related to RBD dependency/k8s depends on Kubernetes features

Comments

@nixpanic
Copy link
Member

Describe the feature you'd like to have

kubernetes/kubernetes#111083 already reduced the systemd related logging a lot. CephFS does not have any systemd logging at all anymore.\

RBD calls the k8s.io/mount-utils function FormatAndMount(), which still causes some systemd log messages. With the enhancement in kubernetes/kubernetes#111218, a NewWithoutSystemd() function has been proposed, and Ceph-CSI could benefit from that.

What is the value to the end user? (why is it a priority?)

No more confusing systemd log messages, see #2890 for an example of a user that reports an issue about it.

How will we know we have a good solution? (acceptance criteria)

No more systemd log messages. Ceph-CSI does not want to use systemd in any case.

Additional context

Example of the changes that are required once kubernetes/kubernetes#111218 has been merged+released:

diff --git a/internal/rbd/driver/driver.go b/internal/rbd/driver/driver.go
index 5019d02cc..2fed92be0 100644
--- a/internal/rbd/driver/driver.go
+++ b/internal/rbd/driver/driver.go
@@ -73,7 +73,7 @@ func NewReplicationServer(c *rbd.ControllerServer) *rbd.ReplicationServer {
 
 // NewNodeServer initialize a node server for rbd CSI driver.
 func NewNodeServer(d *csicommon.CSIDriver, t string, topology map[string]string) (*rbd.NodeServer, error) {
-       mounter := mount.New("")
+       mounter := mount.NewWithoutSystemd("")
 
        return &rbd.NodeServer{
                DefaultNodeServer: csicommon.NewDefaultNodeServer(d, t, topology),
diff --git a/internal/util/util.go b/internal/util/util.go
index 4c36e3679..3207fa148 100644
--- a/internal/util/util.go
+++ b/internal/util/util.go
@@ -321,7 +321,7 @@ func checkDirExists(p string) bool {
 
 // IsMountPoint checks if the given path is mountpoint or not.
 func IsMountPoint(p string) (bool, error) {
-       dummyMount := mount.New("")
+       dummyMount := mount.NewWithoutSystemd("")
        notMnt, err := dummyMount.IsLikelyNotMountPoint(p)
        if err != nil {
                return false, err
@@ -344,7 +344,7 @@ func ReadMountInfoForProc(proc string) ([]mount.MountInfo, error) {
 
 // Mount mounts the source to target path.
 func Mount(source, target, fstype string, options []string) error {
-       dummyMount := mount.New("")
+       dummyMount := mount.NewWithoutSystemd("")
 
        return dummyMount.MountSensitiveWithoutSystemd(source, target, fstype, options, nil)
 }
@nixpanic nixpanic added component/rbd Issues related to RBD dependency/k8s depends on Kubernetes features labels Jul 18, 2022
@nixpanic nixpanic self-assigned this Aug 1, 2022
@nixpanic
Copy link
Member Author

nixpanic commented Aug 1, 2022

The k8s.io/mount-utils PR has been merged, the change wiill be included in Kubernetes 1.25 (1st pre-release scheduled for tomorrow).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/rbd Issues related to RBD dependency/k8s depends on Kubernetes features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant