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

Race condition in container image CI when the commit has multiple tags #350

Closed
Heiko-san opened this issue Aug 21, 2023 · 20 comments · Fixed by #360 or #368
Closed

Race condition in container image CI when the commit has multiple tags #350

Heiko-san opened this issue Aug 21, 2023 · 20 comments · Fixed by #360 or #368
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Heiko-san
Copy link

Hi,

we created an additional datastore of type etcd using your helm chart clastix/kamaji-etcd.
We then tried to migrate a cluster from the old to the new datastore (both of type etcd), using this tutorial: https://kamaji.clastix.io/guides/datastore-migration/

This did not work as expected, the migration job gets an image pull backoff:

Events:
  Type     Reason     Age                   From               Message
  ----     ------     ----                  ----               -------
  Normal   Scheduled  6m4s                  default-scheduler  Successfully assigned kamaji-system/migrate-cust1-capv-foo-5jhqw to capv-kamaji-mgmt-md-0-788d8649ffxfd49c-9sjt2
  Normal   Pulling    4m39s (x4 over 6m3s)  kubelet            Pulling image "clastix/kamaji:vhelm-v0.12.4"
  Warning  Failed     4m38s (x4 over 6m3s)  kubelet            Failed to pull image "clastix/kamaji:vhelm-v0.12.4": rpc error: code = NotFound desc = failed to pull and unpack image "docker.io/clastix/kamaji:vhelm-v0.12.4": failed to resolve reference "docker.io/clastix/kamaji:vhelm-v0.12.4": docker.io/clastix/kamaji:vhelm-v0.12.4: not found
  Warning  Failed     4m38s (x4 over 6m3s)  kubelet            Error: ErrImagePull
  Warning  Failed     4m12s (x6 over 6m2s)  kubelet            Error: ImagePullBackOff
  Normal   BackOff    56s (x20 over 6m2s)   kubelet            Back-off pulling image "clastix/kamaji:vhelm-v0.12.4"

It seems the calculation of the version of the image has an error. kamaji:vhelm-v0.12.4 looks like it tries to find the version (here v0.3.3) by looking into the helm chart (here v0.12.4), but the result doesnt create the correct string.

We use kamaji v0.3.3 together with cluster-api v1.5.0 with infrastructure-vsphere v1.7.0 and your kamaji plugin control-plane-kamaji v0.3.0.

@prometherion
Copy link
Member

Thanks for the report, although this issue must be open on clastix/kamaji since it's clearly a Kamaji scoped.

@prometherion prometherion transferred this issue from clastix/kamaji-etcd Aug 21, 2023
@prometherion prometherion reopened this Aug 21, 2023
@prometherion
Copy link
Member

@Heiko-san I think you're building the image on your own using a private repository, and referring to a custom tag.

The migration feature is expecting a 1:1 parity with the public registry, as you can see here:

cmd.Flags().StringVar(&migrateJobImage, "migrate-image", fmt.Sprintf("clastix/kamaji:v%s", internal.GitTag), "Specify the container image to launch when a TenantControlPlane is migrated to a new datastore.")

Please, notice the internal.GitTag variable which is populated at build time

kamaji/Makefile

Lines 163 to 169 in e34fc18

docker-build: ## Build docker image with the manager.
docker build -t ${IMG} . --build-arg GIT_HEAD_COMMIT=$(GIT_HEAD_COMMIT) \
--build-arg GIT_TAG_COMMIT=$(GIT_TAG_COMMIT) \
--build-arg GIT_MODIFIED=$(GIT_MODIFIED) \
--build-arg GIT_REPO=$(GIT_REPO) \
--build-arg GIT_LAST_TAG=$(VERSION) \
--build-arg BUILD_DATE=$(BUILD_DATE)

For such use-cases I suggest you in using the CLI argument --migrate-image in order to specify a custom image hosted on your registry.

Please, let me know if it works for you.

@prometherion prometherion self-assigned this Aug 22, 2023
@Heiko-san
Copy link
Author

No, we don't build images on our own here.
We did not do anything special besides what the doku said.
The controller spawns the migration pod with a wrong tag/version (kamaji:vhelm-v0.12.4) and because the tag is vhelm-v0.12.4 we assumed that it tries to look into the helm chart v0.12.4 to derive the kamaji version from there.
The resulting tag string however seems broken.

@prometherion
Copy link
Member

@Heiko-san the issue is that we don't have any published image with that prefix: https://hub.docker.com/r/clastix/kamaji/tags?page=1&name=helm

As explained here the resulting tag is extracted from the internal.GitTag variable which is injected with the Docker build argument GIT_LAST_TAG which is extracted from here.

VERSION ?= 0.3.3

I'm running Kamaji with this version:

NAME    NAMESPACE       REVISION        UPDATED                                         STATUS          CHART           APP VERSION
kamaji  kamaji-system   1               2023-08-21 14:54:30.667517111 +0200 CEST        deployed        kamaji-0.12.4   v0.3.3     

I have the following datastores:

NAME        DRIVER   AGE
default     etcd     2d
etcd-nvme   etcd     8s

I can start the migration of the following TCP:

NAME                       VERSION    STATUS   CONTROL-PLANE ENDPOINT   KUBECONFIG                                  DATASTORE   AGE
capi-quickstart-kubevirt   v1.23.10   Ready    172.18.255.200:6443      capi-quickstart-kubevirt-admin-kubeconfig   default     4h53m

After switching the Datastore, this is the watch output of the TCP:

NAME                       VERSION    STATUS      CONTROL-PLANE ENDPOINT   KUBECONFIG                                  DATASTORE   AGE
capi-quickstart-kubevirt   v1.23.10   Migrating   172.18.255.200:6443      capi-quickstart-kubevirt-admin-kubeconfig   default     4h59m
capi-quickstart-kubevirt   v1.23.10   Migrating   172.18.255.200:6443      capi-quickstart-kubevirt-admin-kubeconfig   default     4h59m
capi-quickstart-kubevirt   v1.23.10   Migrating   172.18.255.200:6443      capi-quickstart-kubevirt-admin-kubeconfig   etcd-nvme   4h59m
capi-quickstart-kubevirt   v1.23.10   Migrating   172.18.255.200:6443      capi-quickstart-kubevirt-admin-kubeconfig   etcd-nvme   4h59m
capi-quickstart-kubevirt   v1.23.10   Migrating   172.18.255.200:6443      capi-quickstart-kubevirt-admin-kubeconfig   etcd-nvme   4h59m
capi-quickstart-kubevirt   v1.23.10   Migrating   172.18.255.200:6443      capi-quickstart-kubevirt-admin-kubeconfig   etcd-nvme   4h59m
capi-quickstart-kubevirt   v1.23.10   Migrating   172.18.255.200:6443      capi-quickstart-kubevirt-admin-kubeconfig   etcd-nvme   4h59m
capi-quickstart-kubevirt   v1.23.10   Migrating   172.18.255.200:6443      capi-quickstart-kubevirt-admin-kubeconfig   etcd-nvme   4h59m
capi-quickstart-kubevirt   v1.23.10   Ready       172.18.255.200:6443      capi-quickstart-kubevirt-admin-kubeconfig   etcd-nvme   4h59m
capi-quickstart-kubevirt   v1.23.10   Ready       172.18.255.200:6443      capi-quickstart-kubevirt-admin-kubeconfig   etcd-nvme   4h59m

With that said, I think something is "broken" in your environment, and I don't have enough details to understand what exactly is.

@Heiko-san
Copy link
Author

this is what I've done to reproduce the issue:

  • setup before
kg datastores.kamaji.clastix.io
#NAME      DRIVER   AGE
#default   etcd     7d
kg tcp -A                      
#NAMESPACE           NAME                VERSION   STATUS   CONTROL-PLANE ENDPOINT   KUBECONFIG                           DATASTORE   AGE
#bcp-cluster-test1   bcp-cluster-test1   v1.25.7   Ready    10.123.1.31:6443         bcp-cluster-test1-admin-kubeconfig   default     3h55m
  • create a new datastore
# this is the datastore created for issue 43 testing
k create ns kamaji-etcd-3
kubens kamaji-etcd-3
k apply -f secret.yaml
helm install kamaji-etcd-3 charts/kamaji-etcd -n kamaji-etcd-3 -f values.yaml
# when its ready:
kg datastores.kamaji.clastix.io
#NAME            DRIVER   AGE
#default         etcd     7d1h
#kamaji-etcd-3   etcd     35m
  • values.yaml
replicas: 3
serviceAccount:
  create: true
  name: ""
image:
  repository: quay.io/coreos/etcd
  tag: ""
  pullPolicy: IfNotPresent
peerApiPort: 2380
clientPort: 2379
metricsPort: 2381
livenessProbe: {}
extraArgs: []
autoCompactionMode: periodic
autoCompactionRetention: 5m
snapshotCount: "10000"
persistenVolumeClaim:
  size: 5Gi
  storageClassName: ""
  accessModes:
  - ReadWriteOnce
  customAnnotations: {}
defragmentation:
backup:
  enabled: true
  all: false
  snapshotNamePrefix: kamaji-etcd-3
  snapshotDateFormat: $(date +%Y%m%d-%H%M)
  s3:
    url: https://s3.our.domain
    bucket: kamaji/kamaji-etcd-3/
    accessKey:
      valueFrom:
        secretKeyRef:
          key: access_key
          name: minio-key
    secretKey:
      valueFrom:
        secretKeyRef:
          key: secret_key
          name: minio-key
    image:
      repository: minio/mc
      tag: "RELEASE.2022-11-07T23-47-39Z"
      pullPolicy: IfNotPresent
podLabels:
  application: kamaji-etcd-3
podAnnotations: {}
securityContext:
  allowPrivilegeEscalation: false
priorityClassName: system-cluster-critical
resources:
  limits: {}
  requests: {}
nodeSelector:
  kubernetes.io/os: linux
tolerations: []
affinity: {}
topologySpreadConstraints: []
datastore:
  enabled: true
serviceMonitor:
  enabled: false
  namespace: ''
  labels: {}
  annotations: {}
  matchLabels: {}
  targetLabels: []
  serviceAccount:
    name: etcd
    namespace: etcd-system
  endpoint:
    interval: "15s"
    scrapeTimeout: ""
    metricRelabelings: []
    relabelings: []
alerts:
  enabled: false
  namespace: ''
  labels: {}
  annotations: {}
  rules: []
  • trying to migrate
kubens bcp-cluster-test1
kubectl patch --type merge tcp bcp-cluster-test1 -p '{"spec": {"dataStore": "kamaji-etcd-3"}}'
kubectl get tcp -w
bcp-cluster-test1   v1.25.7   Ready    10.123.1.31:6443         bcp-cluster-test1-admin-kubeconfig   default     5h30m
bcp-cluster-test1   v1.25.7   Ready    10.123.1.31:6443         bcp-cluster-test1-admin-kubeconfig   default     5h30m
bcp-cluster-test1   v1.25.7   Migrating   10.123.1.31:6443         bcp-cluster-test1-admin-kubeconfig   default     5h30m
bcp-cluster-test1   v1.25.7   Migrating   10.123.1.31:6443         bcp-cluster-test1-admin-kubeconfig   default     5h30m
# stuck here ...
kg -n kamaji-system pod
#NAME                                                READY   STATUS             RESTARTS       AGE
#capi-kamaji-controller-manager-77df58dcdd-q7p4s     1/1     Running            4 (119m ago)   23h
#etcd-0                                              1/1     Running            0              45h
#etcd-1                                              1/1     Running            0              44h
#etcd-2                                              1/1     Running            0              44h
#kamaji-6fb5f95bb7-j4smm                             1/1     Running            3 (119m ago)   24h
#migrate-bcp-cluster-test1-bcp-cluster-test1-6m7gb   0/1     ImagePullBackOff   0              71s
kg -n kamaji-system pod migrate-bcp-cluster-test1-bcp-cluster-test1-6m7gb -o yaml | yq -r '.spec.containers[0].image'
#clastix/kamaji:vhelm-v0.12.4

@Heiko-san
Copy link
Author

Heiko-san commented Aug 25, 2023

helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install \
  cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.11.0 \
  --set installCRDs=true
helm repo add clastix https://clastix.github.io/charts
helm repo update
helm install kamaji clastix/kamaji -n kamaji-system --create-namespace

@prometherion
Copy link
Member

Still unable to replicate, @Heiko-san.

May I ask you to share the Kamaji first log lines?

kubectl -n kamaji-system logs deployments/kamaji --tail=-1|head -n6

Also, sharing the image running as Kamaji manager: kubectl get pods -l app.kubernetes.io/instance=kamaji -l app.kubernetes.io/component=controller-manager -o jsonpath='{.items[0].spec.containers[0].image}'

@Heiko-san
Copy link
Author

Heiko-san commented Aug 25, 2023

kubectl -n kamaji-system get pods -l app.kubernetes.io/instance=kamaji -l app.kubernetes.io/component=controller-manager -o jsonpath='{.items[0].spec.containers[0].image}'
#clastix/kamaji:v0.3.3
kubectl -n kamaji-system logs deployments/kamaji --tail=-1|head -n6
#2023/08/25 09:05:44 maxprocs: Updating GOMAXPROCS=1: using minimum #allowed GOMAXPROCS
#2023-08-25T09:05:45Z	INFO	setup	Kamaji version helm-v0.12.4 e34fc18
#2023-08-25T09:05:45Z	INFO	setup	Build from: https://github.com/clastix/kamaji
#2023-08-25T09:05:45Z	INFO	setup	Build date: 2023-08-08T09:03:13
#2023-08-25T09:05:45Z	INFO	setup	Go Version: go1.19.12
#2023-08-25T09:05:45Z	INFO	setup	Go OS/Arch: linux/amd64

I guess this is the source of the problem (?)

2023-08-25T09:05:45Z	INFO	setup	Kamaji version helm-v0.12.4 e34fc18

We may also look at the setup using teams if it helps.
But as I said: We didn't do anything special... no values.yaml etc., just the helm command from docs.

@prometherion prometherion added bug Something isn't working and removed blocked-needs-validation labels Aug 26, 2023
@prometherion prometherion changed the title BUG Datastore migration seems to be broken Race condition in container image CI when the commit has multiple tags Aug 26, 2023
@prometherion
Copy link
Member

prometherion commented Aug 26, 2023

@Heiko-san thanks, I noticed a bug in the container CI automation, which is different from the one computed through the Makefile:

VERSION=$(git describe --abbrev=0 --tags)

VERSION ?= 0.3.3

I'll try to release a container image for v0.3.3 which has this racy condition, as well as a hotfix for this CI automation.

@prometherion
Copy link
Member

@Heiko-san the v0.3.3 rebuilt version has been released on the Docker hub, and the version has been computed correctly this time.

#42 [linux/arm64 builder 12/12] RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build     -ldflags "-X github.com/clastix/kamaji/internal.GitRepo=https://github.com/clastix/kamaji -X github.com/clastix/kamaji/internal.GitTag=v0.3.3 -X github.com/clastix/kamaji/internal.GitCommit=e34fc18 -X github.com/clastix/kamaji/internal.GitDirty= -X github.com/clastix/kamaji/internal.BuildTime=2023-08-08T09:03:13"     -a -o kamaji main.go

Thanks for the detailed bug report: this was a subtle bug to catch!

@Heiko-san
Copy link
Author

Heiko-san commented Aug 28, 2023

Hi @prometherion ,
I rollout restarted the kamaji pods and now it reports the correct version:

kubectl -n kamaji-system logs deployments/kamaji --tail=-1|head -n6
2023/08/28 08:09:16 maxprocs: Updating GOMAXPROCS=1: using minimum allowed GOMAXPROCS
2023-08-28T08:09:17Z	INFO	setup	Kamaji version v0.3.3 e34fc18

I was not sure if restart would suffice (or if we had to reinstall), since you wrote it's a race contition. But version seems to be correct even after multiple restarts.

However the resulting version on the migration pod still has an issue:

        message: 'rpc error: code = NotFound desc = failed to pull and unpack image
          "docker.io/clastix/kamaji:vv0.3.3": failed to resolve reference "docker.io/clastix/kamaji:vv0.3.3":
          docker.io/clastix/kamaji:vv0.3.3: not found'

@Heiko-san
Copy link
Author

Same after we helm uninstalled kamaji and reinstalled it fresh.

kubectl -n kamaji-system logs deployments/kamaji --tail=-1|head -n6                           
#2023/08/28 11:56:27 maxprocs: Updating GOMAXPROCS=1: using minimum allowed GOMAXPROCS
#2023-08-28T11:56:28Z	INFO	setup	Kamaji version v0.3.3 e34fc18
#2023-08-28T11:56:28Z	INFO	setup	Build from: https://github.com/clastix/kamaji
#2023-08-28T11:56:28Z	INFO	setup	Build date: 2023-08-08T09:03:13
#2023-08-28T11:56:28Z	INFO	setup	Go Version: go1.19.12
#2023-08-28T11:56:28Z	INFO	setup	Go OS/Arch: linux/amd64

and:

apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: "2023-08-28T12:07:17Z"
  generateName: migrate-bcp-cluster-test1-bcp-cluster-test1-
  labels:
    controller-uid: eb5eda20-74f1-4ec6-84e6-d33fee0990ba
    job-name: migrate-bcp-cluster-test1-bcp-cluster-test1
  name: migrate-bcp-cluster-test1-bcp-cluster-test1-kjgmk
  namespace: kamaji-system
  resourceVersion: "5403260"
  uid: 4e0d5534-7bef-4b9f-b390-c372a9049a92
spec:
  containers:
  - args:
    - migrate
    - --tenant-control-plane=bcp-cluster-test1/bcp-cluster-test1
    - --target-datastore=kamaji-etcd-4
    command:
    - /kamaji
    image: clastix/kamaji:vv0.3.3
    imagePullPolicy: IfNotPresent
#...

@prometherion
Copy link
Member

kamaji/Makefile

Line 159 in 973392b

@echo -n v$(VERSION)

We should return with no v prefix.

I'll address this for the v0.3.4 release. In the meanwhile you can solve your issue without inflecting the image manually, just specify the --migrate-image CLI flag by specifying the fully qualified container image.

Thanks for giving this a try!

@prometherion prometherion reopened this Aug 28, 2023
@Heiko-san
Copy link
Author

