Description of problem:
Attempt to run systemd-tmpfiles --create in containers started under docker-1.1.2-9.el7.x86_64 complains about
[/usr/lib/tmpfiles.d/systemd.conf:26] Failed to replace specifiers: /var/log/journal/%m
[/usr/lib/tmpfiles.d/systemd.conf:28] Failed to replace specifiers: /run/log/journal/%m
Looking around documentation and code, the %m is supposed to get the id from /etc/machine-id, and that is supposed to be 32 bytes + newline, and systemd-tmpfiles checks that it is not longer.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. # docker run -ti rhel7 wc /etc/machine-id
2. # docker run -ti fedora:20 wc /etc/machine-id
1 1 65 /etc/machine-id
1 1 33 /etc/machine-id
systemd guys, is there any reason for this hard limit. We want to set the /etc/machine-id to match the UUID of the docker container. Docker sets it UUID to 64
systemd refuse to fix this, claim that this is a docker problem. UUID should be 32 chars.
I don't see either side fixing this,
Can't DOcker just put part of its UUID there?
The current patch working its way upstream is to set the container_uuid environment variable with the truncated UUID before starting systemd within the container. According to documentation systemd is supposed to create /etc/machine-id if it does not exist and this environment variable is set. I believe we have another bug report where systemd did not do this, but not sure what the problem is.
If you play with docker-1.2 in collider right now the container_uuid environment variable should be set.