Discussion:
A CentOS 7 systemd container in Fedora 27 beta no longer goes beyond /sbin/init, but works on Fedora 26
Add Reply
Richard Chan
2017-10-05 12:23:57 UTC
Reply
Permalink
Raw Message
Any suggestions on how to instrument systemd inside a CentOS 7 container (running under docker 1.13 Fedora 27 beta) to determine why it doesn't launch logind journald dbus-daemon and other units?


What is the main reason that systemd-journald would fail to launch?


The container was created under Fedora 26 and configured to just launch sshd:


FROM centos:7
ENV container docker
STOPSIGNAL SIGRTMIN+3
CMD [ "/sbin/init" ]
RUN yum -y install systemd openssh-server procps-ng; systemctl enable sshd
RUN echo 'root:passwordxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | chpasswd

(I amrelying on all the oci hooks to mount cgroups etc with the correct permissions and labels).

Under Fedora 26, docker exec container ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 11:51 ? 00:00:00 /sbin/init
root 17 1 0 11:51 ? 00:00:00 /usr/lib/systemd/systemd-journald
root 25 1 0 11:51 ? 00:00:00 /usr/lib/systemd/systemd-logind
dbus 26 1 0 11:51 ? 00:00:00 /bin/dbus-daemon --system --address=sys
root 27 1 0 11:51 ? 00:00:00 /usr/sbin/sshd -D

Under Fedora 27 beta:
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 11:51 ? 00:00:00 /sbin/init

We can't seem to startup journald and friends. /var/lib/docker/ is unchanged from Fedora 26.
When I boot back into Fedora 26 and launch the container all the units after /sbin/init work.

Richard
Zbigniew Jędrzejewski-Szmek
2017-10-07 08:08:39 UTC
Reply
Permalink
Raw Message
Post by Richard Chan
Any suggestions on how to instrument systemd inside a CentOS 7 container (running under docker 1.13 Fedora 27 beta) to determine why it doesn't launch logind journald dbus-daemon and other units?
What is the main reason that systemd-journald would fail to launch?
FROM centos:7
ENV container docker
STOPSIGNAL SIGRTMIN+3
CMD [ "/sbin/init" ]
RUN yum -y install systemd openssh-server procps-ng; systemctl enable sshd
RUN echo 'root:passwordxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | chpasswd
(I amrelying on all the oci hooks to mount cgroups etc with the correct permissions and labels).
Under Fedora 26, docker exec container ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 11:51 ? 00:00:00 /sbin/init
root 17 1 0 11:51 ? 00:00:00 /usr/lib/systemd/systemd-journald
root 25 1 0 11:51 ? 00:00:00 /usr/lib/systemd/systemd-logind
dbus 26 1 0 11:51 ? 00:00:00 /bin/dbus-daemon --system --address=sys
root 27 1 0 11:51 ? 00:00:00 /usr/sbin/sshd -D
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 11:51 ? 00:00:00 /sbin/init
We can't seem to startup journald and friends. /var/lib/docker/ is unchanged from Fedora 26.
When I boot back into Fedora 26 and launch the container all the units after /sbin/init work.
You probably need to look at the logs produced by systemd. This should
show why systemd cannot launch processes.

I'm afraid there aren't that many docker experts on this list, and
this is a question about docker / systemd compatibility.

Zbyszek
Daniel Walsh
2017-10-07 14:50:13 UTC
Reply
Permalink
Raw Message
Post by Zbigniew Jędrzejewski-Szmek
Post by Richard Chan
Any suggestions on how to instrument systemd inside a CentOS 7 container (running under docker 1.13 Fedora 27 beta) to determine why it doesn't launch logind journald dbus-daemon and other units?
What is the main reason that systemd-journald would fail to launch?
FROM centos:7
ENV container docker
STOPSIGNAL SIGRTMIN+3
CMD [ "/sbin/init" ]
RUN yum -y install systemd openssh-server procps-ng; systemctl enable sshd
RUN echo 'root:passwordxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | chpasswd
(I amrelying on all the oci hooks to mount cgroups etc with the correct permissions and labels).
Under Fedora 26, docker exec container ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 11:51 ? 00:00:00 /sbin/init
root 17 1 0 11:51 ? 00:00:00 /usr/lib/systemd/systemd-journald
root 25 1 0 11:51 ? 00:00:00 /usr/lib/systemd/systemd-logind
dbus 26 1 0 11:51 ? 00:00:00 /bin/dbus-daemon --system --address=sys
root 27 1 0 11:51 ? 00:00:00 /usr/sbin/sshd -D
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 11:51 ? 00:00:00 /sbin/init
We can't seem to startup journald and friends. /var/lib/docker/ is unchanged from Fedora 26.
When I boot back into Fedora 26 and launch the container all the units after /sbin/init work.
You probably need to look at the logs produced by systemd. This should
show why systemd cannot launch processes.
I'm afraid there aren't that many docker experts on this list, and
this is a question about docker / systemd compatibility.
Zbyszek
_______________________________________________
systemd-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
We have an open bugzilla on this. I think this is a change in the way
cgroups are setup that is causing the issue.

Hopefully we can look at this next week.

Loading...