-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
All externalMetricsNames with the same name broken if the data source for one of them is unavailable. #2599
Comments
@IvanDechovsky thanks for reporting this issue, we have indentified some problems with metric names and indexes in 2.6.0, even though this seems like a different issue. Are you able to try to reproduce the problem with images mentined here: #2592 (comment) Thanks! feel free to ping me on slack for details. |
Hi, thanks for the quick response. Just switching to the images does not fix the issue for existing metric names but it does fix it if they were to be re-created or simply renamed ( to the same name). I guess that triggers them to be re-indexed and problem goes away. Do you know when we can expect 2.6.1? Do you know if there is a way to fix the problem for existing metrics without asking our dev teams to rename their |
Restarting the pod should be enough but you could try also deleting the HPA manually. KEDA operator will recreate it in base of the ScaledObject |
I may have been too quick to call it resolved. Upon further testing, I can still reproduce the problem with the |
@IvanDechovsky thanks for the confirmation, I will take a look on it. |
@IvanDechovsky I haven't been able to reproduce the problem 🤔 I have 2 SO, with the same |
Hey @IvanDechovsky |
Hey @zroubalik , @JorTurFer i just tested with different deployments and the result is the same.
On initial inspection, it correctly detects the "real" hpa with working data source. However, if you describe it, you see the same error. Again, on the initial apply of the SO things work fine. Once keda pods are restarted, it fails.
|
could you share your ScaledObject literary how they are (only removing the secrets if they are)? apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: prometheus-scaledobject
namespace: issue-2599
spec:
cooldownPeriod: 10
maxReplicaCount: 5
minReplicaCount: 0
pollingInterval: 5
scaleTargetRef:
name: keda-test-app
triggers:
- metadata:
metricName: http_requests_total
query: >-
sum(avg by (mode) (rate(node_cpu_seconds_total{job="node-exporter",
mode=~"idle|iowait|steal"}[2m]))) * 10
serverAddress: http://prometheus-operated.issue-2599.svc:9090
threshold: '3'
type: prometheus
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: prometheus-scaledobject-2
namespace: issue-2599
spec:
cooldownPeriod: 10
maxReplicaCount: 5
minReplicaCount: 0
pollingInterval: 5
scaleTargetRef:
name: keda-test-app-2
triggers:
- metadata:
metricName: http_requests_total
query: >-
sum(avg by (mode) (rate(node_cpu_seconds_total{job="node-exporter",
mode=~"idle|iowait|steal"}[2m]))) * 10
serverAddress: http://prometheus-operated.monitoring.svc:9090
threshold: '3'
type: prometheus
|
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: real
namespace: thanos
spec:
maxReplicaCount: 50
minReplicaCount: 2
pollingInterval: 30
scaleTargetRef:
name: thanos-query-frontend
triggers:
- metadata:
metricName: nginx_ingress_controller_requests
query: |
sum(
rate(
nginx_ingress_controller_requests{
exported_namespace="thanos",
exported_service="thanos-query-frontend",
}[2m]
)
)
serverAddress: http://kube-prometheus-stack-thanos-query-frontend.kube-system:9090/
threshold: "7"
type: prometheus
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: fake
namespace: thanos
spec:
maxReplicaCount: 50
minReplicaCount: 2
pollingInterval: 30
scaleTargetRef:
name: thanos-query
triggers:
- metadata:
metricName: nginx_ingress_controller_requests
query: |
sum(
rate(
nginx_ingress_controller_requests{
exported_namespace="fake",
exported_service="fake",
}[2m]
)
)
serverAddress: http://fake-foo-bar-thanos.kube-system:9090/
threshold: "7"
type: prometheus |
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. |
Are you able to test our current main version to see if this is still an issue @IvanDechovsky? |
Sorry for the delay, but I'm happy to report the issue has been resolved in 2.7.0! Thank you for the support. |
Report
If you configure multiple ScaledObjects with the same
metricName
like so:but use different
serverAddress
and one of those data sources becomes unavailable, all of the scaled objects with that sameexternalMetricName
break with the following errorExpected Behavior
The expected behaviour would be that only the ScaledObject with the unavailable
serverAddress
to report the metrics unavailable error.Actual Behavior
All ScaledObjects with the same
externalMetricNames
report the same metrics unavailable error, regardless of the availability of theirserverAddress
Steps to Reproduce the Problem
ScaledObject
Logs from KEDA operator
KEDA Version
2.6.0
Kubernetes Version
1.21
Platform
Amazon Web Services
Scaler Details
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: