Skip to content

Conversation

@wking
Copy link

@wking wking commented Feb 22, 2018

Instead of using CRI-O-specific arguments or environment variables, use the state's REQUIRED status property to ensure we're being called on a created container (and not a running container or a stopped container).

I've shifted the order in the “Register machine” log entry as well, because the container ID seems more important than the stage/status.

I've also shifted the “unsupported status” warning outside of the switch; it had been inside the poststop branch since it landed in 3e9549a. Go switches do not require braces around the per-case blocks, but that may have been the source of the misplacement.

This is ground-work for dropping the stage environment variable from CRI-O (cri-o/cri-o#1360).

Instead of using CRI-O-specific arguments or environment variables,
use the state's REQUIRED 'status' property [1] to ensure we're being
called on a created container (and not a running container or a
stopped container).

I've shifted the order in the "Register machine" log entry as well,
because the container ID seems more important than the stage/status.

I've also shifted the "unsupported status" warning outside of the
switch; it had been inside the poststop branch since it landed in
3e9549a (Make work with latest hooks patch, 2015-10-29, projectatomic#2).  Go
switches do not require braces around the per-case blocks [2], but
that may have been the source of the misplacement.

[1]: https://github.com/opencontainers/runtime-spec/blame/v1.0.1/runtime.md#L16
[2]: https://golang.org/ref/spec#Switch_statements
@rhatdan
Copy link
Member

rhatdan commented Feb 24, 2018

Big question whether this works properly with docker-runc used for docker-1.12 and docker-1.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants