Skip to content

Conversation

@vbatts
Copy link
Member

@vbatts vbatts commented Sep 29, 2016

This series of commits touches on the places that ordering is applied/unpacked.
Attempting to have consistent wording.

Fixes #276

@vbatts
Copy link
Member Author

vbatts commented Sep 29, 2016

@opencontainers/image-spec-maintainers PTAL (and @AaronLehman too, please :-)

config.md Outdated
- **diff_ids** *array*, REQUIRED

An array of layer content hashes (`DiffIDs`), in order from bottom-most to top-most.
An array of layer content hashes (`DiffIDs`), in stack order from bottom-most to top-most (i.e. from diff_ids[0] to diff_ids[len(diff_ids)]).
Copy link
Contributor

Choose a reason for hiding this comment

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

“diff_ids[0] to diff_ids[len(diff_ids)]” → “diff_ids[0] to diff_ids[len(diff_ids)]”.

manifest.md Outdated
The second goal is to allow multi-architecture images, through a "fat manifest" which references image manifests for platform-specific versions of an image.
The third goal is to be translatable to the [OpenContainers/runtime-spec](https://github.com/opencontainers/runtime-spec)

This section defines the `application/vnd.oci.image.manifest.list.v1+json` and `application/vnd.oci.image.manifest.v1+json` [media type](media-types.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we break this up into two files? Manifest lists and manifests seem as separate as manifests and configs. And while I like the commits that clearly list the media types being defined, I think that change is orthogonal to the order-clarification. Maybe it belongs in a separate PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is OK, but separate PR.

manifest.md Outdated
Subsequent layers MUST then follow in the order in which they are to be layered on top of each other.
The algorithm to create the final unpacked filesystem layout MUST be to first unpack the layer at index 0, then index 1, and so on.
Subsequent layers MUST then follow in stack order.
The final filesystem layout MUST be from [applying](layer.md#applying) the layers in stack order (i.e. from layers[0] to layers[len(layers)]).
Copy link
Contributor

Choose a reason for hiding this comment

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

I still think we need to specify something about the initial state before the layers are applied (#318). I also changed “be” to “match” in that PR to allow for implementations like union mounting.

Also backticks around the layers[…] stuff.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, but lets leave this for #318

image-layout.md Outdated
Tooling can:
* convert a given ref into a runnable OCI Image Format by finding an appropriate manifest from the manifest list
* apply the [filesystem layers](layer.md) per the [manifest layers ordering](manifest.md#image-manifest-property-descriptions)
* convert the image configuration into an [OCI Runtime config.json](https://github.com/opencontainers/runtime-spec)
Copy link
Contributor

@wking wking Sep 29, 2016

Choose a reason for hiding this comment

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

All of these steps are required to create a runable bundle. How about:

Given an image layout and a ref, a tool can create an OCI Runtime Specification bundle by:

  1. Following the ref to find a manifest, possibly via a manifest list,
  2. Unpacking the filesystem layers in the correct order, and
  3. Converting the image configuration into an OCI Runtime Specification config.json.

[edit: “… a runnable OCI Runtime…” → “… an OCI Runtime…”.]

Copy link
Contributor

@philips philips left a comment

Choose a reason for hiding this comment

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

LGTM overall

manifest.md Outdated
The second goal is to allow multi-architecture images, through a "fat manifest" which references image manifests for platform-specific versions of an image.
The third goal is to be translatable to the [OpenContainers/runtime-spec](https://github.com/opencontainers/runtime-spec)

This section defines the `application/vnd.oci.image.manifest.list.v1+json` and `application/vnd.oci.image.manifest.v1+json` [media type](media-types.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

This is OK, but separate PR.

manifest.md Outdated
Subsequent layers MUST then follow in the order in which they are to be layered on top of each other.
The algorithm to create the final unpacked filesystem layout MUST be to first unpack the layer at index 0, then index 1, and so on.
Subsequent layers MUST then follow in stack order.
The final filesystem layout MUST be from [applying](layer.md#applying) the layers in stack order (i.e. from layers[0] to layers[len(layers)]).
Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, but lets leave this for #318

@vbatts
Copy link
Member Author

vbatts commented Sep 29, 2016

I see that #318 removes that line, but not how it clarifies anything. What
do you want me to change?

On Thu, Sep 29, 2016, 23:08 Brandon Philips [email protected]
wrote:

@philips commented on this pull request.

LGTM overall

In manifest.md
#349 (review)
:

@@ -5,6 +5,7 @@ The first goal is content-addressable images, by supporting an image model where
The second goal is to allow multi-architecture images, through a "fat manifest" which references image manifests for platform-specific versions of an image.
The third goal is to be translatable to the OpenContainers/runtime-spec

+This section defines the application/vnd.oci.image.manifest.list.v1+json and application/vnd.oci.image.manifest.v1+json media type.

This is OK, but separate PR.

In manifest.md
#349 (review)
:

@@ -159,8 +160,8 @@ Unlike the Manifest List, which contains information about a s

 Each item in the array MUST be a [descriptor](descriptor.md).
 The array MUST have the base image at index 0.
  • Subsequent layers MUST then follow in the order in which they are to be layered on top of each other.
  • The algorithm to create the final unpacked filesystem layout MUST be to first unpack the layer at index 0, then index 1, and so on.
  • Subsequent layers MUST then follow in stack order.
  • The final filesystem layout MUST be from applying the layers in stack order (i.e. from layers[0] to layers[len(layers)]).

Agreed, but lets leave this for #318
#318


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#349 (review),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEF6RGYCtUG_2l8fSBD2wD6SHUL0LJAks5qvCiGgaJpZM4KJ8k6
.

@philips
Copy link
Contributor

philips commented Sep 29, 2016

@vbatts don't worry about #318. The language in #318 is "+ The root filesystem MUST match the result of applying the entries to an empty directory in the listed order."

I think this is a good suggestion for this PR: #349 (comment)

@wking
Copy link
Contributor

wking commented Sep 29, 2016

On Thu, Sep 29, 2016 at 02:31:15PM -0700, Vincent Batts wrote:

I see that #318 removes that line, but not how it clarifies
anything. What do you want me to change?

#318 forbids seeding the unpack directory location with any content
1 and changes “be” → “match”, but I'm ok with @philips' suggestion
to keep those in #318 2. If we punt those back to #318, the only
change I'd like to see for that line is the backticks 3.

@vbatts vbatts force-pushed the layer_ordering branch 2 times, most recently from 2aa1478 to d4220e4 Compare September 30, 2016 08:34
@vbatts
Copy link
Member Author

vbatts commented Sep 30, 2016

updated

layer.md Outdated

This document describes how to serialize a filesystem and filesystem changes like removed files into a blob called a layer.
One or more layers are ordered on top of each other to create a complete filesystem.
One or more layers changesets are applied on top of each other to create a complete filesystem.
Copy link
Contributor

Choose a reason for hiding this comment

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

remove "changesets"

Copy link
Member Author

Choose a reason for hiding this comment

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

k

config.md Outdated
- **diff_ids** *array*, REQUIRED

An array of layer content hashes (`DiffIDs`), in order from bottom-most to top-most.
An array of layer content hashes (`DiffIDs`), in stack order from bottom-most to top-most (i.e. from `diff_ids[0]` to `diff_ids[len(diff_ids)]`).
Copy link
Contributor

Choose a reason for hiding this comment

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

I really don't like introducing the word "stack" because it addles my poor brain

Copy link
Member Author

Choose a reason for hiding this comment

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

k. I'll just switch from the whole bottom to top, since we're not pushing and popping this list anyways.

image-layout.md Outdated
Given an image layout and a ref, a tool can create an [OCI Runtime Specification bundle](https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/bundle.md) by:

* Following the ref to find a [manifest](manifest.md#image-manifest), possibly via a [manifest list](manifest.md#manifest-list)
* Apply the filesystem layers in the specified order
Copy link
Contributor

Choose a reason for hiding this comment

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

Applying

Copy link
Member Author

Choose a reason for hiding this comment

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

k

config.md Outdated
An *Image* is an ordered collection of root filesystem changes and the corresponding execution parameters for use within a container runtime.
This specification outlines the JSON format describing images for use with a container runtime and execution tool and its relationship to filesystem changesets, described in [Layers](layer.md).

This section defines the `application/vnd.oci.image.config.v1+json` [media type](media-types.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

I appreciate these but would also say a different PR..

Copy link
Member Author

Choose a reason for hiding this comment

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

k

Because stacks

Signed-off-by: Vincent Batts <[email protected]>
where as the data structures pointing to these chagesets can control
their own ordering.

Signed-off-by: Vincent Batts <[email protected]>
This long sentence is more clear as a list

Signed-off-by: Vincent Batts <[email protected]>
@vbatts
Copy link
Member Author

vbatts commented Sep 30, 2016

updated PTAL

@jonboulle
Copy link
Contributor

jonboulle commented Sep 30, 2016

lgtm

Approved with PullApprove

Given an image layout and a ref, a tool can create an [OCI Runtime Specification bundle](https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/bundle.md) by:

* Following the ref to find a [manifest](manifest.md#image-manifest), possibly via a [manifest list](manifest.md#manifest-list)
* Applying the filesystem layers in the specified order
Copy link
Contributor

Choose a reason for hiding this comment

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

Make “Applying the filesystem layers” a link to layers.go#applying?


* Following the ref to find a [manifest](manifest.md#image-manifest), possibly via a [manifest list](manifest.md#manifest-list)
* Applying the filesystem layers in the specified order
* Converting the [image configuration](config.md) into an [OCI Runtime Specification config.json](https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/config.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Backticks around config.json?

@philips
Copy link
Contributor

philips commented Sep 30, 2016

LGTM

Approved with PullApprove

@philips philips merged commit 261ed42 into opencontainers:master Sep 30, 2016
@vbatts vbatts deleted the layer_ordering branch September 30, 2016 16:43
wking added a commit to wking/image-spec that referenced this pull request Oct 1, 2016
…ectory

Point out that the layer's initial empty directory has unspecified
attributes.  Layer authors interested in the ownership and other
attributes of the unpacked root directory should explicitly set an
entry for it.

This commit originally focused on requiring the initial directory to
be empty before the layers are unpacked into it.  But most of that was
picked up in fed7241 (manifest: clarify the order of layers,
2016-09-29, opencontainers#349).  I'd recommended "match" instead of "be" to allow
folks to apply via a union filesystem or whatever. As long as the
finished product is right, compliance testers and users should be
satisfied.

Signed-off-by: W. Trevor King <[email protected]>
wking added a commit to wking/image-spec that referenced this pull request Oct 6, 2016
…ectory

Point out that the layer's initial empty directory has unspecified
attributes.  Layer authors interested in the ownership and other
attributes of the unpacked root directory should explicitly set an
entry for it.

This commit originally focused on requiring the initial directory to
be empty before the layers are unpacked into it.  But most of that was
picked up in fed7241 (manifest: clarify the order of layers,
2016-09-29, opencontainers#349).  I'd recommended "match" instead of "be" to allow
folks to apply via a union filesystem or whatever. As long as the
finished product is right, compliance testers and users should be
satisfied.

Signed-off-by: W. Trevor King <[email protected]>
wking added a commit to wking/image-spec that referenced this pull request Oct 20, 2016
…ectory

Point out that the layer's initial empty directory has unspecified
attributes.  Layer authors interested in the ownership and other
attributes of the unpacked root directory should explicitly set an
entry for it.

This commit originally focused on requiring the initial directory to
be empty before the layers are unpacked into it.  But most of that was
picked up in fed7241 (manifest: clarify the order of layers,
2016-09-29, opencontainers#349).  I'd recommended "match" instead of "be" to allow
folks to apply via a union filesystem or whatever. As long as the
finished product is right, compliance testers and users should be
satisfied.

Signed-off-by: W. Trevor King <[email protected]>
wking added a commit to wking/image-spec that referenced this pull request Oct 20, 2016
…ectory

Point out that the layer's initial empty directory has unspecified
attributes.  Layer authors interested in the ownership and other
attributes of the unpacked root directory should explicitly set an
entry for it.

This commit originally focused on requiring the initial directory to
be empty before the layers are unpacked into it.  But most of that was
picked up in fed7241 (manifest: clarify the order of layers,
2016-09-29, opencontainers#349).  I'd recommended "match" instead of "be" to allow
folks to apply via a union filesystem or whatever. As long as the
finished product is right, compliance testers and users should be
satisfied.

Signed-off-by: W. Trevor King <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants