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

Volume mount for /run/log/journal fails if persistent /var/log/journal is setup #15

Open
SpComb opened this issue May 25, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@SpComb
Copy link
Contributor

SpComb commented May 25, 2018

The transient /run/log/journal directory will not exist if the persistent /var/log/journal directory has been setup, and this causes the volume mounts for the pod to fail. I don't know if it's possible to mount both journal paths for the daemonset without interfering with the systemd-journald operation by creating the /var/log/journal directory as a side-effect. This makes pod/container access to the host journal problematic, given the lack of a dbus API for journald... This might make the use of systemd for execs a bad idea, since it relies on journal access for the output logging functionality.

  Warning  FailedMount            3m (x8 over 18m)    kubelet, ubuntu-xenial  Unable to mount volumes for pod "host-upgrades-8pgtq_kube-system(ade33b5f-600b-11e8-a164-02a3be24b14f)": timeout expired waiting for volumes to attach or mount for pod "kube-system"/"host-upgrades-8pgtq". list of unmounted volumes=[journal]. list of unattached volumes=[config host dbus journal host-upgrades-token-9bn6d]
  Warning  FailedMount            26s (x18 over 20m)  kubelet, ubuntu-xenial  MountVolume.SetUp failed for volume "journal" : hostPath type check failed: /run/log/journal is not a directory
$ ls -ld /var/log/journal/ /run/log/journal
ls: cannot access '/run/log/journal': No such file or directory
drwxr-sr-x+ 3 root systemd-journal 4096 May 25 11:10 /var/log/journal/
@SpComb SpComb added the bug Something isn't working label May 25, 2018
@SpComb
Copy link
Contributor Author

SpComb commented May 29, 2018

Somewhat mitigated by the /*/log/journal being optional... if neither is mounted to the container, then the systemd execs will simply not read anything from the journal.

I suppose we could just omit the journal mounts from the daemonset, but it would mean that you need to manually journalctl -u host-upgrades on the host to debug exec errors...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant