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

Respect kube_override_hostname during removal/upgrade #6347

Merged

Conversation

mqasimsarfraz
Copy link
Contributor

@mqasimsarfraz mqasimsarfraz commented Jun 30, 2020

What type of PR is this?
/kind bug
What this PR does / why we need it:
kubespray allows using kube_override_hostname which is then passed to kubelet and other components and hence commands like kubectl should respect the overridden names.

Which issue(s) this PR fixes:

Fixes #2088 (kindof)

Does this PR introduce a user-facing change?:

Nodes will now be properly drained during upgrade while using `kube_override_hostname`

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 30, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @mqasimsarfraz. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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 Jun 30, 2020
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 30, 2020
@floryut
Copy link
Member

floryut commented Jun 30, 2020

/ok-to-test
/lgtm

@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 Jun 30, 2020
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 30, 2020
@floryut
Copy link
Member

floryut commented Jun 30, 2020

/lgtm cancel

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 30, 2020
@@ -16,7 +16,7 @@
--ignore-daemonsets
--grace-period {{ drain_grace_period }}
--timeout {{ drain_timeout }}
--delete-local-data {{ item }}
--delete-local-data {{ kube_override_hostname|default(item) }}
Copy link
Member

Choose a reason for hiding this comment

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

How does this work with a loop on inventory ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. It seems broken. I tested on single node setup so that went through. Let me push a fix. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@floryut I have updated the PR. Can you please have a second look? :)

@mqasimsarfraz
Copy link
Contributor Author

@floryut Can you please have a look again?

@floryut
Copy link
Member

floryut commented Jul 6, 2020

@floryut Can you please have a look again?

Looks indeed good to me that way
/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 6, 2020
@Miouge1
Copy link
Contributor

Miouge1 commented Jul 13, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Miouge1, MQasimSarfraz

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 Jul 13, 2020
@k8s-ci-robot k8s-ci-robot merged commit feeb701 into kubernetes-sigs:master Jul 13, 2020
erulabs added a commit to kubesail/kubespray that referenced this pull request Jul 19, 2020
* 'master' of https://github.com/kubernetes-sigs/kubespray:
  Add a way to deploy cilium alongside another CNI (kubernetes-sigs#6373)
  Cleanup old build-cephfs-provisioner.yml playbook (kubernetes-sigs#6418)
  Always enable GitLab CI artifacts for cluster-dump (kubernetes-sigs#6412)
  Remove allow-release-candidate-upgrades already include in experimental-upgrades flag (kubernetes-sigs#6349)
  add calico-node selinux (kubernetes-sigs#6359)
  Add oomichi to reviwers of MetalLB addon (kubernetes-sigs#6393)
  Respect kube_override_hostname during removal/upgrade (kubernetes-sigs#6347)
  Fixed fedora modular repos activation for fcos (kubernetes-sigs#6300)
  Fix kube-proxy post deployment removal (kubernetes-sigs#5554)
  Remove old csi-attacher flag and fix RBAC for Cinder CSI (kubernetes-sigs#6358)
  Update cilium minimum kernel preinstall check (kubernetes-sigs#6376)
  Add readiness probe to dns-autoscaler (kubernetes-sigs#6382)
  Add Fedora CoreOS kubevirt image for tests (kubernetes-sigs#6337)
  allow kubeadm to upgrade etcd (kubernetes-sigs#6345)
  crio: harden downloads with retry (kubernetes-sigs#6374)
  Add workaround with include_task for mitogen (kubernetes-sigs#6312)
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Sep 16, 2020
…s#6347)

* respect kube_override_hostname during removal/upgrade

* Use hostvars in loop
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. 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.

Support for custom kube node hostname during upgrades for AWS cloud provider
5 participants