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:
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.
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:
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.
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
nmclicommand system calls to understand how it tries to communicate with the DBus service.