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

Carry#13921 : Expand /info: Expose OSType (GOOS), Architecture (GOARCH) #17478

Merged
merged 2 commits into from
Nov 17, 2015

Conversation

vdemeester
Copy link
Member

This carry #13921 from 🌟 @olleolleolle to add OSType and Architecture to /info endpoint.

This change amends the diagnostic output of /info, to add two more keys. This supports Swarm's effort of helping users target multi-architecture Swarm clusters. See #13634.

These keys were introduced:

  • OSType (runtime.GOOS)
  • Architecture (runtime.GOARCH)

Trying to take into account the comment from @tiborvass in here : #13921 (comment)

/me hopes it builds on other platform

🌟 @tiborvass @runcom

ProcessorArchitectureArm = 5 // PROCESSOR_ARCHITECTURE_ARM
)

var sysinfo systeminfo
Copy link
Contributor

Choose a reason for hiding this comment

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

:-1 where do you define systeminfo ? you need to import

@vdemeester
Copy link
Member Author

/ping @tiborvass updated with a pkg/platform init() 😉

@LK4D4
Copy link
Contributor

LK4D4 commented Nov 13, 2015

LGTM
ping @docker/core-maintainers

@duglin
Copy link
Contributor

duglin commented Nov 13, 2015

LGTM


func init() {
var err error
Architecture, err = architecture.GetRuntimeArchitecture()
Copy link
Contributor

Choose a reason for hiding this comment

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

@vdemeester sorry i was thinking we remove the pkg/parsers/architecture package and just have all that logic in pkg/platform here. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was wondering about that too, so sound good to me, will try to do it 😉.

olleolleolle and others added 2 commits November 14, 2015 22:21
  - introduces Swarm-relevant keys, see moby#13634
  - docs updated

Signed-off-by: Olle Jonsson <[email protected]>
@vdemeester
Copy link
Member Author

@tiborvass done 😇


func init() {
var err error
Architecture, err = GetRuntimeArchitecture()
Copy link
Contributor

Choose a reason for hiding this comment

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

oh gosh, last thing and then i promise i'll merge: we don't need to export this, and I don't find it idiomatic to prefix with Get, so i suggest renaming this to runtimeArchitecture() but feel free to protest.

Other than that, it's good to go

@crosbymichael
Copy link
Contributor

LGTM

crosbymichael added a commit that referenced this pull request Nov 17, 2015
Carry#13921 : Expand /info: Expose OSType (GOOS), Architecture (GOARCH)
@crosbymichael crosbymichael merged commit 104dab8 into moby:master Nov 17, 2015
@vdemeester vdemeester deleted the pr-13921 branch November 18, 2015 05:43
thaJeztah added a commit to thaJeztah/docker that referenced this pull request Nov 25, 2015
These changes were made as part of moby#17478
but inadvertently added to the v1.21 API version.

Also added a short description to the API changelog.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added this to the 1.10 milestone Nov 25, 2015
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.

9 participants