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

Pause autoscaling doesn't work from 0->1 or 1->0 #3009

Closed
JorTurFer opened this issue May 5, 2022 · 1 comment · Fixed by #3011
Closed

Pause autoscaling doesn't work from 0->1 or 1->0 #3009

JorTurFer opened this issue May 5, 2022 · 1 comment · Fixed by #3011
Labels
bug Something isn't working
Milestone

Comments

@JorTurFer
Copy link
Member

Report

Trying the feature with RabbitMQ Scaler, I tried to pause the scaling setting the annotation autoscaling.keda.sh/paused-replicas: '0'.
The workload went to 0 properly but automatically the operator scaled the workload from 0 to 1 (because there were pending messages in the queue).

I have tried setting autoscaling.keda.sh/paused-replicas: '1' and the operator scaled to 1 and a few moments after, again to zero (because there wasn't any pending message).

It seems that the operator is not taking into account this annotation during the process to determine if the ScaledObject is active or not.
During the stage 1->N and N->1 works good

Expected Behavior

Pause the scaling in both stages, 0->1->0 and 1->N->1

Actual Behavior

The scaling is paused only in 1->N->1

Steps to Reproduce the Problem

  1. Deploy a SO using RabbitMQ trigger scaling from 0 to X
  2. Enqueue some messages in the queue
  3. Add the annotation autoscaling.keda.sh/paused-replicas: '0'

Or

  1. Deploy a SO using RabbitMQ trigger scaling from 0 to X
  2. Ensure the queue is empty
  3. Add the annotation autoscaling.keda.sh/paused-replicas: '1'

Logs from KEDA operator

1.6517537492817814e+09	INFO	scaleexecutor	Successfully scaled target to paused replicas count	{"scaledobject.Name": "rabbitmq-consumer", "scaledObject.Namespace": "default", "scaleTarget.Name": "rabbitmq-consumer", "paused replicas": 0}
1.6517537542743633e+09	INFO	scaleexecutor	Successfully updated ScaleTarget	{"scaledobject.Name": "rabbitmq-consumer", "scaledObject.Namespace": "default", "scaleTarget.Name": "rabbitmq-consumer", "Original Replicas Count": 0, "New Replicas Count": 1}

1.651753834290882e+09	INFO	scaleexecutor	Successfully scaled target to paused replicas count	{"scaledobject.Name": "rabbitmq-consumer", "scaledObject.Namespace": "default", "scaleTarget.Name": "rabbitmq-consumer", "paused replicas": 1}
1.651753859283409e+09	INFO	scaleexecutor	Successfully set ScaleTarget replicas count to ScaledObject minReplicaCount	{"scaledobject.Name": "rabbitmq-consumer", "scaledObject.Namespace": "default", "scaleTarget.Name": "rabbitmq-consumer", "Original Replicas Count": 1, "New Replicas Count": 0}

KEDA Version

2.7.0

Kubernetes Version

1.23

Platform

Microsoft Azure

Scaler Details

RabbitMQ

Anything else?

No response

@JorTurFer JorTurFer added the bug Something isn't working label May 5, 2022
@zroubalik
Copy link
Member

CC @aryan9600

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
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants