-
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
Service Bus Scaler has issues with the minReplicaCount parameter #4541
Comments
Hello, In debug, you will see the value of the metric on each iteration, current active jobs count and required jobs |
Let's hope I did not do something too silly. Please correct my course if necessary. I ran this command: And got this error:
|
I didn't know that your command was possible O.O |
Line 126 of the keda/apis/keda/v1alpha1/scaledjob_types.go file is below: I've no GoLang programming experience but realized that exception occurred because I did set minReplicaCount in the deployment .YAML but omitted setting maxReplicaCount, assuming that it will default to 100. Apparently it defaulted to nill. I fixed the deployment .YAML and the Job works now properly. May I suggest initializing s.Spec.Min / MaxReplicaCount to their 0 and 100 default values if not present in the deployment .YAML? That will eliminate some nil checks in the code. |
Now I'm experiencing a different scale-out behavior that's a bit unexpected. As per the script below, I already have 2 Jobs running. If I send 3 Messages to the Queue, I get 3 new Jobs started, for a total of 5 Containers. I'd expect to get only 1 new Job started as I already have 2 of them running. |
I checked the documentation at https://keda.sh/docs/2.9/concepts/scaling-jobs/ and my scaling expectations just above are correct. This later issue is tracked by #4554 |
Nice catch! |
I have opened an PR with the fix: https://github.com/kedacore/keda/pull/4565/files |
is this issue duplicated with #4554? |
This is not a duplicate of #4554 |
Could you share the logs having both parameters (min and max) set? |
I'll get to this on Tuesday, May 30th. We have a long weekend in the USA. |
This is fixed now, right? I should close then. And it's not a duplicate of #4554 |
No no, the fix merged is for not crashing if you set minReplicaCount without setting maxReplicaCount. Was your problem related with that? |
Yes, the problem I had was that I was setting the minReplicaCount, not setting the maxReplicaCount and scale-out was no longer working because of the null dereference crash. I saw that fix, thanks very much. So this problem is completely addressed. |
Report
This parameter is documented as below. Yet it does not seem to be operational.
Expected Behavior
Actual Behavior
Setting
minReplicaCount: 2
in the Job's script, after having deployed it I've noticed:Steps to Reproduce the Problem
Below is the YAML script that I'm experimenting with:
AKS 1.25.6
KEDA 2.10.2
The Containers run on the virtual-node-aci-linux virtual node.
Logs from KEDA operator
KEDA Version
2.10.1
Kubernetes Version
1.25
Platform
Microsoft Azure
Scaler Details
Azure Service Bus
Anything else?
No response
The text was updated successfully, but these errors were encountered: