-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
no logs in the journal when running with rkt #5779
Comments
Seems related to #5449. |
@gyuho maybe, but i see no logs on stdout and no logs in the journal... etcd version is 2.3.6 |
You should be able to get logs from journald... Can you give us a way to reproduce? Like how you run etcd with rkt? I will take a look. |
systemd file https://gist.github.com/f0/79460de6b451db57287bc4eb7ed9956a rkt version
|
also testet with the latest rkt version (1.9.1) no change |
@f0 Think with newer rkt, I see the same problem. # RKT_VERSION=1.9.1
sudo ./rkt trust --prefix coreos.com/etcd
sudo ./rkt --debug run --volume data-dir,kind=host,source=/tmp --mds-register=false coreos.com/etcd:v3.0.0-beta.0
sudo ./rkt trust --prefix coreos.com/etcd
sudo ./rkt --debug run --stage1-name=coreos.com/rkt/stage1-coreos:1.3.0 coreos.com/etcd:v3.0.0-beta.0
<<COMMENT
image: using image from local store for image name coreos.com/rkt/stage1-coreos:1.3.0
image: using image from local store for image name coreos.com/etcd:v3.0.0-beta.0
stage0: Preparing stage1
stage0: Writing image manifest
stage0: Loading image sha512-2bdba926abef05d7397e4977a9acb33ddddd9b60d9a168186763ac1b12e5293b
stage0: Writing image manifest
stage0: Writing pod manifest
run: group "rkt" not found, will use default gid when rendering images
stage0: Setting up stage1
stage0: Wrote filesystem to /var/lib/rkt/pods/run/8f1296c4-38ac-46f8-a0ed-7abc0230b752
stage0: Pivoting to filesystem /var/lib/rkt/pods/run/8f1296c4-38ac-46f8-a0ed-7abc0230b752
stage0: Execing /init
networking: loading networks from /etc/rkt/net.d
networking: loading network default with type ptp
stage1: warning: error setting journal ACLs, you'll need root to read the pod journal
└─group "rkt" not found
stage1: warning: no volume specified for mount point "data-dir", implicitly creating an "empty" volume. This volume will be removed when the pod is garbage-collected.
stage1: creating an empty volume folder for sharing: "sharedVolumes/etcd-data-dir"
Spawning container rkt-8f1296c4-38ac-46f8-a0ed-7abc0230b752 on /var/lib/rkt/pods/run/8f1296c4-38ac-46f8-a0ed-7abc0230b752/stage1/rootfs.
Press ^] three times within 1s to kill container.
Failed to create directory /var/lib/rkt/pods/run/8f1296c4-38ac-46f8-a0ed-7abc0230b752/stage1/rootfs/sys/fs/selinux: Read-only file system
Failed to create directory /var/lib/rkt/pods/run/8f1296c4-38ac-46f8-a0ed-7abc0230b752/stage1/rootfs/sys/fs/selinux: Read-only file system
/etc/localtime is not a symlink, not updating container timezone.
systemd 225 running in system mode. (-PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT -GNUTLS -ACL +XZ -LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
Detected virtualization systemd-nspawn.
Detected architecture x86-64.
Welcome to Linux!
Set hostname to <rkt-8f1296c4-38ac-46f8-a0ed-7abc0230b752>.
Initializing machine ID from container UUID.
Failed to install release agent, ignoring: File exists
[ OK ] Created slice -.slice.
[ OK ] Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket.
[ OK ] Created slice system.slice.
[ OK ] Created slice system-prepare\x2dapp.slice.
[ OK ] Started Pod shutdown.
[ OK ] Started etcd Reaper.
Starting Journal Service...
[ OK ] Started Journal Service.
Starting Prepare minimum e...chrooted applications...
[ OK ] Started Prepare minimum en...r chrooted applications.
[ OK ] Started Application=etcd Image=coreos.com/etcd.
[ OK ] Reached target rkt apps target.
COMMENT
Could anybody in Thanks! |
any news here? |
what's the systemd version? |
|
I think this may be a request for #5449. I just tried and can confirm that etcd is directly shipping its logs to journald. @f0: you should be able to see them with |
@lucab hm i assumed i can see the logs for my systemd unit..... why does etcd log directly to the journal and not to stdout. |
How do you run those multiple containers? rkt already supports custom annotation (that's what kubernetes uses to distinguish pods) but in this case you would need something that systemd-* understand too. I think the cleanest way is to use a service template in conjunction with |
@lucab i run them with system units |
@lucab hm i do not see how this helps? if i write the uuid into a file, i have the same problem with journalctl .... |
@f0 sorry if I was unclear. This is an updated version of your etcd service unit. Once installed you can use the following to access journals from different services/pods:
|
@lucab thank you for the further explanation. Yor first explanation was clear, i understand the workaround. But i do not understand the reason for this... If you run etcd (without any container) on the commandline, you see logs on stdout If you run things with systemd the expectation is you can use journalctl -u $unit and see all logs So the main question is, why does etcd does this in a different way? regards f0 |
@f0 it's basically a capnslog problem - #5449 (comment) |
Hi,
if i run etcd with rkt (the official provided aci) and systemd, i do not see the etcd logs.
Is there a way to get the logs into the journal?
regards f0
The text was updated successfully, but these errors were encountered: