We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The metricName uniqueness is not adequate when using multiple scalers with the same blobContainerName but a different blobPrefix
blobContainerName
blobPrefix
The current code only uses blobContainerName for uniqueness when it should include blobPrefix: https://github.com/kedacore/keda/blob/v2.2.0/pkg/scalers/azure_blob_scaler.go#L153
The scaler should work correctly without error
The scaler does not work , status of the ScaledObject shows:
status: conditions: - message: Failed to ensure HPA is correctly created for ScaledObject reason: ScaledObjectCheckFailed status: 'False' type: Ready - message: ScaledObject check failed reason: UnkownState status: Unknown type: Active originalReplicaCount:
apiVersion: keda.sh/v1alpha1 kind: ScaledObject metadata: name: my-scaled-function-scaler spec: scaleTargetRef: name: my-scaled-function triggers: - metadata: blobContainerName: mycontainer blobPrefix: folder1 connectionFromEnv: AzureWebJobsStorage type: azure-blob - metadata: blobContainerName: mycontainer blobPrefix: folder2 connectionFromEnv: AzureWebJobsStorage type: azure-blob
2021-05-20T00:05:22.235Z INFO controllers.ScaledObject Reconciling ScaledObject {"ScaledObject.Namespace": "my-namespace", "ScaledObject.Name": "my-scaled-function-scaler"} 2021-05-20T00:05:22.236Z INFO controllers.ScaledObject Creating a new HPA {"ScaledObject.Namespace": "my-namespace", "ScaledObject.Name": "my-scaled-function-scaler", "HPA.Namespace": "my-namespace", "HPA.Name": "keda-hpa-my-scaled-function-scaler"} 2021-05-20T00:05:22.236Z ERROR controllers.ScaledObject Failed to create new HPA resource {"ScaledObject.Namespace": "my-namespace", "ScaledObject.Name": "my-scaled-function-scaler", "HPA.Namespace": "my-namespace", "HPA.Name": "keda-hpa-my-scaled-function-scaler", "error": "metricName azure-blob-mycontainer defined multiple times in ScaledObject my-scaled-function-scaler, please refer the documentation how to define metricName manually"} github.com/kedacore/keda/v2/controllers.(*ScaledObjectReconciler).ensureHPAForScaledObjectExists /workspace/controllers/scaledobject_controller.go:316 github.com/kedacore/keda/v2/controllers.(*ScaledObjectReconciler).reconcileScaledObject /workspace/controllers/scaledobject_controller.go:204 github.com/kedacore/keda/v2/controllers.(*ScaledObjectReconciler).Reconcile /workspace/controllers/scaledobject_controller.go:160 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:244 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:218 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:197 k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1 /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:155 k8s.io/apimachinery/pkg/util/wait.BackoffUntil /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:156 k8s.io/apimachinery/pkg/util/wait.JitterUntil /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:133 k8s.io/apimachinery/pkg/util/wait.Until /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:90 2021-05-20T00:05:22.236Z ERROR controllers.ScaledObject Failed to ensure HPA is correctly created for ScaledObject {"ScaledObject.Namespace": "my-namespace", "ScaledObject.Name": "my-scaled-function-scaler", "error": "metricName azure-blob-mycontainer defined multiple times in ScaledObject my-scaled-function-scaler, please refer the documentation how to define metricName manually"} sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:244 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:218 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:197 k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1 /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:155 k8s.io/apimachinery/pkg/util/wait.BackoffUntil /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:156 k8s.io/apimachinery/pkg/util/wait.JitterUntil /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:133 k8s.io/apimachinery/pkg/util/wait.Until /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:90 2021-05-20T00:05:22.249Z ERROR controller Reconciler error {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject", "name": "my-scaled-function-scaler", "namespace": "my-namespace", "error": "metricName azure-blob-mycontainer defined multiple times in ScaledObject my-scaled-function-scaler, please refer the documentation how to define metricName manually"} sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:218 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.5/pkg/internal/controller/controller.go:197 k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1 /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:155 k8s.io/apimachinery/pkg/util/wait.BackoffUntil /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:156 k8s.io/apimachinery/pkg/util/wait.JitterUntil /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:133 k8s.io/apimachinery/pkg/util/wait.Until /go/pkg/mod/k8s.io/apimachinery@v0.20.4/pkg/util/wait/wait.go:90
2.2.0
1.20
Microsoft Azure
Azure Blob
No response
The text was updated successfully, but these errors were encountered:
Could you please send a fix so the blobPrefix is included into the metricName? Thanks!
metricName
Sorry, something went wrong.
I'll give it a go! I don't have much experience with Go but looks to be a relatively simple change 😄
Thanks a lot, it should be an easy one! It could be a good starter for Go and KEDA developement :)
I've raised this now, I tested it on my Kubernetes cluster with my own built image and it works!
I've also included the ability to manually specify the metricName while I was at it: #1816
Successfully merging a pull request may close this issue.
Report
The metricName uniqueness is not adequate when using multiple scalers with the same
blobContainerName
but a differentblobPrefix
The current code only uses
blobContainerName
for uniqueness when it should include blobPrefix: https://github.com/kedacore/keda/blob/v2.2.0/pkg/scalers/azure_blob_scaler.go#L153Expected Behavior
The scaler should work correctly without error
Actual Behavior
The scaler does not work , status of the ScaledObject shows:
Steps to Reproduce the Problem
Logs from KEDA operator
KEDA Version
2.2.0
Kubernetes Version
1.20
Platform
Microsoft Azure
Scaler Details
Azure Blob
Anything else?
No response
The text was updated successfully, but these errors were encountered: