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

Specify process for naming future architectures #29

Closed
wants to merge 1 commit into from

Conversation

timthelion
Copy link
Contributor

No description provided.

@philips
Copy link
Contributor

philips commented Apr 15, 2016

Not opposed but I am guessing you meant for this to be on the arch line, not the OS line?

@timthelion
Copy link
Contributor Author

Oops, fixed...

On 04/15/16 02:35, Brandon Philips wrote:

Not opposed but I am guessing you meant for this to be on the arch
line, not the OS line?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#29 (comment)

@@ -167,7 +167,8 @@ Here is an example image JSON file:
<li>amd64</li>
<li>arm</li>
</ul>
More values may be supported in the future and any of these may or may not be supported by a given container runtime implementation.
More values may be supported in the future and any of these may or may not be supported by a given container runtime implementation. Future values will be consistent with those already canonicalized by the <a href="https://www.debian.org/ports/">Debian ports list</a>.
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 already kinda broken by "arm", right? :/

Copy link
Contributor Author

@timthelion timthelion Apr 15, 2016

Choose a reason for hiding this comment

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

Well Debian doesn't use 386 but i386. They do seem to have an architecture named arm, there are lots of Debian arm architectures based on the build flags. I don't demand that we follow Debian's lead, but it was the closest thing that I could find to a standard for specifying actual BUILD TIME architectures! I think that it is good to copy someone, even if there are some differences in the naming. I think that it is better than to just come up with random names for things. And actually, I think that in the case of arm, following Debian's standard brings along a lot of valulable technical know-how (AKA, the taxonomy of arm build setups ;) ).

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, for the sake of Arm, I think that it is necesary to either copy either Debian or Fedora, otherwise, we won't take into acount the specifics and there will be incompatibility problems at the kernel level. AKA, not all "ARM" images will run on all "ARM" kernels.

@timthelion
Copy link
Contributor Author

timthelion commented Apr 15, 2016

I just realized that the manifest spec already specifies the use of the official list for $GOARCH. https://golang.org/doc/install/source#environment

EDIT: and that list agrees with the already present values.

@timthelion timthelion force-pushed the patch-4 branch 2 times, most recently from c1b767e to 0d5c80a Compare April 15, 2016 08:58
Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz>
@jonboulle
Copy link
Contributor

You're correct. The problem is, the GOARCH values are not specific enough by themselves (e.g. for ARM, necessitating the additional GOARM variable), which is part of the reason we ended up avoiding using them directly in appc. I don't think we got it entirely right there, but I think there are some learnings we can take from it: e.g. armv7l vs armv7b, arm64 vs aarch64)

The manifest spec (which as you noted already uses the GOARCH values) attempts to take this into consideration with the additional variant property, but this just raises the point that there's a mismatch between here and there.

@timthelion
Copy link
Contributor Author

@jonboulle is the debian ports list specific enough? Pardon me, that I have no actual knowledge of the Arms race or whatever we're going to call this conundrum.

@jonboulle
Copy link
Contributor

@timthelion well, from the brief exchange we had with ARM engineers (see below), I had thought that endianness was a requirement, but I also am not extremely well versed in this area

On ARM64 Linux, "uname -m" reports "aarch64". When you run a 32-bit on arm64, it still reports "aarch64" unless you run it with a 32-bit personality. So "linux32 uname -m" reports "armv8l" for backwards compatibility (independently of whether uname is a 32 or 64-bit application). On big-endian, Linux reports "aarch64_be" and "armv8b" respectively.

For the older architectures, using the output of ‘uname –m’ would also make sense and negate the armel/armhf/armv7l confusion. Doing this would mean ‘armv7l' would be the correct “tag” to use for little-endian, and ‘armv7b’ for big endian.

@timthelion
Copy link
Contributor Author

Perhaps this would be another possible source for standard names: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch

@wking
Copy link
Contributor

wking commented Apr 15, 2016

On Fri, Apr 15, 2016 at 05:56:00AM -0700, Timothy Hobbs wrote:

Perhaps this would be another possible source for standard names:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch

Not unless you want to dig down in there to find obscure architectures
like x86_64 1 ;).

@wking
Copy link
Contributor

wking commented Apr 15, 2016

Maybe just reference 1 here, and move this conversation over to that
repository? I don't think we want separate versions of this
conversation in each repository, and that's the lower-level spec.

@stevvooe
Copy link
Contributor

@jonboulle We studied this problem early on in OCI and during multi-arch considerations for the V2.2 manifest. Indeed, GOARCH is insufficient, but it is a good starting point.

The intent with these field sets was to define a class of machines on which the image would run. The real work here is defining the classes and aliasing in such way to make these fields useful in multi-arch scenarios. In some case, this may actually be better left to implementations, leaving OCIs role to define the common architectures which must be compatible (amd64, etc.), along with the data model and process for expressing the os/architecture (platform) for an image.

That said, we can say that these are seeded by GOARCH, but not limited by.

Ultimately, this is going to have to be a real community effort and that will be as successful as the process we adopt.

@@ -167,7 +167,9 @@ Here is an example image JSON file:
<li>amd64</li>
<li>arm</li>
</ul>
More values may be supported in the future and any of these may or may not be supported by a given container runtime implementation.
A full list of possible values can be found in the <a href=https://golang.org/doc/install/source#environment>Go language documentation for $GOOS and $GOARCH</a>.
Any of these may or may not be supported by a given container runtime
Copy link
Member

Choose a reason for hiding this comment

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

perhaps pull this sentence up to be all on one line.

@vbatts
Copy link
Member

vbatts commented Apr 28, 2016

This seems like something that could utilize annotations of a prescribed namespace.
This PR seems LGTM, and we can iron out particular hardware details as needed.

@philips
Copy link
Contributor

philips commented Apr 28, 2016

@vbatts I would rather this spec be authoritative on archs and OS strings than not. This will be an important namespace for the spec to own.

If we reference the GOARCH / GOOS spec I think it should be more along the lines of "New architectures and OSes will be added over time and through discussion on the OCI Image Project. A source for inspiration for new entries is the Go docs etc etcd"

@stevvooe
Copy link
Contributor

@philips While agree we need to call these out here, it is unlikely that anyone will ever "own" the platform namespace ;).

Deferring to GOOS/GOARCH as the inspiration, but not the canonical source, seems to be the right balance.

@philips
Copy link
Contributor

philips commented Apr 28, 2016

@stevvooe So, are you saying you are OK merging as-is? Or you want it to be more along the lines of "future entries should be inspired by". I am not seeing what you want.

@stevvooe
Copy link
Contributor

@philips I agree with "future entries should be inspired by" and #29 (comment). We're going to have to curate these and I don't see a way around it.

I'm not sure about merging this PR. We can merge this but then it will be rolled back later.

@philips
Copy link
Contributor

philips commented Apr 29, 2016

@stevvooe Ack.

@timthelion Sorry, but would you mind making the language be more like what @stevvooe suggests? If our indecisiveness is getting too annoying LMK and I can fixup the language and merge on your behalf.

@philips
Copy link
Contributor

philips commented May 3, 2016

Closing in favor of: #60

@philips philips closed this May 3, 2016
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request May 20, 2016
The old platform.os text had two MUST conditions.  The first could
have been read "the runtime MUST generate an error if invoked with a
config.json whose platform.os is incompatible with the host platform"
(which is the direction I'm going with this commit).  However, it
could also have been read "the bundle-validator MUST generate an error
if platform.os is incompatible with the content the bundle's other
content (e.g. 'linux' in platform.os, but only Windows binaries in the
bundle's rootfs).

For the second MUST, I doubt we want to require a compliant runtime
support all Go architectures itself.  And there is a benefit to
pointing runtime/bundle authors at the Go set, but not much benefit in
making that a hard limit [1,2].  The rewording here follows [2] in
acknowledging that process.arch-matching is something that the config
author and runtime caller have to sort out between themselves and
pointing them at the Go docs and a registration process to avoid
fragmenting the community.

[1]: opencontainers/image-spec#29
[2]: opencontainers/image-spec#60

Signed-off-by: W. Trevor King <wking@tremily.us>
Mashimiao pushed a commit to Mashimiao/specs that referenced this pull request Aug 19, 2016
The old platform.os text had two MUST conditions.  The first could
have been read "the runtime MUST generate an error if invoked with a
config.json whose platform.os is incompatible with the host platform"
(which is the direction I'm going with this commit).  However, it
could also have been read "the bundle-validator MUST generate an error
if platform.os is incompatible with the content the bundle's other
content (e.g. 'linux' in platform.os, but only Windows binaries in the
bundle's rootfs).

For the second MUST, I doubt we want to require a compliant runtime
support all Go architectures itself.  And there is a benefit to
pointing runtime/bundle authors at the Go set, but not much benefit in
making that a hard limit [1,2].  The rewording here follows [2] in
acknowledging that process.arch-matching is something that the config
author and runtime caller have to sort out between themselves and
pointing them at the Go docs and a registration process to avoid
fragmenting the community.

[1]: opencontainers/image-spec#29
[2]: opencontainers/image-spec#60

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants