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

Systemd checks report issue in Ubuntu image #417

Closed
snowch opened this issue Sep 20, 2020 · 5 comments · Fixed by #465
Closed

Systemd checks report issue in Ubuntu image #417

snowch opened this issue Sep 20, 2020 · 5 comments · Fixed by #465
Assignees
Labels
Priority: Blocker Project: Cluster Reconcile beyond simple xlate of model to K8s spec Type: Bug

Comments

@snowch
Copy link
Contributor

snowch commented Sep 20, 2020

The Ubuntu image systemd check returns an error, preventing KD appconfig packages from working.

root@kdss-mdz2r-0:/# systemctl status systemd-journald
System has not been booted with systemd as init system (PID 1)

For more info: #415

@joel-bluedata joel-bluedata self-assigned this Apr 8, 2021
@kmathur2
Copy link
Member

@joel-bluedata are you looking at this already? @Vellanci and I were going to look at this also. Let us know.

@aleshchynskyi aleshchynskyi self-assigned this Apr 15, 2021
@aleshchynskyi
Copy link
Collaborator

According to my findings Systemd doesn't work in containers out of box. One way of fixing it is by adding cgroup mount and making it privileged. Another one way is by adding more tmpfs mounts (for /run, /run/lock) and allowing it to be unprivileged. For kubernetes it can implemented by using emptyDir and localPath mounts. Also Dockerfile should install systemd and couple of env vars. I managed to get it working with simple kubernetes pod. I will continue investigation on how to do it with KD.

@kmathur2
Copy link
Member

Adding @swamibluedata for visibility

@aleshchynskyi
Copy link
Collaborator

I noticed "systemdRequired" that implements the unprivileged way I mentioned before. Apart from mount points created by this feature, for Ubuntu Systemd /run/lock is also required to be mounted. Also current ubuntu image doesn't run systemd as PID 1 (entrypoint) process.

@aleshchynskyi
Copy link
Collaborator

I managed to solve the issue with two changes:

  1. On KD side generate /run/lock tmpfs volume mount (/run, /tmp is already generated at stateful set creation time).
  2. On Ubuntu app side update image to run systemd as entrypoint process.

aleshchynskyi pushed a commit to aleshchynskyi/kubedirector that referenced this issue Apr 24, 2021
kmathur2 added a commit that referenced this issue May 11, 2021
#417 Add /run/lock as default tmpfs mount (required by newer Systemd versions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Blocker Project: Cluster Reconcile beyond simple xlate of model to K8s spec Type: Bug
Projects
None yet
4 participants