Skip to content

The /var/run -> /run symlink is missing in the base OS container image #410

@ggiguash

Description

@ggiguash

The /var/run and /run paths are often used interchangeably. If /var/run symlink does not exist when an OS is booted, a new directory is created instead and we end up in a situation when /var/run and /run are not in sync.

The workaround to this issue is very simple. The following needs to be added to a Containerfile:

RUN ln -s /run /var/

However, different contents in /var/run and /run may lead to problems that are not easy to predict or troubleshoot. Therefore, I'd like to suggest adding /var/run -> /run symlink to the OS container base image.

An example: DBus and NetworkManager Services Cannot Communicate

DBus service creates its socket in /run/dbus directory, but NetworkManager tries to access this socket using /var/run/dbus location. This leads to failure of NetworkManager service with cryptic messages.

Error: Could not create NMClient object: Could not connect: No such file or directory.

The error hints about DBus problems, but the DBus service is up and running. One of the ways to troubleshoot this issue is to trace nmcli command system calls to understand how it tries to communicate with the DBus service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions