Skip to content

CKS: a node removed with removeNodesFromKubernetesCluster never rejoins when added again #14795

Open

Description

@bhouse-nexthop

problem

A VM removed from a CKS cluster and added back never rejoins.

step result
removeNodesFromKubernetesCluster on an external node node drained, deleted, kubeadm reset -f on the VM
addNodesToKubernetesCluster with the same VM user data replaced, VM rebooted
setup-kube-system / deploy-kube-system on boot exit with Already provisioned! because /home/cloud/success is still there
add job waits for a Ready node until cloud.kubernetes.cluster.add.node.timeout, fails

Manual workaround on the VM: kubeadm reset -f, rm /home/cloud/success, rerun setup-kube-system and deploy-kube-system.

versions

4.22 (also main). KVM, isolated network, CKS cluster with external nodes.

The steps to reproduce the bug

  1. Create a CKS cluster.
  2. Deploy a VM from a CKS-ready template on the cluster network and add it with addNodesToKubernetesCluster. It joins.
  3. Remove it with removeNodesFromKubernetesCluster.
  4. Add it again with addNodesToKubernetesCluster.

What to do about it?

Reset the VM's earlier provisioning state on add, in the same SSH step that already clears the cloud-init semaphores.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions