Strange behaviour: Senza scales up to 100 instances....
kanuku opened this issue · comments
While trying to scale down the old version of our application, we received the notification that alll versions of the stack are being increased with 100 instances.... This was found by mistakingly using the scale option. See the details below:
First I request the versions deployed
→ senza traffic hecate-live.yml
Stack Name │Version│Identifier │Weight%
hecate-live 0462 hecate-live-0462 0.0
hecate-live R0471 hecate-live-R0471 100.0
Result
When I use the scale option and a non existing version (0462), senza understands that it should scale up everything to 100 instances.
→ senza scale hecate-live.yml 0460
Scaling hecate-live-R0471-AppServer-xxxxxxxxxxxxxxxx from 2 to 100 instances.. OK
Scaling hecate-live-0462-AppServer-xxxxxxxxxxxxxxxx from 2 to 100 instances.. OK
Expectation
Senza should not scale up nor down any of the versions, because no valid options were passed.
I am not sure how to fix it because I am not sure what is allowed and what is not with this command.
First
For senza scale
last argument is always a number of instances to scale up/down. In you case 0460
but there is a limit to 100 instances. That's why it was scaled only to 100 instances. It does not matter what number will be. If the number is more than 100 then it will be 100.
Second
senza scale hecate-live.yml 0460
is a valid command because stack can have no version at all.
Also available commands are:
-
senza scale hecate-live.yml v10123sdfs 0460
Scale stack<stack_name>-v10123sdfs
to 100 instances. Instead of<stack_name>
will be value fromhecate-live.yml
from attributeSenzaInfo/StackName
. -
senza scale stack1 v1 stack2 v2 10
Scale two stacksstack1-v1
andstack2-v2
to 10 instances. -
senza scale stack1 v1 stack2 10
Scale two stacksstack1-v1
andstack2-<no version>
to 10 instances.
My questions are
- Is it allowed to scale stack without specifying stack version?
- Is it allowed to scale several stacks in one command?
Hello @jmcs! Could you help me with that?
Hi, as @vadeg said the version is optional, and the last argument is always the number of instances capped to 100.
Regarding your questions:
Is it allowed to scale stack without specifying stack version?
Yes, this will scale all versions.
Is it allowed to scale several stacks in one command?
Yes, scale accepts the same stack references format as other senza commands.
Thank you, @jmcs