-
Notifications
You must be signed in to change notification settings - Fork 883
Conversation
The stop entrypoint initiates an orderly shutdown of stage1. | ||
|
||
In the bundled rkt stage 1, the entrypoint is a statically-linked C program that sends a SIGTERM to the systemd-nspawn process, which will deal with shutting down the container. | ||
|
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.
Can you say what should stage0 do if the entrypoint is not there in the stage1 manifest? I guess it should just print the error "not implemented" or something.
See #1897.
The manifest below needs to be updated.
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.
Can you say what should stage0 do if the entrypoint is not there in the stage1 manifest? I guess it should just print the error "not implemented" or something.
Does it belong here? This is the stage1 implementors guide...
The manifest below needs to be updated.
done
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 guess we could rather say something like "The optional stop entrypoint initiates blah blah blah".
This needs some more work. |
@@ -95,6 +95,12 @@ For example, it removes the network namespace of a pod. | |||
* `--debug` to activate debugging | |||
* UUID of the pod | |||
|
|||
### `rkt stop` => "coreos.com/rkt/stage1/stop" |
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.
It needs documentation in https://github.com/coreos/rkt/tree/master/Documentation/subcommands too.
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.
done
74a4de5
to
04429f1
Compare
const lkvmBinPath string = "stage1/rootfs/lkvm" | ||
|
||
func stop() int { | ||
pwd, err := os.Getwd() |
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.
Drive by comment: this seems a bit fragile. Maybe we should add a uuid arg to the entrypoint..?
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.
Yep, done.
04429f1
to
bc16237
Compare
Updated and added a |
@@ -0,0 +1,3 @@ | |||
# rkt stop | |||
|
|||
Given a list of pod UUIDs, rkt stop will shut them down cleanly. |
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 can add copy/paste of the command output, to see how it looks like.
With and without --force
.
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.
It should be explained what "shut them down cleanly" means, and compare with --force
.
The app in the pod receives a TERM signal and after a timeout a KILL signal.
Is the post-stop event handler executed?
Please update CHANGELOG.md too. |
bc16237
to
4b18dd7
Compare
@jellonek do you think you'll have time to look into this? |
I can look on this tomorrow. How I can contribute to this? Should I fork kinvolk:iaguis/rkt-stop, propose some commit in place of this one for kvm, and point You there to my branch? This should work... |
That sounds good, let me rebase this branch, it's kinda old... |
The stage1 implementation sends SIGTERM to systemd-nspawn, which causes an orderly shutdown of stage1. Update the stage1 API version.
The stage1 implementation calls "lkvm stop" which will shut down the VM instance. Update the stage1 API version.
The stage1 implementation sends SIGTERM to the process started by rkt fly. Update the stage1 API version.
Makes getting the lkvm VM name less ugly. Add --force to forcibly stopping a pod.
Rebased. |
closing in favour of #2438 |
This PR introduces a new
stop
entrypoint that deals with shutting down the pod.Fixes partially #1417
Closes #1496