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

ScaledObject no being cached correctly at all times #4955

Closed
gauron99 opened this issue Sep 8, 2023 · 12 comments
Closed

ScaledObject no being cached correctly at all times #4955

gauron99 opened this issue Sep 8, 2023 · 12 comments
Labels
help wanted Looking for support from community stale All issues that are marked as stale due to inactivity

Comments

@gauron99
Copy link
Contributor

gauron99 commented Sep 8, 2023

This is a tracking issue of a bug for which a workaround has been implemented in number of places for this time until its resolved globally.

What happens

ScaledObject is sometimes not cached correctly -> for example the metrics are an empty list or the .Status.ScaleTargetGVKR is nil

Workaround

A workaround has been implemented in a number of places. See below.

  • pkg/scaling/scale_handler.go in func (h *scaleHandler) getTrueMetricArray()
  • pkg/scaling/resolver/scale_resolvers.go in func ResolveScaleTargetPodSpec()

Other info

initial related issue link

/kind bug

@tomkerkhove tomkerkhove moved this from To Triage to Proposed in Roadmap - KEDA Core Sep 14, 2023
@tomkerkhove tomkerkhove added the help wanted Looking for support from community label Sep 14, 2023
@BehbudSh
Copy link

Any updates on this issue? We are facing a problem with a scaling of the Production instance

@nrukavkov
Copy link

The same here

@nuved
Copy link

nuved commented Nov 13, 2023

Hey
The same here,
After migrating the k8s cluster from 1.22.6 to 1.23.17 and upgrading keda from 2.8.2 to 2.9.4, we've faced the same issue.
keda is connecting to rabbitmq cluster and based on the count of messages in the queue, will adjust the HPA.

I even tried to delete the helm chart of keda and install the keda from scratch but still I can see the same errors.

@gauron99
Copy link
Contributor Author

@zroubalik ^

@nuved
Copy link

nuved commented Nov 15, 2023

I'm just wondering why I can still see errors when I already deleted all TriggerAuthentication and ScaledObject and deleted the chart of keda and all its crd .

when I install keda I can see these errors in operator

23-11-15T13:30:42Z ERROR scalehandler failed to get ScaledObject {"name": "", "namespace": "default", "error": "ScaledObject.keda.sh \"\" not found"}
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).performGetScalersCache
 /workspace/pkg/scaling/scale_handler.go:240
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).getScalersCacheForScaledObject
 /workspace/pkg/scaling/scale_handler.go:198
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).GetScaledObjectMetrics
 /workspace/pkg/scaling/scale_handler.go:389
github.com/kedacore/keda/v2/pkg/metricsservice.(*GrpcServer).GetMetrics
 /workspace/pkg/metricsservice/server.go:45
github.com/kedacore/keda/v2/pkg/metricsservice/api._MetricsService_GetMetrics_Handler
 /workspace/pkg/metricsservice/api/metrics_grpc.pb.go:79
google.golang.org/grpc.(*Server).processUnaryRPC
 /workspace/vendor/google.golang.org/grpc/server.go:1340
google.golang.org/grpc.(*Server).handleStream
 /workspace/vendor/google.golang.org/grpc/server.go:1713
google.golang.org/grpc.(*Server).serveStreams.func1.2
 /workspace/vendor/google.golang.org/grpc/server.go:965

while I don't have any ScaledObject in the default ns and the name of scaledObject also is empty in the log.

in operator-metrics , also I can see these errors

E1115 14:23:56.826045       1 status.go:71] apiserver received an error that is not an metav1.Status: &status.Error{s:(*status.Status)(0xc000116628)}: rpc error: code = Unknown desc = error when getting metric values error when getting scalers ScaledObject.keda.sh "" not found
E1115 14:24:00.678277       1 status.go:71] apiserver received an error that is not an metav1.Status: &status.Error{s:(*status.Status)(0xc0013781e0)}: rpc error: code = Unknown desc = error when getting metric values error when getting scalers ScaledObject.keda.sh "" not found
E1115 14:24:01.420055       1 status.go:71] apiserver received an error that is not an metav1.Status: &status.Error{s:(*status.Status)(0xc000116668)}: rpc error: code = Unknown desc = error when getting metric values error when getting scalers ScaledObject.keda.sh "" not found
E1115 14:24:11.853357       1 status.go:71] apiserver received an error that is not an metav1.Status: &status.Error{s:(*status.Status)(0xc000330e60)}: rpc error: code = Unknown desc = error when getting metric values error when getting scalers ScaledObject.keda.sh "" not found
E1115 14:24:15.703234       1 status.go:71] apiserver received an error that is not an metav1.Status: &status.Error{s:(*status.Status)(0xc000469708)}: rpc error: code = Unknown desc = error when getting metric values error when getting scalers ScaledObject.keda.sh "" not found
E1115 14:24:16.435198       1 status.go:71] apiserver received an error that is not an metav1.Status: &status.Error{s:(*status.Status)(0xc0017fc0f8)}: rpc error: code = Unknown desc = error when getting metric values error when getting scalers ScaledObject.keda.sh "" not found
E1115 14:24:26.862525       1 status.go:71] apiserver received an error that is not an metav1.Status: &status.Error{s:(*status.Status)(0xc000469758)}: rpc error: code = Unknown desc = error when getting metric values error when getting scalers ScaledObject.keda.sh "" not found
E1115 14:24:30.713697       1 status.go:71] apiserver received an error that is not an metav1.Status: &status.Error{s:(*status.Status)(0xc0004a2340)}: rpc error: code = Unknown desc = error when getting metric values error when getting scalers ScaledObject.keda.sh "" not found
E1115 14:24:31.449717       1 status.go:71] apiserver received an error that is not an metav1.Status: &status.Error{s:(*status.Status)(0xc0004a2390)}: rpc error: code = Unknown desc = error when getting metric values error when getting scalers ScaledObject.keda.sh "" not found

@janmara
Copy link

janmara commented Jan 8, 2024

We are facing the same issue. :(

Copy link

stale bot commented Mar 8, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Mar 8, 2024
@zroubalik zroubalik removed the stale All issues that are marked as stale due to inactivity label Mar 11, 2024
@dontbesatisfied
Copy link

I'm facing this issue.

Copy link

stale bot commented May 21, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label May 21, 2024
Copy link

stale bot commented May 29, 2024

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed May 29, 2024
@github-project-automation github-project-automation bot moved this from Proposed to Ready To Ship in Roadmap - KEDA Core May 29, 2024
@zroubalik zroubalik reopened this May 29, 2024
@github-project-automation github-project-automation bot moved this from Ready To Ship to Proposed in Roadmap - KEDA Core May 29, 2024
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label May 29, 2024
Copy link

stale bot commented Jul 30, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Jul 30, 2024
Copy link

stale bot commented Aug 9, 2024

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Aug 9, 2024
@github-project-automation github-project-automation bot moved this from Proposed to Ready To Ship in Roadmap - KEDA Core Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Looking for support from community stale All issues that are marked as stale due to inactivity
Projects
Status: Ready To Ship
Development

No branches or pull requests

8 participants