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

Something is requesting v1alpha5 objects, and the conversions panic #1983

Closed
mdbooth opened this issue Mar 28, 2024 · 0 comments · Fixed by #1984
Closed

Something is requesting v1alpha5 objects, and the conversions panic #1983

mdbooth opened this issue Mar 28, 2024 · 0 comments · Fixed by #1984
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@mdbooth
Copy link
Contributor

mdbooth commented Mar 28, 2024

/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:

https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-openstack/1970/pull-cluster-api-provider-openstack-e2e-full-test/1773335193046749184/artifacts/clusters/clusterctl-upgrade-xoy6j1/logs/capo-system/capo-controller-manager/capo-controller-manager-66896777f9-gsjh2/manager.log

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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 28, 2024
@github-project-automation github-project-automation bot moved this from Inbox to Done in CAPO Roadmap Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants