-
Notifications
You must be signed in to change notification settings - Fork 884
stage1/init: link pod's journal in kvm flavor #2934
Conversation
LGTM modulo tests |
Added a functional test. |
Semafailure seems unrelated?!
but Jenkins seems to be related:
|
It seems I broke something, I'll look into it. |
I was actually expecting the debian failure. It doesn't have persistent journaling enabled, so there's no I'll see if nspawn does a link from |
1c0ee15
to
10770b4
Compare
It seems systemd-nspawn doesn't link the logs if persistent journaling is not enabled. I'll skip the test if |
83f19bc
to
ddee40c
Compare
Semaphore fails on master too. It seems #2888 breaks kvm. |
PTAL? |
@@ -254,6 +260,7 @@ func getArgsEnv(p *stage1commontypes.Pod, flavor string, debug bool, n *networki | |||
"noreplace-smp", | |||
"systemd.default_standard_error=journal+console", | |||
"systemd.default_standard_output=journal+console", | |||
"systemd.machine_id=" + machineID, |
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.
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.
I can rebase/merge this after #2684
LGTM |
@iaguis Thanks! |
So the kvm flavor has the right machine ID (taken from the pod UUID).
ddee40c
to
335a924
Compare
Rebased. |
In nspawn flavors, nspawn creates a symlink from /var/log/journal/${machine-id} to the pod's journal directory. In kvm we need to do the link ourselves. Logs can be inspected like this: ``` $ journalctl -m _MACHINE_ID=${MACHINE_ID} ``` where MACHINE_ID is the pod UUID without the dashes.
If we don't pass --debug. We do this on the nspawn flavors.
335a924
to
d16776a
Compare
Semaphore has
and afaict the |
PTAL @coreos/rkt-kvm-maintainers |
So true. This is on my local machine:
|
In nspawn flavors, nspawn creates a symlink from
/var/log/journal/${machine-id}
to the pod's journal directory. In kvm we need to do the link ourselves.
Logs can be inspected like this:
where MACHINE_ID is the pod UUID without the dashes.
Fixes #2798