stage1-implementors-guide.md: Add filesystem layout assumptions. #1832
Conversation
|
||
### opt/stage2 | ||
|
||
As mentioned above, in rkt, the apps will be executed during stage2. rkt expects the directory path `opt/stage2` to exist under the stage1 rootfs. This directory is used by stage0 to extract the app's ACI. `rkt gc` also expects the app's rootfs to be mounted under this directory when overlayfs is used (e.g. `/var/lib/rkt/pods/$uuid/stage1/rootfs/opt/stage2/$appname/rootfs`). |
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.
Sentence per line for now please
4f23114
to
55fa44c
Compare
### opt/stage2 | ||
|
||
As mentioned above, in rkt, the apps will be executed during stage2. | ||
rkt expects the directory path `opt/stage2` to exist under the stage1 rootfs. |
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.
This is actually created by stage0:
- Overlay: run.go:556
- Non-overlay: run.go:525
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.
@iaguis: So it looks like I can drop the creation of the /opt/stage2
directory tree from the build system, right?
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.
Actually, we probably still have to write something about /opt/stage2
directories being created by rkt, so stage1 implementation shouldn't have any file named stage2
in /opt
directory. Or something like that.
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.
@iaguis @krnowak OK, then can we create /rkt/status
/rkt/env
in stage0 as well?
The error @steveej got is from
https://github.com/coreos/rkt/blob/master/stage0/run.go#L641
Seems it's because /rkt
directory does not exist.
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.
Small nit and needs a rebase. |
3123b95
to
fdbb8ca
Compare
fdbb8ca
to
7db2519
Compare
7db2519
to
e8b8aa0
Compare
|
||
This directory path is used for extracting the app's ACI. | ||
`rkt gc` also expects the app's rootfs to be mounted under this directory when | ||
overlayfs is used (e.g. `/var/lib/rkt/pods/$uuid/stage1/rootfs/opt/stage2/$appname/rootfs`). |
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.
e8b8aa0
to
e9b53fa
Compare
@alban Addressed comments. |
|
||
### rkt/env | ||
|
||
This directory path is used for passing the environments to each app. |
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 environment" or "environment variables"
This directory path is used for storing the apps' exit statuses. | ||
For example, if an app named `foo` exits with status = `42`, stage1 should write `42` | ||
in `/var/lib/rkt/pods/$state/$uuid/stage1/rootfs/rkt/status/foo`. | ||
Later the exit status will be fetch and shown by `rkt status $uuid` |
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/will/can/
s/fetch/retrieved/
trailing full-stop
A few comments, LGTM after that. |
e7ac594
to
dcfa4bf
Compare
@jonboulle Thanks! Fixed ! |
## Filesystem Layout Assumptions | ||
|
||
The following paths are reserved for the stage1 image, and they will be created during stage0. | ||
Users **SHOULD NOT** create or use these paths when making a stage1 image. |
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.
@yifan-gu sorry my comment here seems to have been lost. I'm a little wary of the word "Users" as I don't want to mislead anyone - I suggest a slight tweak:
When creating a stage1 image, developers SHOULD NOT create or use these paths in the image's filesystem
I didn't follow this one @joshix |
dcfa4bf
to
16cf215
Compare
@joshix Fixed other comments. Replace stage1 with stage 1 in the paragraph. Add $state(run/prepare) in the path. |
@yifan-gu I was suggesting that you number your list as 1, 2, 3, 4 (index 1), rather than starting with 0. Notice that the markdown 0, 1, 2, 3, will be rendered as a list beginning with 1 in the HTML presentation. See below:
|
16cf215
to
2978db3
Compare
@joshix Gotcha, fixed. |
Also replace " with ` for more clearness.
2978db3
to
e47a27b
Compare
LGTM |
stage1-implementors-guide.md: Add filesystem layout assumptions.
cc @steveej @jonboulle @alban @iaguis