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

Remove platform field #850

Merged
merged 1 commit into from
Jun 16, 2017
Merged

Conversation

hqhq
Copy link
Contributor

@hqhq hqhq commented May 24, 2017

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

config.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).
Copy link
Contributor

@lowenna lowenna May 24, 2017

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
Contributor Author

Choose a reason for hiding this comment

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

Updated, thanks.

config.md Outdated
* **`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
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
Contributor Author

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
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
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 hqhq force-pushed the simply_platform branch 2 times, most recently from 3cc7816 to dc88c9e Compare May 24, 2017 02:22
@tianon
Copy link
Member

tianon commented May 24, 2017

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
Copy link
Contributor

wking commented May 24, 2017 via email

@stevvooe
Copy link

This seems like a step backwards.

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

@mrunalp mrunalp added this to the 1.0.0 milestone Jun 1, 2017
@hqhq
Copy link
Contributor Author

hqhq commented Jun 2, 2017

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

@wking
Copy link
Contributor

wking commented Jun 2, 2017 via email

@lowenna
Copy link
Contributor

lowenna commented Jun 2, 2017

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

@wking
Copy link
Contributor

wking commented Jun 2, 2017 via email

@lowenna
Copy link
Contributor

lowenna commented Jun 2, 2017

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
Copy link
Contributor

wking commented Jun 2, 2017 via email

@wking wking mentioned this pull request Jun 6, 2017
config.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
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
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.

@hqhq hqhq force-pushed the simply_platform branch from dc88c9e to 166581e Compare June 15, 2017 16:57
@hqhq hqhq changed the title Simply platform field Remove platform field Jun 15, 2017
@hqhq
Copy link
Contributor Author

hqhq commented Jun 15, 2017

@crosbymichael Updated.

config.md Outdated
@@ -855,8 +823,7 @@ Here is a full example `config.json` for reference.
[selinux]:http://selinuxproject.org/page/Main_Page
[no-new-privs]: https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt
[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
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
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
Contributor Author

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
Copy link
Member

crosbymichael commented Jun 15, 2017

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>
@hqhq hqhq force-pushed the simply_platform branch from 166581e to af0e225 Compare June 16, 2017 07:11
@Mashimiao
Copy link

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
Contributor

wking commented Jun 16, 2017

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
Copy link
Member

tianon commented Jun 16, 2017

LGTM

Approved with PullApprove

1 similar comment
@crosbymichael
Copy link
Member

crosbymichael commented Jun 16, 2017

LGTM

Approved with PullApprove

@crosbymichael crosbymichael merged commit 63b7c6c into opencontainers:master Jun 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
@vbatts vbatts mentioned this pull request Jul 5, 2017
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.

8 participants