Something is requesting v1alpha5 objects, and the conversions panic
mdbooth opened this issue · 0 comments
mdbooth commented
/kind bug
This is really 2 bugs.
Bug 1: Something is requesting v1alpha5 objects
Bug 2: The conversions panic
If it wasn't for bug 2 then we wouldn't even notice bug 1. As we're about to delete v1alpha5 I'm not that interested in fixing it, except that something is triggering the panics in practise.
An example is here:
2024/03/28 13:46:56 http: panic serving 192.168.155.0:9225: runtime error: invalid memory address or nil pointer dereference
goroutine 293 [running]:
net/http.(*conn).serve.func1()
/usr/local/go/src/net/http/server.go:1898 +0xbe
panic({0x1d66a80?, 0x35982a0?})
/usr/local/go/src/runtime/panic.go:770 +0x132
sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha5.Convert_v1beta1_BastionStatus_To_v1alpha5_Instance(...)
/workspace/api/v1alpha5/conversion.go:468
sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha5.autoConvert_v1beta1_OpenStackClusterStatus_To_v1alpha5_OpenStackClusterStatus(0xc0006d4c20, 0xc00037d380, {0x0?, 0x0?})
/workspace/api/v1alpha5/zz_generated.conversion.go:927 +0x614
sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha5.Convert_v1beta1_OpenStackClusterStatus_To_v1alpha5_OpenStackClusterStatus(0xc0006d4c20, 0xc00037d380, {0x0?, 0x0?})
/workspace/api/v1alpha5/conversion.go:628 +0x2b
sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha5.autoConvert_v1beta1_OpenStackCluster_To_v1alpha5_OpenStackCluster(0xc0006d4a08, 0xc00037d008, {0x0, 0x0})
/workspace/api/v1alpha5/zz_generated.conversion.go:654 +0xda
sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha5.Convert_v1beta1_OpenStackCluster_To_v1alpha5_OpenStackCluster(...)
/workspace/api/v1alpha5/zz_generated.conversion.go:662
sigs.k8s.io/cluster-api-provider-openstack/api/v1alpha5.(*OpenStackCluster).ConvertFrom(0xc00037d008, {0x23b7a48?, 0xc0006d4a08})
/workspace/api/v1alpha5/conversion.go:54 +0x45
sigs.k8s.io/controller-runtime/pkg/webhook/conversion.(*webhook).convertViaHub(0xc00044e8d0?, {0x7fac934d4d38, 0xc00037cc08}, {0x7fac934d4c68, 0xc00037d008})
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/webhook/conversion/conversion.go:165 +0x1a4
sigs.k8s.io/controller-runtime/pkg/webhook/conversion.(*webhook).convertObject(0xc00044e8d0, {0x23adc80, 0xc00037cc08}, {0x23ad938, 0xc00037d008})
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/webhook/conversion/conversion.go:144 +0x59e
sigs.k8s.io/controller-runtime/pkg/webhook/conversion.(*webhook).handleConvertRequest(0xc00044e8d0, 0xc0002d77c0)
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/webhook/conversion/conversion.go:105 +0x1b6
sigs.k8s.io/controller-runtime/pkg/webhook/conversion.(*webhook).ServeHTTP(0xc00044e8d0, {0x7fac9348b920, 0xc0007ea730}, 0xc0006e0480)
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/webhook/conversion/conversion.go:72 +0xf6
sigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics.InstrumentedHook.InstrumentHandlerInFlight.func1({0x7fac9348b920, 0xc0007ea730}, 0xc0006e0480)
/go/pkg/mod/github.com/prometheus/client_golang@v1.17.0/prometheus/promhttp/instrument_server.go:60 +0xcb
net/http.HandlerFunc.ServeHTTP(0x35a4310?, {0x7fac9348b920?, 0xc0007ea730?}, 0x41a025?)
/usr/local/go/src/net/http/server.go:2166 +0x29
github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerCounter.func1({0x23b4658?, 0xc000398700?}, 0xc0006e0480)
/go/pkg/mod/github.com/prometheus/client_golang@v1.17.0/prometheus/promhttp/instrument_server.go:147 +0xc3
net/http.HandlerFunc.ServeHTTP(0x6ffe86?, {0x23b4658?, 0xc000398700?}, 0x412025?)
/usr/local/go/src/net/http/server.go:2166 +0x29
github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerDuration.func2({0x23b4658, 0xc000398700}, 0xc0006e0480)
/go/pkg/mod/github.com/prometheus/client_golang@v1.17.0/prometheus/promhttp/instrument_server.go:109 +0xc2
net/http.HandlerFunc.ServeHTTP(0xc000198a90?, {0x23b4658?, 0xc000398700?}, 0x10?)
/usr/local/go/src/net/http/server.go:2166 +0x29
net/http.(*ServeMux).ServeHTTP(0x412025?, {0x23b4658, 0xc000398700}, 0xc0006e0480)
/usr/local/go/src/net/http/server.go:2683 +0x1ad
net/http.serverHandler.ServeHTTP({0x23ac218?}, {0x23b4658?, 0xc000398700?}, 0x6?)
/usr/local/go/src/net/http/server.go:3137 +0x8e
net/http.(*conn).serve(0xc00088e510, {0x23c5718, 0xc0005d4930})
/usr/local/go/src/net/http/server.go:2039 +0x5e8
created by net/http.(*Server).Serve in goroutine 139
/usr/local/go/src/net/http/server.go:3285 +0x4b4