Hmm with the flag set to

  containers:
  - args:
    - manager
    - --health-probe-bind-address=:8081
    - --leader-elect
    - --metrics-bind-address=:8080
    - --tmp-directory=/tmp/kamaji
    - --datastore=default
    - --migrate-image=clastix/kamaji:v0.3.3

The migration pod actually starts and completes:

kg pod
#NAME                                                READY   STATUS      RESTARTS       AGE
#capi-kamaji-controller-manager-77df58dcdd-q7p4s     1/1     Running     4 (3d3h ago)   4d1h
#etcd-0                                              1/1     Running     0              61m
#etcd-1                                              1/1     Running     0              61m
#etcd-2                                              1/1     Running     0              61m
#kamaji-cfb8859cf-942bc                              1/1     Running     0              8m8s#
migrate-bcp-cluster-test1-bcp-cluster-test1-tw4p4   0/1     Completed   0              6m43s
k logs migrate-bcp-cluster-test1-bcp-cluster-test1-tw4p4
#2023/08/28 12:51:11 maxprocs: Leaving GOMAXPROCS=4: CPU quota undefined
#2023-08-28T12:51:11Z	INFO	generating the controller-runtime client
I0828 12:51:12.465679       1 request.go:690] Waited for 1.037141623s due to client-side throttling, not priority and fairness, request: GET:https://10.96.0.1:443/apis/cilium.io/v2alpha1?timeout=32s
#2023-08-28T12:51:12Z	INFO	retrieving the TenantControlPlane
#2023-08-28T12:51:12Z	INFO	retrieving the TenantControlPlane used DataStore
#2023-08-28T12:51:12Z	INFO	retrieving the target DataStore
#2023-08-28T12:51:12Z	INFO	generating the origin storage connection
#2023-08-28T12:51:12Z	INFO	generating the target storage connection
#2023-08-28T12:51:12Z	INFO	migration from origin to target started
#2023-08-28T12:51:13Z	INFO	migration completed

However the migration doesn't seem to be successfully finished:

kg -n bcp-cluster-test1 tcp
#NAME                VERSION   STATUS      CONTROL-PLANE ENDPOINT   KUBECONFIG                           DATASTORE       AGE
#bcp-cluster-test1   v1.25.7   Migrating   10.123.1.31:6443         bcp-cluster-test1-admin-kubeconfig   kamaji-etcd-2   46m

@prometherion
Copy link
Member

The kamaji logs are required to understand what's going there.

@Heiko-san
Copy link
Author

Heiko-san commented Aug 28, 2023

clusterctl describe cluster bcp-cluster-test2
#NAME                                                         READY  SEVERITY  REASON  SINCE  MESSAGE 
#Cluster/bcp-cluster-test2                                    True                     2m30s           
#├─ClusterInfrastructure - VSphereCluster/bcp-cluster-test2   True                     2m59s           
#├─ControlPlane - KamajiControlPlane/bcp-cluster-test2                                                 
#└─Workers                                                                                             
#  └─MachineDeployment/bcp-cluster-test2-md-0                 True                     65s             
#    └─Machine/bcp-cluster-test2-md-0-7b697b8758xxwdc5-czjch  True                     101s
kg tcp
#NAME                VERSION   STATUS   CONTROL-PLANE ENDPOINT   KUBECONFIG                           DATASTORE       AGE
#bcp-cluster-test2   v1.25.7   Ready    10.123.1.32:6443         bcp-cluster-test2-admin-kubeconfig   kamaji-etcd-2   3m49s
  • started migration here
kubectl patch --type merge tcp bcp-cluster-test2 -p '{"spec": {"dataStore": "kamaji-etcd-4"}}'
  • kamaji log:
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "b588cfa9-8210-4f51-8f1e-5242f3471542", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "b588cfa9-8210-4f51-8f1e-5242f3471542", "allowed": true}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "35f43288-5712-499c-bb8a-92befc5749d4", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "35f43288-5712-499c-bb8a-92befc5749d4", "allowed": true}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseBootstrapToken	start processing
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseBootstrapToken	reconciliation completed
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.konnectivity_agent	start processing	{"resource": "konnectivity-agent"}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.kube_proxy	start processing
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.coredns	start processing
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseUploadConfigKubeadm	start processing
[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseUploadConfigKubelet	start processing
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "ea0f2dfe-3e97-4c60-9a2e-7742e2680e18", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "ea0f2dfe-3e97-4c60-9a2e-7742e2680e18", "allowed": true}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "e8a96d16-c3f4-4d2a-91b1-f3e480adc2fd", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "e8a96d16-c3f4-4d2a-91b1-f3e480adc2fd", "allowed": true}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseBootstrapToken	start processing
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseBootstrapToken	reconciliation completed
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "6380a3aa-61f6-4127-bb02-bd72af33b1f7", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "6380a3aa-61f6-4127-bb02-bd72af33b1f7", "allowed": true}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.konnectivity_agent	resource processed	{"resource": "konnectivity-agent"}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.konnectivity_agent	start processing	{"resource": "konnectivity-sa"}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "2dda73d1-e194-4b8e-a40b-1efd71fad7d5", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "2dda73d1-e194-4b8e-a40b-1efd71fad7d5", "allowed": true}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "06661159-867d-4ae9-99b4-fb330c253ef7", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "06661159-867d-4ae9-99b4-fb330c253ef7", "allowed": true}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseBootstrapToken	start processing
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseBootstrapToken	reconciliation completed
2023-08-28T13:13:28Z	INFO	migrate has been configured	{"controller": "tenantcontrolplane", "controllerGroup": "kamaji.clastix.io", "controllerKind": "TenantControlPlane", "TenantControlPlane": {"name":"bcp-cluster-test2","namespace":"bcp-cluster-test2"}, "namespace": "bcp-cluster-test2", "name": "bcp-cluster-test2", "reconcileID": "4820723b-405e-4b01-8d76-324f3175e9b0"}
2023-08-28T13:13:28Z	INFO	requested enqueuing back	{"controller": "tenantcontrolplane", "controllerGroup": "kamaji.clastix.io", "controllerKind": "TenantControlPlane", "TenantControlPlane": {"name":"bcp-cluster-test2","namespace":"bcp-cluster-test2"}, "namespace": "bcp-cluster-test2", "name": "bcp-cluster-test2", "reconcileID": "4820723b-405e-4b01-8d76-324f3175e9b0", "resources": "migrate"}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "bdfdf2d6-6319-42e4-a86f-3dc5a1015679", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "bdfdf2d6-6319-42e4-a86f-3dc5a1015679", "allowed": true}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseUploadConfigKubelet	reconciliation completed
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseUploadConfigKubelet	start processing
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "a45fe905-3fe8-489b-ae73-45276f920d1e", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "a45fe905-3fe8-489b-ae73-45276f920d1e", "allowed": true}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "26ab33ea-3ac8-47e6-8a85-0b218b44a581", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "26ab33ea-3ac8-47e6-8a85-0b218b44a581", "allowed": true}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseUploadConfigKubeadm	reconciliation completed
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseUploadConfigKubeadm	start processing
[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "31246a6c-35b9-433b-bbe7-6060219645c6", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "31246a6c-35b9-433b-bbe7-6060219645c6", "allowed": true}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.konnectivity_agent	start processing	{"resource": "konnectivity-clusterrolebinding"}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "0d4d6de6-8463-4538-95f2-77cda57522b2", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "0d4d6de6-8463-4538-95f2-77cda57522b2", "allowed": true}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "2d0ab715-76dc-4d54-b3e1-0db2274a62fe", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "2d0ab715-76dc-4d54-b3e1-0db2274a62fe", "allowed": true}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "c4c13819-c250-44cc-8a59-e303ef3eab92", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "c4c13819-c250-44cc-8a59-e303ef3eab92", "allowed": true}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.kube_proxy	reconciliation completed
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.kube_proxy	start processing
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.coredns	reconciliation completed
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.coredns	start processing
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseUploadConfigKubelet	reconciliation completed
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "98050274-7bd7-42fb-8a21-ddf1503092be", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:28Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "98050274-7bd7-42fb-8a21-ddf1503092be", "allowed": true}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.konnectivity_agent	reconciliation completed
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.konnectivity_agent	start processing	{"resource": "konnectivity-agent"}
2023-08-28T13:13:28Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.PhaseUploadConfigKubeadm	reconciliation completed
2023-08-28T13:13:29Z	INFO	bcp-cluster-test1 has been reconciled	{"controller": "tenantcontrolplane", "controllerGroup": "kamaji.clastix.io", "controllerKind": "TenantControlPlane", "TenantControlPlane": {"name":"bcp-cluster-test1","namespace":"bcp-cluster-test1"}, "namespace": "bcp-cluster-test1", "name": "bcp-cluster-test1", "reconcileID": "23a57767-49f9-46f0-8416-d85f777e9f4d"}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "314763c2-c446-43aa-8e01-21dd84116104", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "314763c2-c446-43aa-8e01-21dd84116104", "allowed": true}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "6b117c36-2e56-47f4-8502-5e287eb96b1c", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "6b117c36-2e56-47f4-8502-5e287eb96b1c", "allowed": true}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "e3f30c97-c4d5-483a-a34a-fbbee142c664", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "e3f30c97-c4d5-483a-a34a-fbbee142c664", "allowed": true}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "45a1f6ca-4c02-4402-9175-07fe3200d4a1", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "45a1f6ca-4c02-4402-9175-07fe3200d4a1", "allowed": true}
2023-08-28T13:13:29Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.konnectivity_agent	resource processed	{"resource": "konnectivity-agent"}
2023-08-28T13:13:29Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.konnectivity_agent	start processing	{"resource": "konnectivity-sa"}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "1eaed7d9-680d-45c9-9539-12a52368a746", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "1eaed7d9-680d-45c9-9539-12a52368a746", "allowed": true}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "d95e98f5-7d25-4143-9a7f-164751a1995a", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "d95e98f5-7d25-4143-9a7f-164751a1995a", "allowed": true}
2023-08-28T13:13:29Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.konnectivity_agent	start processing	{"resource": "konnectivity-clusterrolebinding"}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "296aa863-f9a5-47e0-b3ae-1160677d311b", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:29Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "296aa863-f9a5-47e0-b3ae-1160677d311b", "allowed": true}
2023-08-28T13:13:29Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.kube_proxy	reconciliation completed
2023-08-28T13:13:29Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.konnectivity_agent	reconciliation completed
2023-08-28T13:13:29Z	INFO	soot_bcp-cluster-test2_bcp-cluster-test2.coredns	reconciliation completed
2023-08-28T13:13:29Z	INFO	bcp-cluster-test2 has been reconciled	{"controller": "tenantcontrolplane", "controllerGroup": "kamaji.clastix.io", "controllerKind": "TenantControlPlane", "TenantControlPlane": {"name":"bcp-cluster-test2","namespace":"bcp-cluster-test2"}, "namespace": "bcp-cluster-test2", "name": "bcp-cluster-test2", "reconcileID": "205a7fc8-26dd-4224-a654-7514e674e877"}
2023-08-28T13:13:29Z	INFO	bcp-cluster-test1 has been reconciled	{"controller": "tenantcontrolplane", "controllerGroup": "kamaji.clastix.io", "controllerKind": "TenantControlPlane", "TenantControlPlane": {"name":"bcp-cluster-test1","namespace":"bcp-cluster-test1"}, "namespace": "bcp-cluster-test1", "name": "bcp-cluster-test1", "reconcileID": "0064afe3-661f-4c72-82e8-79fd9940ba3b"}
2023-08-28T13:13:29Z	INFO	bcp-cluster-test2 has been reconciled	{"controller": "tenantcontrolplane", "controllerGroup": "kamaji.clastix.io", "controllerKind": "TenantControlPlane", "TenantControlPlane": {"name":"bcp-cluster-test2","namespace":"bcp-cluster-test2"}, "namespace": "bcp-cluster-test2", "name": "bcp-cluster-test2", "reconcileID": "cf89eac7-d31a-49e6-add8-5b0be4b6c196"}
2023-08-28T13:13:30Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "2c1c87cc-c655-4685-81bb-a30de21688b4", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:30Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "2c1c87cc-c655-4685-81bb-a30de21688b4", "allowed": true}
2023-08-28T13:13:30Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "5b4d34ba-f823-4b6a-8451-edc93852c039", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:30Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "5b4d34ba-f823-4b6a-8451-edc93852c039", "allowed": true}
2023-08-28T13:13:31Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "eca8ca7e-fcdd-41b4-8b39-f2c4c3a06557", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:31Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "eca8ca7e-fcdd-41b4-8b39-f2c4c3a06557", "allowed": true}
2023-08-28T13:13:31Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "61d784f0-2af1-447d-b9f7-c621bed2b2d2", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:31Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "61d784f0-2af1-447d-b9f7-c621bed2b2d2", "allowed": true}
2023-08-28T13:13:34Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "fbf2ddb1-81b4-466b-9764-f215d6ac704a", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:34Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "fbf2ddb1-81b4-466b-9764-f215d6ac704a", "allowed": true}
2023-08-28T13:13:34Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "c12ea199-65bf-4892-b64f-3d0ef9cb1297", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:34Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "c12ea199-65bf-4892-b64f-3d0ef9cb1297", "allowed": true}
2023-08-28T13:13:39Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "d115c9c2-8fa9-403c-b6c9-e93af370e49d", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:39Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "d115c9c2-8fa9-403c-b6c9-e93af370e49d", "allowed": true}
2023-08-28T13:13:39Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "f94d8104-fdfb-41fb-bf43-744483b68da7", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:39Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "f94d8104-fdfb-41fb-bf43-744483b68da7", "allowed": true}
2023-08-28T13:13:49Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "e0ed1df0-a7c5-4766-9977-325ee62e221b", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:49Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "e0ed1df0-a7c5-4766-9977-325ee62e221b", "allowed": true}
2023-08-28T13:13:49Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "d2c74500-eb93-4006-ab69-59188e408f1e", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:13:49Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "d2c74500-eb93-4006-ab69-59188e408f1e", "allowed": true}
2023-08-28T13:14:10Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "9f50d8ab-5d71-4a7b-8318-86b3e6aa2e7e", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:14:10Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "9f50d8ab-5d71-4a7b-8318-86b3e6aa2e7e", "allowed": true}
2023-08-28T13:14:10Z	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "UID": "2d19a0c4-4bec-48b4-bb1c-997e47b04c14", "kind": "kamaji.clastix.io/v1alpha1, Kind=TenantControlPlane", "resource": {"group":"kamaji.clastix.io","version":"v1alpha1","resource":"tenantcontrolplanes"}}
2023-08-28T13:14:10Z	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-kamaji-clastix-io-v1alpha1-tenantcontrolplane", "code": 200, "reason": "update operation allowed", "UID": "2d19a0c4-4bec-48b4-bb1c-997e47b04c14", "allowed": true}

(last lines get repeated from here)

kg pod -n kamaji-system
#NAME                                                READY   STATUS      RESTARTS       AGE
#capi-kamaji-controller-manager-77df58dcdd-q7p4s     1/1     Running     4 (3d4h ago)   4d1h
#etcd-0                                              1/1     Running     0              80m
#etcd-1                                              1/1     Running     0              80m
#etcd-2                                              1/1     Running     0              80m
#kamaji-cfb8859cf-942bc                              1/1     Running     0              27m
#migrate-bcp-cluster-test1-bcp-cluster-test1-tw4p4   0/1     Completed   0              26m
#migrate-bcp-cluster-test2-bcp-cluster-test2-4klkd   0/1     Completed   0              3m49s
kg tcp
#NAME                VERSION   STATUS      CONTROL-PLANE ENDPOINT   KUBECONFIG                           DATASTORE       AGE
#bcp-cluster-test2   v1.25.7   Migrating   10.123.1.32:6443         bcp-cluster-test2-admin-kubeconfig   kamaji-etcd-2   11m
clusterctl describe cluster bcp-cluster-test2
#NAME                                                         READY  SEVERITY  REASON                  SINCE  MESSAGE 
#Cluster/bcp-cluster-test2                                    False  Info      WaitingForControlPlane  4m35s           
#├─ClusterInfrastructure - VSphereCluster/bcp-cluster-test2   True                                     11m             
#├─ControlPlane - KamajiControlPlane/bcp-cluster-test2                                                                 
#└─Workers                                                                                                             
#  └─MachineDeployment/bcp-cluster-test2-md-0                 True                                     9m27s           
#    └─Machine/bcp-cluster-test2-md-0-7b697b8758xxwdc5-czjch  True                                     10m

@prometherion
Copy link
Member

Ok, now I get it.

The issue here is that you're operating though Cluster API, which means the source of truth for the Control Plane is the KamajiControlPlane resource.

You don't have to start the migration by editing the TCP definition, but rather the KCP.

@Heiko-san
Copy link
Author

Ah thanks!!! Now it worked, by editing the KamajiControlPlane. (We still have --migrate-image ion place.

@Heiko-san
Copy link
Author

One last thing (I don't know if this is really an issue or maybe even desired behavior, but I wanted to let you know):
If you migrate a cluster/TCP from one datastore to another and then rotate some nodes and migrate it back, then the old nodes are there again from the cluster's point of view.
This means data is never removed from the old datastore on mirgation.

before first migration

kg node
#NAME                                            STATUS   ROLES    AGE     VERSION
#bcp-cluster-test2-md-0-7b697b8758xbj99n-tqrtz   Ready    <none>   3m34s   v1.25.7

after migration & node rotate

kg node
#NAME                                            STATUS   ROLES    AGE     VERSION
#bcp-cluster-test2-md-0-7b697b8758xbj99n-k26r4   Ready    <none>   2m39s   v1.25.7

after migrating back

kg node
#NAME                                            STATUS     ROLES    AGE     VERSION
#bcp-cluster-test2-md-0-7b697b8758xbj99n-k26r4   Ready      <none>   9m32s   v1.25.7
#bcp-cluster-test2-md-0-7b697b8758xbj99n-tqrtz   NotReady   <none>   30m     v1.25.7

@prometherion
Copy link
Member

If you migrate a cluster/TCP from one datastore to another and then rotate some nodes and migrate it back, then the old nodes are there again from the cluster's point of view.

Don't wanna be an RTFM dude, but 🙃 https://kamaji.clastix.io/guides/datastore-migration/#migrate-data

Please, note the datastore migration leaves the data on the default datastore, so you have to remove it manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants