-
Notifications
You must be signed in to change notification settings - Fork 881
stage1: propagate app exit code to rkt exit code #2198
Changes from all commits
e5d6168
b9c3a67
b6f61a9
beb42d4
e1e1d5b
a65b232
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,5 +7,12 @@ if [ $# -eq 1 ]; then | |
| app=$1 | ||
| status=$(${SYSCTL} show --property ExecMainStatus "${app}.service") | ||
| echo "${status#*=}" > "/rkt/status/$app" | ||
| if [ "${status#*=}" != 0 ] ; then | ||
| # The command "systemctl exit $status" sets the return value that will | ||
| # be used when the pod exits (via shutdown.service). | ||
| # This command is available since systemd v227. On older versions, the | ||
| # command will fail and rkt will just exit with return code 0. | ||
| ${SYSCTL} exit ${status#*=} 2>/dev/null | ||
| fi | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested on the current What about using: I don't think we can nor should parse the output of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please also say in the command that Is it correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep |
||
| exit 0 | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [Unit] | ||
| Description=Exit the container | ||
| DefaultDependencies=no | ||
| AllowIsolate=yes |
This file was deleted.
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 add a comment?