8000 doc: stage1-implementors-guide.md: clarify pid vs ppid by alban · Pull Request #2397 · rkt/rkt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

doc: stage1-implementors-guide.md: clarify pid vs ppid #2397

Merged
merged 1 commit into from
Apr 28, 2016

Conversation

alban
Copy link
Member
@alban alban commented Apr 8, 2016

Clarify that only one file must be written among pid / ppid.

Reword the description. With the kvm flavor, the pid 1 of the container
was not visible on the host. The new wording does not make that
assumption.

/cc @jellonek @jonboulle @s-urbaniak PTAL

Related to: #2389

@@ -50,10 +50,10 @@ An alternative stage 1 could forego systemd-nspawn and systemd altogether, or re
All that is required is an executable at the place indicated by the `coreos.com/rkt/stage1/run` entrypoint that knows how to apply the pod manifest and prepared ACI file-systems to good effect.

The resolved entrypoint must inform rkt of its PID for the benefit of `rkt enter`.
Stage 1 must write the host PIDs of the pod's process #1 and that process's parent to these two files, respectively:
Stage 1 implementors have two options for doing so; only one must be implemented:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only? Or maybe "at least". But i'm not sure if it's true - in kvm flavor i was writing into ppid file, and this led to hang in endless loop, in entering process.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was waiting for a child process of lkvm. But that child process does not exist.

I think that "only" is better. If both "pid" and "ppid" exist, which one is stage0 supposed to use?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without "pid" entering process hangs. So this "only" still leads to mistake.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was #2389, fixed by #2396. But still, only one of the two files are written by stage1.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should clarify in the code here that the ordering is not important and only one of them must be supplied (currently the code reads as if it is favouring "pid", but if you factor in the raciness of the function then we can consider that ordering to be arbitrary).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please either fix that in this PR or file a follow up and land this as-is

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR updated.

@alban alban force-pushed the alban/ppid-or-pid branch from 0c53237 to 2343d0a Compare April 18, 2016 13:51
@alban alban added this to the v1.5.0 milestone Apr 24, 2016
@alban alban force-pushed the alban/ppid-or-pid branch from 2343d0a to 0e8debe Compare April 26, 2016 12:18
Clarify that only one file must be written among pid / ppid.

Reword the description. With the kvm flavor, the pid 1 of the container
was not visible on the host. The new wording does not make that
assumption.
@jonboulle
Copy link
Contributor

@jellonek as our lead other implementer - does this make sense to you now?

@jonboulle jonboulle merged commit fc3600e into rkt:master Apr 28, 2016
@jonboulle
Copy link
Contributor

@jellonek please let us know if not and follow up

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0