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

The attribute "queueLength" of RabbitMQ Scaler is not optional actually #880

Closed
heavenwing opened this issue Jun 16, 2020 · 5 comments · Fixed by #881
Closed

The attribute "queueLength" of RabbitMQ Scaler is not optional actually #880

heavenwing opened this issue Jun 16, 2020 · 5 comments · Fixed by #881
Assignees
Labels
bug Something isn't working
Milestone

Comments

@heavenwing
Copy link

Expected Behavior

Don't need to set queueLength

Actual Behavior

I must to set queueLength, otherwise RabbitMQ Scaler is not working

Steps to Reproduce the Problem

  1. deploy rabbitmq into k8s:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install rabbitmq --set rabbitmq.password=PASSWORD,service.type=LoadBalancer bitnami/rabbitmq

2.generate deploy yaml file with this command:

func kubernetes deploy --name azfunconk8s --image-name heavenwing/azfunconk8s --dry-run > deploy-funcs.yaml

This command "func kubernetes deploy" actually don't create queueLength attribute

3.put some messages into rabbitmq

4.RabbitMQ Scaler don't scale my deploy because of missing queueLength (keda-operator report this error log)

  1. Add queueLength attribute manually , re-deploy app into k8s, it's working

Specifications

  • KEDA Version: 1.4.1
  • Platform & Version: Azure Cloud (include China)
  • Kubernetes Version: 1.16.7 or others
  • Scaler(s): RabbitMQ
@heavenwing heavenwing added the bug Something isn't working label Jun 16, 2020
@tomkerkhove
Copy link
Member

Error log from #879:

keda-operator {"level":"info","ts":1592271606.9490728,"logger":"controller_scaledobject","msg":"Reconciling ScaledObject","Request.Namespace":"default","Request.Name":"hello-keda"}
keda-operator {"level":"info","ts":1592271606.9491096,"logger":"controller_scaledobject","msg":"Adding Finalizer for the ScaledObject","Request.Namespace":"default","Request.Name":"hello-keda"}
keda-operator {"level":"info","ts":1592271606.981627,"logger":"controller_scaledobject","msg":"Detected ScaleType = Deployment","Request.Namespace":"default","Request.Name":"hello-keda"}
keda-operator {"level":"info","ts":1592271606.981664,"logger":"controller_scaledobject","msg":"Creating a new HPA","Request.Namespace":"default","Request.Name":"hello-keda","HPA.Namespace":"default","HPA.Name":"keda-hpa-hello-keda"}
keda-operator {"level":"info","ts":1592271607.0303602,"logger":"controller_scaledobject","msg":"Reconciling ScaledObject","Request.Namespace":"default","Request.Name":"hello-keda"}
keda-operator {"level":"info","ts":1592271607.0303838,"logger":"controller_scaledobject","msg":"Detected ScaleType = Deployment","Request.Namespace":"default","Request.Name":"hello-keda"}
keda-operator {"level":"error","ts":1592271649.9625862,"logger":"azure_queue_scaler","msg":"error)","error":"-> github.com/Azure/azure-pipeline-go/pipeline.NewError, /go/pkg/mod/github.com/!azure/azure-pipeline-go@v0.2.1/pipeline/error.go:154\nHTTP request failed\n\nPut https://zygaks.queue.core.windows.net/js-queue-items?timeout=61: dial tcp: lookup zygaks.queue.core.windows.net on 10.0.0.10:53: no such host\n","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\ngit.luolix.top/kedacore/keda/pkg/scalers.(*azureQueueScaler).IsActive\n\tkeda/pkg/scalers/azure_queue_scaler.go:123\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).handleScaleDeployment\n\tkeda/pkg/handler/scale_loop.go:119\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).handleScale\n\tkeda/pkg/handler/scale_loop.go:45\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).HandleScaleLoop\n\tkeda/pkg/handler/scale_loop.go:14"}
keda-operator {"level":"error","ts":1592271649.975142,"logger":"scalehandler","msg":"Error updating deployment","ScaledObject.Namespace":"default","ScaledObject.Name":"hello-keda","ScaledObject.ScaleType":"deployment","Deployment.Namespace":"default","Deployment.Name":"hello-keda","error":"Operation cannot be fulfilled on deployments.apps \"hello-keda\": the object has been modified; please apply your changes to the latest version and try again","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).updateDeployment\n\tkeda/pkg/handler/scale_deployments.go:58\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).scaleDeploymentToZero\n\tkeda/pkg/handler/scale_deployments.go:81\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).scaleDeployment\n\tkeda/pkg/handler/scale_deployments.go:29\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).handleScaleDeployment\n\tkeda/pkg/handler/scale_loop.go:130\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).handleScale\n\tkeda/pkg/handler/scale_loop.go:45\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).HandleScaleLoop\n\tkeda/pkg/handler/scale_loop.go:14"}
keda-operator {"level":"info","ts":1592271671.5685518,"logger":"controller_scaledobject","msg":"Reconciling ScaledObject","Request.Namespace":"default","Request.Name":"hello-keda"}
keda-operator {"level":"info","ts":1592271671.5686412,"logger":"controller_scaledobject","msg":"Detected ScaleType = Deployment","Request.Namespace":"default","Request.Name":"hello-keda"}
keda-operator {"level":"error","ts":1592271729.8082273,"logger":"azure_queue_scaler","msg":"error)","error":"-> github.com/Azure/azure-pipeline-go/pipeline.NewError, /go/pkg/mod/github.com/!azure/azure-pipeline-go@v0.2.1/pipeline/error.go:154\nHTTP request failed\n\nPut https://zygaks.queue.core.windows.net/js-queue-items?timeout=61: dial tcp: lookup zygaks.queue.core.windows.net on 10.0.0.10:53: no such host\n","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\ngit.luolix.top/kedacore/keda/pkg/scalers.(*azureQueueScaler).IsActive\n\tkeda/pkg/scalers/azure_queue_scaler.go:123\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).handleScaleDeployment\n\tkeda/pkg/handler/scale_loop.go:119\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).handleScale\n\tkeda/pkg/handler/scale_loop.go:45\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).HandleScaleLoop\n\tkeda/pkg/handler/scale_loop.go:28"}
keda-operator {"level":"error","ts":1592271729.8215945,"logger":"scalehandler","msg":"Error updating deployment","ScaledObject.Namespace":"default","ScaledObject.Name":"hello-keda","ScaledObject.ScaleType":"deployment","Deployment.Namespace":"default","Deployment.Name":"hello-keda","error":"Operation cannot be fulfilled on deployments.apps \"hello-keda\": the object has been modified; please apply your changes to the latest version and try again","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).updateDeployment\n\tkeda/pkg/handler/scale_deployments.go:58\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).scaleDeploymentToZero\n\tkeda/pkg/handler/scale_deployments.go:81\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).scaleDeployment\n\tkeda/pkg/handler/scale_deployments.go:29\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).handleScaleDeployment\n\tkeda/pkg/handler/scale_loop.go:130\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).handleScale\n\tkeda/pkg/handler/scale_loop.go:45\ngit.luolix.top/kedacore/keda/pkg/handler.(*ScaleHandler).HandleScaleLoop\n\tkeda/pkg/handler/scale_loop.go:28"}

@heavenwing
Copy link
Author

heavenwing commented Jun 16, 2020

@tomkerkhove error log of #879 is not for this issue

this issue have the log:

keda-operator {"level":"error","ts":1592269296.1828275,"logger":"controller_scaledobject","msg":"Error getting scalers","Request.Namespace":"default","Request.Name":"azfunconk8s","error":"error getting scaler for trigger #0: error parsing rabbitmq metadata: no queue length given","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\ngit.luolix.top/kedacore/keda/pkg/controller/scaledobject.(*ReconcileScaledObject).getScaledObjectMetricSpecs\n\tkeda/pkg/controller/scaledobject/scaledobject_controller.go:454\ngit.luolix.top/kedacore/keda/pkg/controller/scaledobject.(*ReconcileScaledObject).newHPAForScaledObject\n\tkeda/pkg/controller/scaledobject/scaledobject_controller.go:378\ngit.luolix.top/kedacore/keda/pkg/controller/scaledobject.(*ReconcileScaledObject).reconcileDeploymentType\n\tkeda/pkg/controller/scaledobject/scaledobject_controller.go:234\ngit.luolix.top/kedacore/keda/pkg/controller/scaledobject.(*ReconcileScaledObject).Reconcile\n\tkeda/pkg/controller/scaledobject/scaledobject_controller.go:155\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:216\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:192\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:171\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:88"}

@tomkerkhove
Copy link
Member

Huh I've misread the issue; thought it was the same one - Sorry!

@heavenwing
Copy link
Author

@tomkerkhove sorry about missing "not"
#879 is different with this issue

@zroubalik
Copy link
Member

zroubalik commented Jun 16, 2020

@heavenwing good catch, thanks for reporting this.

@zroubalik zroubalik self-assigned this Jun 16, 2020
@tomkerkhove tomkerkhove added this to the v1.5 milestone Jul 7, 2020
SpiritZhou pushed a commit to SpiritZhou/keda that referenced this issue Jul 18, 2023
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
None yet
Development

Successfully merging a pull request may close this issue.

3 participants