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

Determine system model to get credentials for windows nodes #80764

Merged
merged 1 commit into from
Aug 2, 2019

Conversation

liyanhui1228
Copy link
Contributor

@liyanhui1228 liyanhui1228 commented Jul 30, 2019

What type of PR is this?

/kind bug

What this PR does / why we need it:

In kubernetes, we get credentials from the metadata server on GCE VMs:
https://github.com/kubernetes/kubernetes/blob/v1.15.0-alpha.2/pkg/credentialprovider/gcp/metadata.go
The credentials are used to pull container images.

But it checks whether it's running on GCE VM by looking at a Linux specific file, which not works on Windows. This PR added the check for Windows node.

Determine system model to get credentials for windows nodes.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 30, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @liyanhui1228. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 30, 2019
@k8s-ci-robot k8s-ci-robot requested review from thockin and vishh July 30, 2019 20:27
@liyanhui1228
Copy link
Contributor Author

/assign @yujuhong

@yujuhong
Copy link
Contributor

/ok-to-test

Could you add a release note?

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note-none Denotes a PR that doesn't merit a release note. labels Jul 30, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Jul 30, 2019
@liyanhui1228
Copy link
Contributor Author

Looks like the test failures are related to this. Not sure why it didn't pick up those fixes.

@yujuhong
Copy link
Contributor

Looks good!

@yujuhong
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 30, 2019
var name string

if runtime.GOOS == "windows" {
data, err := exec.Command("wmic", "computersystem", "get", "model").Output()
Copy link
Contributor

Choose a reason for hiding this comment

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

/cc @pjh

Copy link
Contributor

Choose a reason for hiding this comment

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

I checked with a couple team members and they approved this approach. There's a small chance the result will be different in a shielded VM (with UEFI firmware instead of BIOS) - I'll test it out and will let you know if there's a difference (but don't block merge on this).

@k8s-ci-robot k8s-ci-robot requested a review from pjh July 30, 2019 22:06
@yujuhong
Copy link
Contributor

/retest

1 similar comment
@liyanhui1228
Copy link
Contributor Author

/retest

@yujuhong
Copy link
Contributor

/assign @dchen1107
for approval

@pjh
Copy link
Contributor

pjh commented Jul 31, 2019

/lgtm

@yujuhong yujuhong added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/gcp and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 1, 2019
@dchen1107
Copy link
Member

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dchen1107, liyanhui1228

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 2, 2019
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit 56d7920 into kubernetes:master Aug 2, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.16 milestone Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants