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

Clarify root path #820

Merged
merged 1 commit into from
May 18, 2017
Merged

Clarify root path #820

merged 1 commit into from
May 18, 2017

Conversation

lowenna
Copy link
Contributor

@lowenna lowenna commented May 13, 2017

Signed-off-by: John Howard jhoward@microsoft.com

This changes the root path to OPTIONAL as it is not supported for Hyper-V containers on Windows, where the root filesystem isn't accessible on the host operating system - it only has meaning inside the utility VM running the container.

@lowenna
Copy link
Contributor Author

lowenna commented May 13, 2017

Not sure what travis is complaining about.... can someone help me understand? 😬

config.md Outdated
The path is either an absolute path or a relative path to the bundle.
On Linux, for example, with a bundle at `/to/bundle` and a root filesystem at `/to/bundle/rootfs`, the `path` value can be either `/to/bundle/rootfs` or `rootfs`.
A directory MUST exist at the path declared by the field.
On Linux, for example, with a bundle at `/to/bundle` and a root filesystem at `/to/bundle/rootfs`, the `path` value can be either `/to/bundle/rootfs` or `rootfs`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Travis doesn't like the trailing whitespace here:

$ git show --oneline --check origin/pr/820
23a0b15 Clarify root path
config.md:33: trailing whitespace.
+  On Linux, for example, with a bundle at `/to/bundle` and a root filesystem at `/to/bundle/rootfs`, the `path` value can be either `/to/bundle/rootfs` or `rootfs`. 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Fixed in next push

config.md Outdated
On Linux, for example, with a bundle at `/to/bundle` and a root filesystem at `/to/bundle/rootfs`, the `path` value can be either `/to/bundle/rootfs` or `rootfs`.
A directory MUST exist at the path declared by the field.
On Linux, for example, with a bundle at `/to/bundle` and a root filesystem at `/to/bundle/rootfs`, the `path` value can be either `/to/bundle/rootfs` or `rootfs`.
On Windows, for Windows Server Containers, this field is REQUIRED. For Hyper-V Containers, this field MUST NOT be supplied.
Copy link
Contributor

Choose a reason for hiding this comment

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

For writing validation tooling, how should runtime-tools distinguish between a Windows Server config and a Hyper-V config?

This change will also need some knock ons:

  • Adjusting the bundle requirements to only require the root filesystem directory when root.path is set. I still don't see a need for that bundle requirement (last discussed in bundle: Remove rootfs requirement #469) and think that the config.md requirement (which you preserve in this PR) for “A directory MUST exist at the path declared by the field” is sufficient for sanity. But if you can't get consensus around something like that, you'll still need to do something to bundle.md, since the current wording there makes it impossible to leave root.path unset.
  • An omitempty in the Go type.
  • Dropping the path requirement from the JSON Schema.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For writing validation tooling, how should runtime-tools distinguish between a Windows Server config and a Hyper-V config?

See the associated PR in #818

Have updated the bundle requirements, the go type and the schema

bundle.md Outdated

On Windows, for Windows Server containers, this directory is REQUIRED. For Hyper-V containers, it MUST be omitted.

If set, this directory MUST be referenced by [`root`](config.md#root) within the `config.json` file.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these are all part of the second list entry. To get multi-paragraph list entries in Pandoc, you need four-space (or tab) indents (more in #495). Can you use:

2. <a name="containerFormat02" />A directory representing the root filesystem of the container.
    While the name of this directory may be arbitrary, users should consider using a conventional name, such as `rootfs`.
 
    On non-Windows platforms, this directory is REQUIRED.

    On Windows, for Windows Server containers, this directory is REQUIRED.
    For Hyper-V containers, it MUST be omitted.

    If set, this directory MUST be referenced by [`root`](config.md#root) within the `config.json` file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed. Updated.

@lowenna lowenna force-pushed the clarifyrootpath branch 3 times, most recently from 393d49d to 1cbf3e3 Compare May 15, 2017 20:17
bundle.md Outdated

If set, this directory MUST be referenced by [`root`](config.md#root) within the `config.json` file.

When supplied, while these artifacts MUST all be present in a single directory on the local filesystem, that directory itself is not part of the bundle. In other words, a tar archive of a *bundle* will have these artifacts at the root of the archive, not nested within a top-level directory.
Copy link
Contributor

Choose a reason for hiding this comment

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

You seem to be removing the newline before “In other words” while not touching the content of that sentence. I think you want to keep that sentence on its own line.

Also, “When supplied, while …” is a bit awkward. I keep circling back to #469 when trying to think up clearer phrasing, so I don't have anything new to propose as an alternative. But probably something that separates out the same-directory MUST from the definition of “bundle” as the parent of config.json (and any other artifacts listed here).

Signed-off-by: John Howard <jhoward@microsoft.com>
@lowenna
Copy link
Contributor Author

lowenna commented May 15, 2017

You seem to be removing the newline before “In other words” while not touching the content of that sentence. I think you want to keep that sentence on its own line.

Hmmm. Yes, I see from the link. But from a grammatical perspective, it seems more natural to me as it directly relates to the previous sentence. Reverted though.

@wking
Copy link
Contributor

wking commented May 15, 2017 via email

@tianon
Copy link
Member

tianon commented May 17, 2017

LGTM

Approved with PullApprove

1 similar comment
@vbatts
Copy link
Member

vbatts commented May 18, 2017

LGTM

Approved with PullApprove

@vbatts vbatts merged commit c83b8c8 into opencontainers:master May 18, 2017
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request May 18, 2017
Through c83b8c8 (Merge pull request opencontainers#820 from jhowardms\
ft/clarifyrootpath, 2017-05-18).

Signed-off-by: W. Trevor King <wking@tremily.us>
vbatts pushed a commit to vbatts/oci-runtime-spec that referenced this pull request May 22, 2017
Through c83b8c8 (Merge pull request opencontainers#820 from jhowardms\
ft/clarifyrootpath, 2017-05-18).

Signed-off-by: W. Trevor King <wking@tremily.us>
vbatts pushed a commit to vbatts/oci-runtime-spec that referenced this pull request Jul 5, 2017
Through c83b8c8 (Merge pull request opencontainers#820 from jhowardms\
ft/clarifyrootpath, 2017-05-18).

Signed-off-by: W. Trevor King <wking@tremily.us>
@vbatts vbatts mentioned this pull request Jul 5, 2017
vbatts pushed a commit to vbatts/oci-runtime-spec that referenced this pull request Jul 10, 2017
Through c83b8c8 (Merge pull request opencontainers#820 from jhowardms\
ft/clarifyrootpath, 2017-05-18).

Signed-off-by: W. Trevor King <wking@tremily.us>
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Jul 10, 2017
Through f4d221c (Merge pull request opencontainers#880 from
dqminh/wking-linux-only-capabilities-again, 2017-07-05).  The rc6
release picked up an earlier version of these notes, and those entries
are mostly unchanged except for:

* The credentialSpec entry, which was opencontainers#814 for credentialspec and now
  also includes opencontainers#859 for credentialSpec.

* The root(.path) Hyper-V entry, which was opencontainers#820 for root.path and now
  also includes opencontainers#838 for root.  I also moved this into the "breaking
  changes" section, because rc5 Hyper-V configs required root to be
  set, and rc6 Hyper-V configs require it to not be set.  Although
  whether rc5 allowed Hyper-V configs at all is not clear to me.

* Fixed indenting for the typo-fixes entry, as well as a number of
  more recent typo-fix PRs.

Signed-off-by: W. Trevor King <wking@tremily.us>
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Jul 11, 2017
Through f4d221c (Merge pull request opencontainers#880 from
dqminh/wking-linux-only-capabilities-again, 2017-07-05).  The rc6
release picked up an earlier version of these notes, and those entries
are mostly unchanged except for:

* The credentialSpec entry, which was opencontainers#814 for credentialspec and now
  also includes opencontainers#859 for credentialSpec.

* The root(.path) Hyper-V entry, which was opencontainers#820 for root.path and now
  also includes opencontainers#838 for root.  I also moved this into the "breaking
  changes" section, because rc5 Hyper-V configs required root to be
  set, and rc6 Hyper-V configs require it to not be set.  Although
  whether rc5 allowed Hyper-V configs at all is not clear to me.

* Fixed indenting for the typo-fixes entry, as well as a number of
  more recent typo-fix PRs.

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

Successfully merging this pull request may close these issues.

4 participants