Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

(WIP) stage1: app exit code propagated to rkt exit code #1783

Closed
wants to merge 1 commit into from

Conversation

alban
Copy link
Member

@alban alban commented Nov 23, 2015

This only works with systemd-v228 in stage1 because it uses the new
command "systemctl exit". You can try with:

sh autogen.sh && ./configure \
  --with-stage1-flavors=src \
  --enable-functional-tests \
  --with-stage1-systemd-version=v228 \
  && make

I disabled machine registration because of issue #1782.

Fixes #1460

@vcaputo
Copy link
Contributor

vcaputo commented Nov 24, 2015

neat

Though I figured we wouldn't go down this route since it will be ambiguous which app's return value propagated out, it makes sense when you have a single app running within the pod, but the multi-app pod is awkward.

@alban
Copy link
Member Author

alban commented Nov 24, 2015

Though I figured we wouldn't go down this route since it will be ambiguous which app's return value propagated out, it makes sense when you have a single app running within the pod, but the multi-app pod is awkward.

This might change later when ExitPolicy={untilAll,onAny,onAnyFailure} gets implemented (see appc/spec#500) but at the moment, rkt implements the semantics of ExitPolicy=onAnyFailure via the systemd unit files in stage1.

So there can be only one app failing because the pod stops when any app exits with a failure. The return value returned is just the one from the failing app. If the user want to know which app it is, they have to use rkt status.

If an app terminates successfully (return value 0), reaper.sh does not call systemctl exit so the return value of the pod is not changed. I think this is good enough because in most case we just want to know if the pod succeed (return value == 0) or failed (return value != 0).

This only works with systemd-v228 in stage1 because it uses the new
command "systemctl exit". You can try with:

sh autogen.sh && ./configure \
  --with-stage1-flavors=src \
  --enable-functional-tests \
  --with-stage1-systemd-version=v228 \
  && make

I disabled machine registration because of issue rkt#1782.
@alban alban added this to the v1.0.0 milestone Jan 18, 2016
@iaguis
Copy link
Member

iaguis commented Jan 26, 2016

Waiting for a systemd v229 release.

@iaguis iaguis modified the milestones: v1+, v1.0.0 Jan 26, 2016
@jonboulle jonboulle modified the milestones: v1.2.0, v1+ Jan 31, 2016
@iaguis iaguis closed this in #2198 Feb 23, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants