StackStorm-Exchange / stackstorm-aws

st2 content pack containing Amazon Web Services integrations.
https://exchange.stackstorm.org/
Apache License 2.0
15 stars 26 forks source link

aws.autoscaling_set_desired_capacity doesn't accept 0 as desired capacity #32

Open dzimine opened 7 years ago

dzimine commented 7 years ago
st2 run aws.autoscaling_set_desired_capacity DesiredCapacity=0 AutoScalingGroupName=swarm-workers-tf

id: 5938f0c13f16c606cdc69ce6
status: failed
parameters: 
  AutoScalingGroupName: swarm-workers-tf
  DesiredCapacity: 0
result: 
  exit_code: 1
  result: None
  stderr: "st2.actions.python.ActionManager: INFO     {'sqs_other': {'max_number_of_messages': 1}, 'service_notifications_sensor': {'path': '/my-path', 'host': 'localhost', 'port': 12345}, 'st2_user_data': '/opt/stackstorm/packs/aws/actions/scripts/bootstrap_user.sh', 'setup': {'region': 'us-west-2', 'aws_access_key_id': '', 'aws_secret_access_key': ''}, 'interval': 20, 'aws_access_key_id': 'AKIAIVL2RS4PCN5DESMQ', 'aws_secret_access_key': '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', 'region': u'us-east-1', 'sqs_sensor': {'input_queues': None}}
Traceback (most recent call last):
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 259, in <module>
    obj.run()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 155, in run
    output = action.run(**self._parameters)
  File "/opt/stackstorm/packs/aws/actions/run.py", line 20, in run
    return self.do_method(module_path, cls, action, **kwargs)
  File "/opt/stackstorm/packs/aws/actions/lib/action.py", line 143, in do_method
    resultset = getattr(obj, action)(**kwargs)
  File "/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore/client.py", line 251, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore/client.py", line 513, in _make_api_call
    api_params, operation_model, context=request_context)
  File "/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore/client.py", line 566, in _convert_to_request_dict
    api_params, operation_model)
  File "/opt/stackstorm/virtualenvs/aws/lib/python2.7/site-packages/botocore/validate.py", line 270, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Missing required parameter in input: "DesiredCapacity"
dzimine commented 7 years ago

Looks like the action had happen and desired capacity had been updated to 0. yet the error output.