kubernetes-sigs / kubernetes-sigs/cluster-api-provider-openstack
When I use the capo v1beta2 version of the cluster resource,capi reports error
- Dominant language
- Go
- Stars
- 369
- Forks
- 315
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 33
Description
/kind bug
**What steps did you take and what happened:**
1.capo use main branch code and crd,then make image
2.capi use v1.12.2 and crd
3. if openstackcluster cr is v1beta2, create action is ok,but get
```
[root@node-1 ~]# kubectl get openstackcluster
Error from server: conversion webhook for infrastructure.cluster.x-k8s.io/v1beta1, Kind=OpenStackCluster failed: the server could not find the requested resource
[root@node-1 ~]# kubectl get openstackclusters.v1beta2.infrastructure.cluster.x-k8s.io
Error from server: conversion webhook for infrastructure.cluster.x-k8s.io/v1beta1, Kind=OpenStackCluster failed: the server could not find the requested resource
[root@node-1 ~]# kubectl get openstackclusters.v1beta1.infrastructure.cluster.x-k8s.io
NAME CLUSTER READY NETWORK BASTION IP AGE
xx xx true 61a3bc89-82bc-433f-a12b-9515010339bd 172.37.0.147 15m
I0304 12:11:02.012055 1 cluster_controller_phases.go:186] "Infrastructure provider has completed provisioning" controller="cluster" controllerGroup="cluster.x-k8s.io" controllerKind="Cluster" Cluster="default/mj" reconcileID="e632e7c0-23ad-4f4e-85d7-f17fa01d2ea1" OpenStackCluster="default/xx"
E0304 12:11:02.013659 1 controller.go:474] "Reconciler error" err="failed to retrieve status.failureDomains from infrastructure provider for Cluster \"xx\" in namespace \"default\": failed to get .status.failureDomains from object: .status.failureDomains accessor error: map[default-az:map[controlPlane:true]] is of the type map[string]interface {}, expected []interface{}" controller="cluster" controllerGroup="cluster.x-k8s.io" controllerKind="Cluster" Cluster="default/xx" reconcileID="e632e7c0-23ad-4f4e-85d7-f17fa01d2ea1"
```
4. if openstackcluster cr is v1beta1, capi show error log
```
E0303 11:25:22.757223 1 controller.go:474] "Reconciler error" err="failed to retrieve status.failureDomains from infrastructure provider for Cluster \"xx\" in namespace \"default\": failed to
get .status.failureDomains from object: .status.failureDomains accessor error: map[default-az:map[controlPlane:true]] is of the type map[string]interface {}, expected []interface{}"
controller="cluster" controllerGroup="cluster.x-k8s.io" controllerKind="Cluster" Cluster="default/xx" reconcileID="2aa8db90-c8cd-49e4-b19c-f064cd801e50"
```
What did I miss?
**What did you expect to happen:**
It is normal and does not affect the capi status.initialization.infrastructureProvisioned field.
**Anything else you would like to add:**
**Environment:**
- Cluster API Provider OpenStack version (Or `git rev-parse HEAD` if manually built): commit 5f545aea05f87c7c5e3db56e4d75a7ab94a88d75
- Cluster-API version: v1.12.2
- OpenStack version:
- Minikube/KIND version:
- Kubernetes version (use `kubectl version`):
- OS (e.g. from `/etc/os-release`):
Contributor guide
Research direction
Reproduce the issue with the listed Cluster API and CAPO versions, using the v1beta2 and v1beta1 OpenStackCluster resources and the kubectl commands shown. Start by tracing the conversion webhook failure and the failureDomains error reported at cluster_controller_phases.go:186 and controller.go:474. Done means both resource versions can be retrieved without conversion errors and the infrastructureProvisioned status remains unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100