Skip to content

Conversation

@feiskyer
Copy link
Member

@feiskyer feiskyer commented Dec 5, 2018

What type of PR is this?

Uncomment only one, leave it on its own line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

Only use the first IP address got from instance metadata. This is because Azure CNI would set up a list of IP addresses in instance metadata, while only the first one is the Node's IP.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Need cherry pick to 1.10-1.13.

Does this PR introduce a user-facing change?:

Only use the first IP address got from instance metadata. This is because Azure CNI would set up a list of IP addresses in instance metadata, while only the first one is the Node's IP.

/sig azure
/priority critial-urgent

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. sig/azure cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 5, 2018
@feiskyer feiskyer added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Dec 5, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feiskyer

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

The pull request process is described here

Details 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 Dec 5, 2018
@feiskyer
Copy link
Member Author

feiskyer commented Dec 5, 2018

/assign @khenidak @andyzhangx

@k8s-ci-robot k8s-ci-robot added the sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. label Dec 5, 2018
Copy link

@aixeshunter aixeshunter left a comment

Choose a reason for hiding this comment

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

LGTM

@karataliu
Copy link
Contributor

I doubt the issue is related to empty check removed below:
3cea6dc#diff-28e24b2bbb610464dba4602ca9e54c1eL94

Also consider the comment there:
// Fall back to ARM API if the address is empty string.
// TODO: this is a workaround because IMDS is not stable enough.
// It should be removed after IMDS fixing the issue.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 5, 2018
@feiskyer
Copy link
Member Author

feiskyer commented Dec 5, 2018

I doubt the issue is related to empty check removed below: 3cea6dc#diff-28e24b2bbb610464dba4602ca9e54c1eL94

There's no metadata response code check before, hence that may happen because calling of metadata service may be failed. PR #70353 adds the metadata response code checking, so I think it shouldn't be happening again. However, if that's still the case, current logic should report errors if the IP is empty.

@feiskyer feiskyer removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 5, 2018
Only use the first IP address got from instance metadata. This is
because Azure CNI would setup a list of IP addresses in instance metata,
while only the first one is the Node's IP.
@karataliu
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 Dec 5, 2018
@feiskyer
Copy link
Member Author

feiskyer commented Dec 5, 2018

/retest

}
}

if len(addresses) == 1 {
Copy link
Member

Choose a reason for hiding this comment

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

a little confused about the number, why it's 1 not 0, more comments here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hostname is already included above

@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 comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit a0c2788 into kubernetes:master Dec 5, 2018
@feiskyer feiskyer deleted the fix-ip branch December 6, 2018 01:15
k8s-ci-robot added a commit that referenced this pull request Dec 7, 2018
…36-upstream-release-1.11

Automated cherry pick of #71736: Fix Azure node's internal IP address
k8s-ci-robot added a commit that referenced this pull request Dec 8, 2018
…36-upstream-release-1.12

Automated cherry pick of #71736: Fix Azure node's internal IP address
k8s-ci-robot added a commit that referenced this pull request Dec 10, 2018
…36-upstream-release-1.13

Automated cherry pick of #71736: Fix Azure node's internal IP address
k8s-ci-robot added a commit that referenced this pull request Dec 10, 2018
…36-upstream-release-1.10

Automated cherry pick of #71736: Fix Azure node's internal IP address
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. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants