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

logging: reduce systemd related errors while mounting #3225

Merged
merged 1 commit into from
Jul 4, 2022

Commits on Jul 4, 2022

  1. util: reduce systemd related errors while mounting

    There are regular reports that identify a non-error as the cause of
    failures. The Kubernetes mount-utils package has detection for systemd
    based environments, and if systemd is unavailable, the following error
    is logged:
    
        Cannot run systemd-run, assuming non-systemd OS
        systemd-run output: System has not been booted with systemd as init
        system (PID 1). Can't operate.
        Failed to create bus connection: Host is down, failed with: exit status 1
    
    Because of the `failed` and `exit status 1` error message, users might
    assume that the mounting failed. This does not need to be the case. The
    container-images that the Ceph-CSI projects provides, do not use
    systemd, so the error will get logged with each mount attempt.
    
    By using the newer MountSensitiveWithoutSystemd() function from the
    mount-utils package where we can, the number of confusing logs get
    reduced.
    
    Signed-off-by: Niels de Vos <ndevos@redhat.com>
    nixpanic authored and mergify[bot] committed Jul 4, 2022
    Configuration menu
    Copy the full SHA
    73c5d8e View commit details
    Browse the repository at this point in the history