rancher / turtles

Rancher CAPI extension
https://turtles.docs.rancher.com
Apache License 2.0
41 stars 15 forks source link

[BUG] Additional management v3 cluster created after upgrade #583

Closed cpinjani closed 1 week ago

cpinjani commented 3 weeks ago

Description: Additional management v3 cluster created after upgrade, resulting in failed sequential v3 auto-migration.

What steps did you take and what happened?

  1. Install turtles v0.8.0 (v3 option disabled) and import CAPI cluster

image

  1. Upgrade turtles to latest dev version by keeping settings to default (v3 is auto-enabled to true)

image

  1. An additional v3 cluster is created and corresponding v1 cluster

image

$ kubectl get cluster.provisioning.cattle.io -A
NAMESPACE       NAME            READY   KUBECONFIG
default         cluster1-capi   true    cluster1-capi-kubeconfig
fleet-default   c-7q8g7                 
fleet-local     local           true    local-kubeconfig

$ kubectl get cluster.management.cattle.io -A
NAME           AGE
c-7q8g7        92s
c-m-6tl52brj   7m6s
local          16m
  1. Update turtles settings and set managementv3-cluster-migration to true and let the operation complete. The migrated cluster is Unavailable in Rancher.

image

$ kubectl get cluster.management.cattle.io -A
NAME      AGE
c-7q8g7   6m20s
local     20m

$ kubectl get cluster.provisioning.cattle.io -A
NAMESPACE       NAME      READY   KUBECONFIG
fleet-default   c-7q8g7   true    c-7q8g7-kubeconfig
fleet-local     local     true    local-kubeconfig

What did you expect to happen?

No additional cluster creation after upgrade from v0.8.0

How to reproduce it?

Steps mentioned above.

Rancher Turtles version

Dev version - d7ecf2b Rancher - v2.8-head

Anything else you would like to add?

While upgrade from v0.8.0 if both managementv3-cluster, managementv3-cluster-migration = true, then migration completes successfully.

Label(s) to be applied

/kind bug

furkatgofurov7 commented 3 weeks ago

@cpinjani can you please try the latest version of Turtles and see if this is still the case?

cpinjani commented 3 weeks ago

Validated on v0.9.0, the issue is not occurring. Filed a separate issue for failure on Step 4 (https://github.com/rancher/turtles/issues/588)

Cluster details after upgrade:

$ kubectl get cluster.provisioning.cattle.io -A
NAMESPACE     NAME            READY   KUBECONFIG
default       cluster1-capi   true    cluster1-capi-kubeconfig
fleet-local   local           true    local-kubeconfig

$ kubectl get cluster.management.cattle.io -A
NAME           AGE
c-m-2j2gwvd4   14m
local          27m
furkatgofurov7 commented 1 week ago

@cpinjani I am closing this, steps 1-3 are not issue anymore after upgrading to the new release v0.9.0 and only Step 4 was, but that has a separate issue: #588

Please re-open if you face the same issue again in the future.

/close