-
Notifications
You must be signed in to change notification settings - Fork 84
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
Fix #323, fix issue of broken systemd (/dev/console) in docker container #342
Fix #323, fix issue of broken systemd (/dev/console) in docker container #342
Conversation
The commit seems to have unrelated changes in it. Please split into atomic changes |
6d85804
to
de3e9f0
Compare
@petrosagg updated! |
@nghiant2710 I don't understand why systemd 230 needs all those changes. You need to be more descriptive in your commits |
@petrosagg current systemd template will install systemd from jessie-backports as a workaround for /dev/console issue of systemd and docker which happens on systemd v230 and higher. So we will need to update the template (no longer install systemd from jessie-backports, don't mount /sys/fs/cgroup in the container) to support systemd v230 before applying the workaround for /dev/console. That's what the PR does. |
4336e22
to
b4e2844
Compare
fedora/Dockerfile.armv7hf.tpl
Outdated
|
||
COPY entry.sh /usr/bin/ | ||
# We only want few core services run in the container. | ||
RUN find /etc/systemd/system \ |
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.
We should use systemctl enable/disable/mask
instead of deleting the files
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.
@petrosagg, if we don't delete those files, the logs will be very ugly and can make user confused. For example:
18.10.17 02:45:35 (+0700) Systemd init system enabled.
18.10.17 02:45:35 (+0700) systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
18.10.17 02:45:35 (+0700) Detected virtualization docker.
18.10.17 02:45:35 (+0700) Detected architecture arm.
18.10.17 02:45:35 (+0700) Set hostname to <4457d5d>.
18.10.17 02:45:35 (+0700) Failed to install release agent, ignoring: No such file or directory
18.10.17 02:45:35 (+0700) systemd-remount-fs.service: Cannot add dependency job, ignoring: Unit systemd-remount-fs.service is masked.
18.10.17 02:45:35 (+0700) sys-kernel-config.mount: Cannot add dependency job, ignoring: Unit sys-kernel-config.mount is masked.
18.10.17 02:45:35 (+0700) dev-hugepages.mount: Cannot add dependency job, ignoring: Unit dev-hugepages.mount ismasked.
18.10.17 02:45:35 (+0700) systemd-modules-load.service: Cannot add dependency job, ignoring: Unit systemd-modules-load.service is masked.
18.10.17 02:45:35 (+0700) sys-fs-fuse-connections.mount: Cannot add dependency job, ignoring: Unit sys-fs-fuse-connections.mount is masked.
18.10.17 02:45:35 (+0700) kmod-static-nodes.service: Cannot add dependency job, ignoring: Unit kmod-static-nodes.service is masked.
18.10.17 02:45:35 (+0700) getty.target: Cannot add dependency job, ignoring: Unit getty.target is masked.
18.10.17 02:45:35 (+0700) systemd-logind.service: Cannot add dependency job, ignoring: Unit systemd-logind.service is masked.
18.10.17 02:45:35 (+0700) display-manager.service: Cannot add dependency job, ignoring: Unit display-manager.service is masked.
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.
@nghiant2710 why don't you disable instead of masking then?
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.
@petrosagg there're some static services which can't be disabled and they will output errors when systemd starts.
I've updated this, we should keep masking services as we do now since the above errors seems to be systemd issue (I see the same issue here systemd/systemd#5358). We can explain to users if they ask about these messages.
fedora/Dockerfile.armv7hf.tpl
Outdated
COPY launch.service /etc/systemd/system/launch.service | ||
|
||
RUN systemctl enable launch.service systemd-udevd | ||
RUN systemctl enable /etc/systemd/system/launch.service |
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.
You don't need the full path of the service here
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.
updated
|
||
if [ $suite == '24' ]; then | ||
cgroup='VOLUME ["/sys/fs/cgroup"]' | ||
cgroupEntry='mount -t tmpfs -o mode=0755 cgroup /sys/fs/cgroup' |
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.
Why is the cgroup not needed in the other case?
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.
We don't need to mount cgroup in some systemd latest versions, it relates to this issue systemd/systemd#6477.
currently have an /dev/console issue with docker.
…ole to keep it opening
53f3602
to
8fa460a
Compare
connects to #323. We will create a process that always points to /dev/console to keep it opening.