-
Notifications
You must be signed in to change notification settings - Fork 593
Add some clarity around the state.json file #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
runtime.md
Outdated
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.
Maybe we can say Linux/Unix? Thoughts?
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 Fri, Oct 02, 2015 at 01:40:43PM -0700, Vincent Batts wrote:
+On Linux based systems the metadata MUST be stored in
/run/opencontainer/containers.Maybe we can say Linux/Unix? Thoughts?
“Systems with POSIX paths”? I'm fine leaving this as “Linux” and
opting in other architectures as we add support for them.
Why don't we require a particular path on Windows?
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.
used Linux/Unix.
If someone from MSFT tells me what dir to use I can add 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.
that's where we look forward to the PoC implementations to help define that.
On Fri, Oct 2, 2015 at 4:59 PM, Doug Davis [email protected] wrote:
In runtime.md
#211 (comment):@@ -2,22 +2,26 @@
State
-The runtime state for a container is persisted on disk so that external tools can consume and act on this information.
-The runtime state is stored in a JSON encoded file.
-It is recommended that this file is stored in a temporary filesystem so that it can be removed on a system reboot.
-On Linux based systems the state information should be stored in/run/opencontainer/containers.
-The directory structure for a container is/run/opencontainer/containers/<containerID>/state.json.-By providing a default location that container state is stored external applications can find all containers running on a system.
-*
version(string) Version of the OCI specification used when creating the container.
-*id(string) ID is the container's ID.
-*pid(int) Pid is the ID of the main process within the container.-*
bundlePath(string) BundlePath is the path to the container's bundle directory.+Metadata for containers are stored on disk so that external tools can consume and act on this information.
+It is recommended that this data be stored in a temporary filesystem so that it can be removed on a system reboot.
+On Linux based systems the metadata MUST be stored in/run/opencontainer/containers.used Linux/Unix.
If someone from MSFT tells me what dir to use I can add it.—
Reply to this email directly or view it on GitHub
https://github.com/opencontainers/specs/pull/211/files#r41067051.
runtime.md
Outdated
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.
The README for this project suggests (to me) either “OCS” or “OCIS” or “OCI Specification”. I suggest we pick one abbreviation and have the README say:
The Open Container Initiative Specifications (OCIS) …
or whatever. And then use that short name throughout the spec. Until we do that, I'd probably just leave this as “OCI specification”.
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.
hmmm. OCF had been mentioned, but not much defined.
Perhaps just "OpenContainers spec" or similar for now.
|
I like this PR a lot, but it's going to conflict with #145, and I
think those (minor) changes are useful. I'm fine if you just squash
them into this branch, or if I rebase mine on this, or if you rebase
yours on mine, …. If I can help manage that conflict in any way, let
me know ;).
|
4665ce0 to
6a3e10b
Compare
|
@wking I think I got your edits from the other one |
runtime.md
Outdated
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'd change to “is the ID of the main process” to avoid doubling up on “process”.
|
I agree that we need to tighten up the format of the ID. I was going to leave that for a different PR so that this is more about just cleaning up the text, but if we can agree quickly (w/o much bike shedding) then I'll add it. To get the ball rolling, what about IDs must conform to: |
runtime.md
Outdated
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.
Maybe qualify this with “Linux/Unix” somehow? Something like “For example, a Linux/Unix directory /run/opencontainer/containers/173975398351 corresponds to a container with an ID of 173975398351.”
ee6dc1c to
7d2f0cc
Compare
|
On Fri, Oct 02, 2015 at 02:27:12PM -0700, Doug Davis wrote:
Fair. So far, it's just been silence, so I don't think bikeshedding
I think you want ‘-’ too, so you can use UUIDs (links in my thread). |
While there may be the need for rigidity, I'm not sure that needs to be the case right now. UUID needs to be allowed. But possibly colons too. |
|
Let's save the ID format for another PR. |
|
sounds good On Mon, Oct 5, 2015 at 10:17 AM, Doug Davis [email protected]
|
runtime.md
Outdated
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.
s/in/under ?
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.
changed to "under"
|
LGTM |
Signed-off-by: Doug Davis <[email protected]>
|
LGTM |
Add some clarity around the state.json file
We already require it for Linux/Unix-based systems [1], so we don't have to repeat it here. And other systems will use different paths, which we haven't specified yet. When I asked why we didn't specify a path for Windows [2], Vincent said we were waiting on help from PoC implementations [3]. So this commit punts the location to the "State" section, and lets the "Lifecycle" section just focus on when the write-to-filesystem happens. There's also discussion about removing the filesystem state registry commpletely [4], in which case we'd want to remove the whole line from the lifecycle. [1]: opencontainers@7713efc#diff-b84a8d65d8ed53f4794cd2db7e8ea731L7 [2]: opencontainers#211 (comment) [3]: opencontainers#211 (comment) [4]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/q6TYqVZOcX8 Subject: removal of /run/opencontainer/containers Date: Wed, 25 Nov 2015 14:29:35 +0000 Message-ID: <CAD2oYtNipt3i_C6=J4Bc-jwauo5YAvKXUqTROnPNP3vZ9+C5Vw@mail.gmail.com> Signed-off-by: W. Trevor King <[email protected]>
We already require it for Linux/Unix-based systems [1], so we don't have to repeat it here. And other systems will use different paths, which we haven't specified yet. When I asked why we didn't specify a path for Windows [2], Vincent said we were waiting on help from PoC implementations [3]. So this commit punts the location to the "State" section, and lets the "Lifecycle" section just focus on when the write-to-filesystem happens. There's also discussion about removing the filesystem state registry completely [4], in which case we'd want to remove the whole line from the lifecycle. [1]: opencontainers@7713efc#diff-b84a8d65d8ed53f4794cd2db7e8ea731L7 [2]: opencontainers#211 (comment) [3]: opencontainers#211 (comment) [4]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/q6TYqVZOcX8 Subject: removal of /run/opencontainer/containers Date: Wed, 25 Nov 2015 14:29:35 +0000 Message-ID: <CAD2oYtNipt3i_C6=J4Bc-jwauo5YAvKXUqTROnPNP3vZ9+C5Vw@mail.gmail.com> Signed-off-by: W. Trevor King <[email protected]>
We already require it for Linux/Unix-based systems [1], so we don't have to repeat it here. And other systems will use different paths, which we haven't specified yet. When I asked why we didn't specify a path for Windows [2], Vincent said we were waiting on help from PoC implementations [3]. So this commit punts the location to the "State" section, and lets the "Lifecycle" section just focus on when the write-to-filesystem happens. There's also discussion about removing the filesystem state registry completely [4], in which case we'd want to remove the whole line from the lifecycle. [1]: opencontainers@7713efc#diff-b84a8d65d8ed53f4794cd2db7e8ea731L7 [2]: opencontainers#211 (comment) [3]: opencontainers#211 (comment) [4]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/q6TYqVZOcX8 Subject: removal of /run/opencontainer/containers Date: Wed, 25 Nov 2015 14:29:35 +0000 Message-ID: <CAD2oYtNipt3i_C6=J4Bc-jwauo5YAvKXUqTROnPNP3vZ9+C5Vw@mail.gmail.com> Signed-off-by: W. Trevor King <[email protected]>
Signed-off-by: Doug Davis [email protected]