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

FlightRecorder/Recording API broken after upgrading from 2.0 #387

Closed
ebaron opened this issue May 5, 2022 · 0 comments · Fixed by #438
Closed

FlightRecorder/Recording API broken after upgrading from 2.0 #387

ebaron opened this issue May 5, 2022 · 0 comments · Fixed by #438
Assignees
Labels
bug Something isn't working

Comments

@ebaron
Copy link
Member

ebaron commented May 5, 2022

Since existing services are not updated yet by the operator (see #294), the Cryostat service created by 2.0 will still have the name export for its HTTP port instead of the newer name http. This results in the operator not being able to find the HTTP port as seen below:

ERROR controller-runtime.manager.controller.flightrecorder Reconciler error {"reconciler group": "operator.cryostat.io", "reconciler kind": "FlightRecorder", "name": "cryostat-sample-64cf97c97f-qnsb9", "namespace": "cryostat-test", "error": "Cryostat service had no port named \"http\""}
github.com/go-logr/zapr.(*zapLogger).Error
/remote-source/deps/gomod/pkg/mod/github.com/go-logr/zapr@v0.2.0/zapr.go:132
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.7.2/pkg/internal/controller/controller.go:267
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.7.2/pkg/internal/controller/controller.go:235
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1.1
/remote-source/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.7.2/pkg/internal/controller/controller.go:198
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1
/remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:185
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
/remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
/remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
/remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext
/remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:185
k8s.io/apimachinery/pkg/util/wait.UntilWithContext
/remote-source/deps/gomod/pkg/mod/k8s.io/apimachinery@v0.19.2/pkg/util/wait/wait.go:99

A simple workaround for this fix is to delete existing services and the deployment, so the operator can recreate them:

cryostats=$(kubectl get cryostat --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
for cryostat in ${cryostats}; do
  kubectl delete svc,deploy -lapp="${cryostat}"
done

Bear in mind that the FlightRecorder and Recording APIs are now deprecated (#349) and will be removed in a future version.

@ebaron ebaron added the bug Something isn't working label May 5, 2022
@ebaron ebaron moved this to Todo in 2.2.0 Release Jun 13, 2022
@ebaron ebaron moved this from Todo to In Progress in 2.2.0 Release Jun 13, 2022
@ebaron ebaron self-assigned this Jun 13, 2022
Repository owner moved this from In Progress to Done in 2.2.0 Release Aug 31, 2022
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
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant