Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

'kube-spawn start' does not work as a systemd service #212

Open
alban opened this issue Nov 16, 2017 · 0 comments
Open

'kube-spawn start' does not work as a systemd service #212

alban opened this issue Nov 16, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@alban
Copy link
Member

alban commented Nov 16, 2017

To start the nodes, kube-spawn start executes systemd-nspawn directly without systemd-run. So the systemd-nspawn processes stay in the same cgroup. When I run systemd-run kube-spawn start the cgroup could be for example /system.slice/run-r6c31c44087e7466ba0a5174e650f4777.service.

As soon as the command kube-spawn start finishes, systemd detects that the main pid of the service terminated so it kills all other processes of the cgroup, like systemd-nspawn. In effect, it kills the nodes.

Instead, pkg/cnispawn/spawn.go:Spawn() should start systemd-nspawn via systemd-run, so that the lifecycle of the nodes are not linked to the lifecycle of the kube-spawn start command.

This should work both when kube-spawn start is executed from the session in a terminal and as a systemd service.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants