Skip to content

Remove platform field - #850

Merged
crosbymichael merged 1 commit into
opencontainers:masterfrom
hqhq:simply_platform
Jun 16, 2017
Merged

Remove platform field#850
crosbymichael merged 1 commit into
opencontainers:masterfrom
hqhq:simply_platform

Conversation

@hqhq

@hqhqhqhq commented May 24, 2017

Copy link
Copy Markdown
Contributor

Close: #725

See discussion in #830 and dev-weekly-meeting discussion
in http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2017/opencontainers.2017-06-14-21.03.log.txt

We don't use this field in runc, and mostly only
image-spec cares about this, we can assume tools know
what specific platform this spec is built for.

Signed-off-by: Qiang Huang h.huangqiang@huawei.com

Comment threadconfig.md Outdated
Values for **`arch`** SHOULD use, and runtimes SHOULD understand, **`arch`** entries listed in the Go Language document for [`GOARCH`][go-environment].
If an architecture is not included in the `GOARCH` documentation, it SHOULD be submitted to this specification for standardization.
**`platform`** (string, REQUIRED) specifies the configuration's target platform.
The value MUST be a slug from [the platform list](spec.md#platforms).

@lowennalowennaMay 24, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure I like the word slug... Item? Entry?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated, thanks.

Comment threadconfig.md Outdated
This MAY be set if **`platform.os`** is `linux` and MUST NOT be set otherwise.
This MAY be set if **`platform`** is `linux` and MUST NOT be set otherwise.
* **`windows`** (object, OPTIONAL) [Windows-specific configuration](config-windows.md).
This MAY be set if **`platform.os`** is `windows` and MUST NOT be set otherwise.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, this MUST be set if the platform is windows. A container isn't going to run at all without it. Not sure whether this applies to other platforms though.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Maybe we can open a new PR to fix this? It's non-relevant to this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we can open a new PR to fix this?

#828 is covering this change, so we can leave this as MAY for this PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Now that #828 has landed, this PR will need a rebase.

@hqhq
hqhqforce-pushed the simply_platform branch 2 times, most recently from 3cc7816 to dc88c9eCompareMay 24, 2017 02:22
@tianon

Copy link
Copy Markdown
Member

Since this appears to map platform to image-spec's platform.os, would it make sense to instead call this os or platformOs (and perhaps even reference image-spec)?

IMO dropping our platform object down to just os is a decent compromise (rather than removing platform entirely), but I'd love to hear the opinions of other @opencontainers/runtime-spec-maintainers.

@wking

wking commented May 24, 2017 via email

Copy link
Copy Markdown
Contributor

@stevvooe

Copy link
Copy Markdown

This seems like a step backwards.

The only change needed to make it compatible with the image spec is arch -> architecture.

@mrunalpmrunalp added this to the 1.0.0 milestone Jun 1, 2017
@hqhq

hqhq commented Jun 2, 2017

Copy link
Copy Markdown
ContributorAuthor

@opencontainers/runtime-spec-maintainers More comments on this? I see many different suggestions and not sure which way to go.

@wking

wking commented Jun 2, 2017 via email

Copy link
Copy Markdown
Contributor

@lowenna

Copy link
Copy Markdown
Contributor

Actually, just to throw one out there.... Windows will imminently be able to run both Windows and Linux containers. So it might matter.

@wking

wking commented Jun 2, 2017 via email

Copy link
Copy Markdown
Contributor

@lowenna

Copy link
Copy Markdown
Contributor

I'm still figuring that out. It will need bits of the Windows and Linux sections - for example the LayerFolders in Windows are going to be required for the runtime, but much of the Linux section will need to be populated as that's where the Linux settings are. For 1.0, I'd probably ignore my comment, it was just in passing. However, there will definitely be quite a few spec updates required for multi-platform on a single OS.

@wking

wking commented Jun 2, 2017 via email

Copy link
Copy Markdown
Contributor

@wkingwking mentioned this pull request Jun 6, 2017
Comment threadconfig.md Outdated

* **`os`** (string, REQUIRED) specifies the operating system family of the container configuration's specified [`root`](#root) file system bundle.
The runtime MUST generate an error if it does not support the specified **`os`**.
Bundles SHOULD use, and runtimes SHOULD understand, **`os`** entries listed in the Go Language document for [`GOOS`][go-environment].

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You'll want to drop the reference at the ebd of this file too, since you remove the only consumers.

@crosbymichael

Copy link
Copy Markdown
Member

We discussed this on the call today and feel that it would be better to fully remove it from the spec. The tool that interprets the spec knows how/what platform it is built for or what platform it should use in the case of windows or VMs.

@hqhq can you update this PR to remove the platform field fully? Validation tools will be told what they are validating a specific spec against.

@hqhqhqhq changed the title Simply platform fieldRemove platform fieldJun 15, 2017
@hqhq

hqhq commented Jun 15, 2017

Copy link
Copy Markdown
ContributorAuthor

@crosbymichael Updated.

Comment threadconfig.md Outdated
[procfs_2]: https://www.kernel.org/doc/Documentation/filesystems/proc.txt
[semver-v2.0.0]: http://semver.org/spec/v2.0.0.html
[go-environment]: https://golang.org/doc/install/source#environment
[semver-v3.0.0]: http://semver.org/spec/v2.0.0.html

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think you want to bump semver-v2.0.0semver-v3.0.0 (especially since 2.0.0 is still the most recent version ;).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Indeed -- minus this change, the rest of this PR LGTM now. 👍

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Oops, no idea where that change comes from, updated.

@crosbymichael

crosbymichael commented Jun 15, 2017

Copy link
Copy Markdown
Member

platform changes

LGTM

Approved with PullApprove

Close: opencontainers#725
See discussion in opencontainers#830 and dev-weekly-meeting discussion
in http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2017/opencontainers.2017-06-14-21.03.log.txt
We don't use this field in runc, and mostly only
image-spec cares about this, we can assume tools know
what specific platform this spec is built for.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
@Mashimiao

Copy link
Copy Markdown

Sorry for asking so late. I have a question.
If we set more than one of linux, windows and solaris, how can runtime distinguish which platform is the target platform?

@wking

Copy link
Copy Markdown
Contributor

If we set more than one of linux, windows and solaris, how can runtime distinguish which platform is the target platform?

The runtime will have a compiled-in favorite. For example, a Linux build of runc will assume a Linux config, regardless of which properties are set.

Tools that can handle configs for multiple platforms (e.g. runtime-tools) will need a new --platform option.

@tianon

tianon commented Jun 16, 2017

Copy link
Copy Markdown
Member

LGTM

Approved with PullApprove

1 similar comment
@crosbymichael

crosbymichael commented Jun 16, 2017

Copy link
Copy Markdown
Member

LGTM

Approved with PullApprove

@crosbymichael
crosbymichael merged commit 63b7c6c into opencontainers:masterJun 16, 2017
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Jun 16, 2017
Through 63b7c6c (Merge pull request opencontainers#850 from hqhq/simply_platform,
2017-06-16).
Signed-off-by: W. Trevor King <wking@tremily.us>
@hqhq
hqhq deleted the simply_platform branch June 17, 2017 12:10
@vbattsvbatts mentioned this pull request Jul 5, 2017
Sign up for freeto 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.

8 participants

@hqhq@tianon@wking@stevvooe@lowenna@crosbymichael@Mashimiao@mrunalp