-
Bug
-
Resolution: Done
-
Normal
-
rhos-18.0.0
-
None
-
2
-
False
-
-
False
-
?
-
?
-
?
-
?
-
None
-
-
-
Moderate
When applying a patch to the openstackcontrolplane CR to enable Swift, the following error occurs
oc -n ${OSP18_NAMESPACE} patch openstackcontrolplane openstack --type=merge --patch '
spec:
swift:
enabled: true
template:
memcachedInstance: memcached
swiftRing:
ringReplicas: 1
swiftStorage:
replicas: 0
networkAttachments:
- storage-osp18
storageClass: local-storage
storageRequest: 10Gi
swiftProxy:
secret: osp-secret
replicas: 1
passwordSelectors:
service: SwiftPassword
serviceUser: swift
override:
service:
internal:
metadata:
annotations:
metallb.universe.tf/address-pool: internalapi-osp18
metallb.universe.tf/allow-shared-ip: internalapi-osp18
metallb.universe.tf/loadBalancerIPs: 172.17.0.80
spec:
type: LoadBalancer
networkAttachments:
- storage-osp18
'
Error from server (InternalError): Internal error occurred: failed calling webhook "vopenstackcontrolplane.kb.io": failed to call webhook: Post "https://openstack-operator-controller-manager-service.openstack-operators.svc:443/validate-core-openstack-org-v1beta1-openstackcontrolplane?timeout=10s": EOF*
There is an accompanying stack track in the openstack-operator-controller:
2024/07/16 15:14:24 http: panic serving 10.130.0.2:53466: runtime error: invalid memory address or nil pointer dereference goroutine 790995 [running]: net/http.(*conn).serve.func1() /usr/lib/golang/src/net/http/server.go:1854 +0xbf panic(\{0x1cfcd40, 0x322cc60}) /usr/lib/golang/src/runtime/panic.go:890 +0x263 github.com/openstack-k8s-operators/swift-operator/api/v1beta1.(*SwiftSpecCore).ValidateUpdate(_, \{{{0x0, 0x0}, \{0x0, 0x0, 0x0}, \{0x0, 0x0}}, \{0x0, 0x0, ...}, ...}, ...) /opt/app-root/src/go/pkg/mod/github.com/openstack-k8s-operators/swift-operator/api@v0.3.1-0.20240704182345-5399100dea21/v1beta1/swift_webhook.go:205 +0x46 github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1.(*OpenStackControlPlane).ValidateUpdateServices(_, \{{0x0, 0x0}, \{0xc001163488, 0x15}, 0xc003bdef30, \{{0x1, {{...}, \{...}}}, \{0x1, ...}, ...}, ...}, ...) /remote-source/apis/core/v1beta1/openstackcontrolplane_webhook.go:400 +0x11c7 github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1.(*OpenStackControlPlane).ValidateUpdate(0xc000e8f800, \{0x22c53d0?, 0xc001851800}) /remote-source/apis/core/v1beta1/openstackcontrolplane_webhook.go:151 +0x2c5 sigs.k8s.io/controller-runtime/pkg/webhook/admission.(*validatingHandler).Handle(_, \{_, _}, \{{{0xc00578d9e0, 0x24}, \{{0xc0072bb770, 0x12}, \{0xc006a4df20, 0x7}, \{0xc0072bb788, ...}}, ...}}) /opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/webhook/admission/validator.go:103 +0x6a9 sigs.k8s.io/controller-runtime/pkg/webhook/admission.(*Webhook).Handle(_, \{_, _}, \{{{0xc00578d9e0, 0x24}, \{{0xc0072bb770, 0x12}, \{0xc006a4df20, 0x7}, \{0xc0072bb788, ...}}, ...}}) /opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/webhook/admission/webhook.go:169 +0x20a sigs.k8s.io/controller-runtime/pkg/webhook/admission.(*Webhook).ServeHTTP(0xc00061a320, \{0x7fca04030d18?, 0xc00722f4a0}, 0xc00141c200) /opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.6/pkg/webhook/admission/http.go:98 +0xc94 github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerInFlight.func1(\{0x7fca04030d18, 0xc00722f4a0}, 0x22d8100?) /opt/app-root/src/go/pkg/mod/github.com/prometheus/client_golang@v1.18.0/prometheus/promhttp/instrument_server.go:60 +0xd4 net/http.HandlerFunc.ServeHTTP(0x22d81b0?, \{0x7fca04030d18?, 0xc00722f4a0?}, 0xc001abf828?) /usr/lib/golang/src/net/http/server.go:2122 +0x2f github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerCounter.func1(\{0x22d81b0?, 0xc000752460?}, 0xc00141c200) /opt/app-root/src/go/pkg/mod/github.com/prometheus/client_golang@v1.18.0/prometheus/promhttp/instrument_server.go:147 +0xc5 net/http.HandlerFunc.ServeHTTP(0x74d3e5?, \{0x22d81b0?, 0xc000752460?}, 0x8?) /usr/lib/golang/src/net/http/server.go:2122 +0x2f github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerDuration.func2(\{0x22d81b0, 0xc000752460}, 0xc00141c200) /opt/app-root/src/go/pkg/mod/github.com/prometheus/client_golang@v1.18.0/prometheus/promhttp/instrument_server.go:109 +0xc7 net/http.HandlerFunc.ServeHTTP(0xc000752460?, \{0x22d81b0?, 0xc000752460?}, 0x1fc7e0c?) /usr/lib/golang/src/net/http/server.go:2122 +0x2f net/http.(*ServeMux).ServeHTTP(0xc0013cc820?, \{0x22d81b0, 0xc000752460}, 0xc00141c200) /usr/lib/golang/src/net/http/server.go:2500 +0x149 net/http.serverHandler.ServeHTTP(\{0x22c9d90?}, \{0x22d81b0, 0xc000752460}, 0xc00141c200) /usr/lib/golang/src/net/http/server.go:2936 +0x316 net/http.(*conn).serve(0xc00218c750, \{0x22d8fe0, 0xc000375620}) /usr/lib/golang/src/net/http/server.go:1995 +0x612 created by net/http.(*Server).Serve /usr/lib/golang/src/net/http/server.go:3089 +0x5ed
Looks like this piece of code is at issue:
- links to
- mentioned on
(1 mentioned on)