Commit Graph

5 Commits (9350b5ec22ce12605388976a74b23202d00133ba)

Author SHA1 Message Date
msven a2b3120e85 ec2_asg: fix #28087 and #35993 (#36679)
Fixes #35993 - Changes to update_size in commit eb4cc31 made it so
the group dict passed into update_size was not modified. As a result,
the 'replace' call does not see an updated min_size like it previously
did and doesn't pause to wait for any new instances to spin up. Instead,
it moves straight into terminating old instances. Fix is to add batch_size
to min_size when calling wait_for_new_inst.

Fixes #28087 - Make replace_all_instances and replace_instances behave
exactly the same by setting replace_instances = current list of instances
when replace_all_instances used. Root cause of issue was that without lc_check
terminate_batch will terminate all instances passed to it and after updating
the asg size we were querying the asg again for the list of instances - so terminate batch
saw the list including new ones just spun up.

When creating new asg with replace_all_instances: yes and lc_check: false
the instances that are initially created are then subsequently replaced.
This change makes it so replace only occurs if the asg already existed.

Add integration tests for #28087 and #35993.
6 years ago
Stefan Horning 404f9260d9 [cloud][aws] Add metrics_collection options to ec2_asg module (#35180)
* Added metrics_collection management to ec2_asg module to switch ASG metrics on and off.

* Fixed typo in documentation of ec2_asg module

* Removed extra blank line in ec2_asg.py

* Docs fixes for ec2_asg module

* Added integration test for ec2_asg metrics flag

* Trying different syntax for ec2_asg test
6 years ago
Sloane Hertel 45ef6bdd40
Roll boto3_conn tests into ec2_asg (#35854)
* Roll boto3_conn tests into ec2_asg.
6 years ago
Ryan Brown b60c67d329 Remove double-specified EC2 ASG test parameters (#34714)
In the ec2_asg integration tests there are a couple places where
parameters are specified twice (as bot `tag.Name` and `name:`) and
others where those parameters aren't needed for the state requested.
7 years ago
Sloane Hertel 788010d0f0 [cloud][testing] New integration tests for ec2_asg (#30554)
* Add some integration tests for ec2_asg.

* Remove exception handling from ec2_asg boto3 connection since it is handled in boto3_conn().

* Update test failure assertions

* Use yaml anchor for credentials and remove unnecessary dependencies.

* Move AWS boto3 module credentials tests to separate target

* Remove filters from tests
7 years ago