Skip to content

CKS: listKubernetesClusters etcdips is empty once cloud.kubernetes.etcd.node.start.port changes #14826

Backlog

Description

@bhouse-nexthop

problem

listKubernetesClusters returns an empty etcdips for clusters with dedicated etcd nodes.

The response keeps only etcd node port forwarding rules whose public port equals the current value of cloud.kubernetes.etcd.node.start.port. Etcd rules are created once, at start port + i (KubernetesClusterStartWorker#setupKubernetesEtcdNetworkRules), so:

case result
several etcd nodes only the first node's rule (start port + 0) can match; the others' rules never match
setting changed after the cluster was created no rule matches, etcdips is empty

versions

4.22 (code in KubernetesClusterManagerImpl#createKubernetesClusterResponse), also on main.

The steps to reproduce the bug

  1. Create a CKS cluster on an isolated network with etcdnodes >= 1.
  2. Change cloud.kubernetes.etcd.node.start.port (e.g. 50000 -> 51000).
  3. listKubernetesClusters id=<cluster>: etcdips is empty.

What to do about it?

Pick each etcd node's rules by what they point at (tcp to port 22, as the start worker creates them), not by the setting's current value.

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