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

Removed default hostname-override #10595

Closed

Conversation

DOboznyi
Copy link
Contributor

There's no sense in hostname-override because it's not working when cloud-provider flag set.

Fix #10590

Signed-off-by: Dmytro Oboznyi dmytro.oboznyi@syncier.com

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 16, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @DOboznyi. 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 the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 16, 2021
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 16, 2021
@olemarkus
Copy link
Member

/ok-to-test

@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. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 16, 2021
@DOboznyi
Copy link
Contributor Author

/retest

@DOboznyi
Copy link
Contributor Author

@olemarkus why such tests failing? How can I fix them?

@olemarkus
Copy link
Member

Run ./hack/update-expected

@DOboznyi
Copy link
Contributor Author

/hack/update-expected

@olemarkus
Copy link
Member

It's a script found in the git repos

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 17, 2021
@DOboznyi
Copy link
Contributor Author

/retest

@DOboznyi DOboznyi force-pushed the Remove-default-hostname-override branch from ba40cc8 to 228493b Compare January 17, 2021 18:18
@k8s-ci-robot k8s-ci-robot added do-not-merge/contains-merge-commits and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 17, 2021
@DOboznyi DOboznyi force-pushed the Remove-default-hostname-override branch from 228493b to 4a1ec5c Compare January 17, 2021 19:04
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/contains-merge-commits size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 17, 2021
@DOboznyi DOboznyi force-pushed the Remove-default-hostname-override branch from 4a1ec5c to afc5b57 Compare January 17, 2021 19:17
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 17, 2021
@DOboznyi DOboznyi force-pushed the Remove-default-hostname-override branch 2 times, most recently from e1aa07a to 1ee1138 Compare January 17, 2021 19:21
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: HELLRAZOR6666
To complete the pull request process, please assign mikesplain after the PR has been reviewed.
You can assign the PR to them by writing /assign @mikesplain in a comment when ready.

The full list of commands accepted by this bot can be found 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

@DOboznyi DOboznyi force-pushed the Remove-default-hostname-override branch from a160531 to a073a0d Compare February 23, 2021 11:52
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2021
@DOboznyi DOboznyi force-pushed the Remove-default-hostname-override branch from a073a0d to 8243566 Compare February 23, 2021 12:09
@DOboznyi
Copy link
Contributor Author

DOboznyi commented Feb 23, 2021

@olemarkus CI tests removed, could you help with e2e failures?

@olemarkus
Copy link
Member

The cert is wrong. You see the error:

I0223 12:18:32.931137    4277 kubelet_node_status.go:71] Attempting to register node ip-172-20-59-153.eu-west-1.compute.internal
E0223 12:18:32.933453    4277 kubelet_node_status.go:93] Unable to register node "ip-172-20-59-153.eu-west-1.compute.internal" with API server: nodes "ip-172-20-59-153.eu-west-1.compute.internal" is forbidden: node "ip-172-20-59-153" is not allowed to modify node "ip-172-20-59-153.eu-west-1.compute.internal"

Further down there is

I0223 12:18:33.336972    4277 csi_plugin.go:1016] Failed to contact API server when waiting for CSINode publishing: csinodes.storage.k8s.io "ip-172-20-59-153.eu-west-1.compute.internal" is forbidden: User "system:node:ip-172-20-59-153" cannot get resource "csinodes" in API group "storage.k8s.io" at the cluster scope: can only access CSINode with the same name as the requesting node

Use r system:node:ip-172-20-59-153 should be `system:node:ip-172-20-59-153..eu-west-1.compute.internal"

@@ -484,79 +481,16 @@ func (c *NodeupModelContext) BuildPrivateKeyTask(ctx *fi.ModelBuilderContext, na
// NodeName returns the name of the local Node, as it will be created in k8s
func (c *NodeupModelContext) NodeName() (string, error) {
Copy link
Member

Choose a reason for hiding this comment

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

This function need to return FQDN as it is used for the node cert name.See my previous comment.

Copy link
Contributor Author

@DOboznyi DOboznyi Feb 24, 2021

Choose a reason for hiding this comment

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

Okay, i'll return code which return FQDN, thanks

@DOboznyi
Copy link
Contributor Author

@olemarkus seems as previous problem gone. Are the other tests critical?

@DOboznyi
Copy link
Contributor Author

/retest

1 similar comment
@olemarkus
Copy link
Member

/retest

if c.IsMaster && c.Cluster.Spec.MasterKubelet.HostnameOverride != "" {
hostnameOverride = c.Cluster.Spec.MasterKubelet.HostnameOverride
}
hostnameOverride := string('@') + c.Cluster.Spec.CloudProvider
Copy link
Member

Choose a reason for hiding this comment

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

I assume this is just temporary for testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How should i change this part?

Copy link
Member

Choose a reason for hiding this comment

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

Isn't the goal of completely getting rid of hostnameOverride?

@@ -208,6 +195,9 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {
if _, found := clusterSpec.Kubelet.FeatureGates["CSIMigrationAWS"]; !found {
clusterSpec.Kubelet.FeatureGates["CSIMigrationAWS"] = "true"
}
if _, found := clusterSpec.Kubelet.FeatureGates["CSIMigrationAWSComplete"]; !found {
clusterSpec.Kubelet.FeatureGates["CSIMigrationAWSComplete"] = "true"
}
Copy link
Member

Choose a reason for hiding this comment

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

Can you rebase this against master? If not you may get into conflicts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Dmytro Oboznyi added 2 commits March 1, 2021 12:13
Fixed tests
Fix evaluateHostnameOverride
Deprecated hostnameOverride for kubelet
Removed hostname-override for kube-proxy
Changed hostname to actual value
Remove EvaluateHostnameOverride
Update test
Update bazel
Removed tests

Signed-off-by: Dmytro Oboznyi <dmytro.oboznyi@syncier.com>
Signed-off-by: Dmytro Oboznyi <dmytro.oboznyi@syncier.com>
@DOboznyi DOboznyi force-pushed the Remove-default-hostname-override branch from e1d06b7 to 0aa1be1 Compare March 1, 2021 10:13
Fix
Signed-off-by: Dmytro Oboznyi <dmytro.oboznyi@syncier.com>
if c.IsMaster && c.Cluster.Spec.MasterKubelet.HostnameOverride != "" {
hostnameOverride = c.Cluster.Spec.MasterKubelet.HostnameOverride
}
hostnameOverride := string('@') + c.Cluster.Spec.CloudProvider

nodeName, err := EvaluateHostnameOverride(hostnameOverride)
Copy link
Member

Choose a reason for hiding this comment

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

Is this now the only call in the code going to EvaluateHostnameOverride? if so, I think you can inline the function here. NodeName is a much more appropriate name than EvaluateHostnameOverride for what this function is used for now.

wdyt?

@k8s-ci-robot
Copy link
Contributor

@DOboznyi: PR needs rebase.

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 the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 6, 2021
@hakman
Copy link
Member

hakman commented May 21, 2021

Just wanted to leave a comment here that this may have gone against what upstream was thinking.
Seems that the --cloud-provider flag will be removed soon, as discussed in kubernetes/kubernetes#90408.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 19, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 18, 2021
@k8s-ci-robot
Copy link
Contributor

@DOboznyi: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kops-e2e-cni-calico ec9de48 link /test pull-kops-e2e-cni-calico
pull-kops-e2e-cni-weave ec9de48 link /test pull-kops-e2e-cni-weave
pull-kops-e2e-k8s-containerd e2b9f47 link /test pull-kops-e2e-k8s-containerd
pull-kops-e2e-kubernetes-aws e2b9f47 link /test pull-kops-e2e-kubernetes-aws
pull-kops-e2e-cni-amazonvpc e2b9f47 link /test pull-kops-e2e-cni-amazonvpc
pull-kops-e2e-cni-flannel e2b9f47 link true /test pull-kops-e2e-cni-flannel
pull-kops-e2e-cni-canal e2b9f47 link true /test pull-kops-e2e-cni-canal

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/addons area/api area/channels area/documentation area/nodeup area/provider/aws Issues or PRs related to aws provider area/provider/azure Issues or PRs related to azure provider area/provider/openstack Issues or PRs related to openstack provider area/provider/spotinst Issues or PRs related to spotinst provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possibility to disable hostname-override in kubelet
6 participants