Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If created succeed, we don't need to print. But if failed, we should judge to stop or continue depend on which kind of error.
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.
when exitcode of command "${RUNTIME} create ${conID}" is 1, runtime has no command "create" continue to run command "start". If exitcode of command "${RUNTIME} create ${conID}" is -1, runtime create container fail and print error. but I don't know how to get exitcode of command "${RUNTIME} create ${conID}".
Uh oh!
There was an error while loading. Please reload this page.
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.
when executed "${RUNTIME} create ${conID}", you can use
$?to get the exit code.just as
sleep 1
echo $?
0
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.
but if runtime has no command "create", execute "${RUNTIME} create ${conID}" will cause a crash.https://github.com/opencontainers/runtime-tools/blob/master/test_runtime.sh#L2
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.
If necessary, I think we can remove it.
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 think it is unwise to remove it.
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.
In my opinion, just now it's not necessary to remove. You can just error out if failed and continue when created succeed.
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.
On Sat, Oct 08, 2016 at 07:05:08PM -0700, heartlock wrote:
Then it's not compliant with opencontainers/runtime-spec#513 or the current
createrequirements. You can use:with a
diecommand that prints the message to stderr and exits 1.But the real problem with converting
test_runtime.shto the spec's current create/start API is that thestartexit code is not the container process's exit code. You have to do subreaper magic or similar to see howruntimetestexited.