-
Notifications
You must be signed in to change notification settings - Fork 19
Set SYSTEMD_IGNORE_CHROOT=yes #18
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you include how it was tested and/or if the linked issue was reproduced and solved?
@superseb I couldn't reproduce the issue but after going through the comments on the issue it's certain that So I built hyperkube-base using this env and updated hyperkube and KDM, then provisioned an RKE1 cluster, ssh-ed into the node and exec into kubectl container, ran a systemctl command, it's running successfully and not giving the chroot error. So now the script in |
Dockerfile
Outdated
FROM ubuntu:22.04 | ||
|
||
ARG ARCH=amd64 | ||
ENV SYSTEMD_IGNORE_CHROOT=yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the systemd docs, the proper value to use is 1
, can you change it to 1 and also validate it works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
8afcb7c
to
f9f3b53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @rayandas. Can you confirm if the fix works after changing the value to 1
?
I will approve the PR once I hear your confirmation.
Closing on behalf of #20 |
Related issue: rancher/rancher#41601
As systemd installed in the latest hyperkube-base, when the user is trying to start a systemd service, it's running within a chroot environment, hence the "start" command is being ignored. Refer to the below error:
This PR adds an env variable SYSTEMD_IGNORE_CHROOT and set it to yes so that it ignores the chroot environment.