Skip to content
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

linux: specify a state pid/filelock for lifecycle #40

Closed
philips opened this issue Jun 30, 2015 · 5 comments
Closed

linux: specify a state pid/filelock for lifecycle #40

philips opened this issue Jun 30, 2015 · 5 comments

Comments

@philips
Copy link
Contributor

philips commented Jun 30, 2015

No description provided.

@philips philips added this to the draft-next milestone Jun 30, 2015
@crosbymichael
Copy link
Member

Many of the actions that can be performed after a container is started is done by other processes than the initial runtime. In order to synchronize these processes that could modify the state of the container we need some type of cross process locking.

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 1, 2015

Isn't this hooks problem?

@crosbymichael
Copy link
Member

not hooks. This is for when we do checkpoint/restore, updates, or exec. All these actions are done by external processes.

@wking
Copy link
Contributor

wking commented Aug 30, 2015

On Wed, Jul 01, 2015 at 09:40:09AM -0700, Michael Crosby wrote:

This is for when we do checkpoint/restore, updates, or exec. All
these actions are done by external processes.

With the minimal-state approach that's close to landing via #87, I
don't think we'll need any locking on the state file. Things like
“are we frozen?” will be decided by direct syscalls (e.g. each client
will read /sys/fs/cgroup/freezer/…/freezer.state like runC is doing
with opencontainers/runc#218). The state-spec version, container ID,
and application PID (and maybe some sort of root path) seem like
attributes that will be stable throughout the life of an application.

If we split container and application manipulation into their own
commands 1 the application PID might be more fluxy. We can revisit
locking if/when that happens, but until then I don't think we need it.

@crosbymichael
Copy link
Member

In the f2f we discussed the need for state and determined that we will spec out a container action for getting the state of a container but not have a file based api for this so this is no longer needed at the state level and turns into an implementation detail for runtimes.

@crosbymichael crosbymichael modified the milestones: by-1.0.0, 1.0.0 May 25, 2016
wking added a commit to wking/opencontainer-runtime-spec that referenced this issue Apr 6, 2018
Generated with:

  $ git remote add project-template git://github.com/opencontainers/project-template.git
  $ git fetch project-template
  $ git show --oneline project-template/master
  61d73a3 (project-template/master) Merge pull request opencontainers#40 from wking/minor-patch-bullet
  $ git merge --squash --allow-unrelated-histories project-template/master
  $ git checkout HEAD -- .pullapprove.yml MAINTAINERS README.md RELEASES.md
  $ git checkout project-template/master -- GOVERNANCE.md LICENSE
  $ emacs README.md CONTRIBUTING.md # unify around project-template's CONTRIBUTING.md approach
  $ emacs meeting.ics  # update link to point at CONTRIBUTING.md#meetings
  $ git commit -sv

I personally prefer non-squash merges to preserve history and ease
future updates, but that approach has not been popular within the OCI
[1,2], so I'm going with a squash-merge here.

I'm sticking with the local RELEASES.md, because it uses four-space
indents.  I've filed [3] to upstream that change.

I've also filed [4] upstreaming our local wording change from 70ba4e6
(meeting: Bump January meeting from the 3rd to the 10th, 2017-12-07,
opencontainers#943).

I've also fixed the GOVERNANCE.md security link in flight with [5].

I've left the other in-flight project-template changes alone [6].

I've wrapped the URL in meetings.ics to avoid [7]:

  Line length should not be longer than 75 characters near line opencontainers#33
  Reference: RFC 5545 3.1. Content Lines

[1]: opencontainers/go-digest#20 (comment)
[2]: opencontainers/runtime-tools#274 (comment)
[3]: opencontainers/project-template#54
[4]: opencontainers/project-template#55
[5]: opencontainers/project-template#34
[6]: https://github.com/opencontainers/project-template/pulls
[7]: https://icalendar.org/validator.html

Signed-off-by: W. Trevor King <wking@tremily.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants