forked from ansible-collections/amazon.aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix IOPs io1 DB instance updates and integration tests also (ansible-…
…collections#878) Fix IOPs io1 DB instance updates and integration tests also SUMMARY Primary this PR is to fix updates when updating iops or allocated_storage on io1 DB instances when only one param is changing. Secondarily this fixes up the tests again and is test against some improvements to the waiter configuration see linked PR. IOPs error on update attempts if only one param is being updated: error: code: InvalidParameterCombination message: You must specify both the storage size and iops when modifying the storage size or iops on a DB instance that has iops. type: Sender msg: 'Unable to modify DB instance: An error occurred (InvalidParameterCombination) when calling the ModifyDBInstance operation: You must specify both the storage size and iops when modifying the storage size or iops on a DB instance that has iops.' ISSUE TYPE Bugfix Pull Request COMPONENT NAME rds_instance ADDITIONAL INFORMATION These tests are very slow and still a little flakey but generally all pass as expected now locally. Reviewed-by: Mark Woolley <[email protected]> Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@45e79ed
- Loading branch information
Showing
13 changed files
with
163 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
disabled # something is broken | ||
slow | ||
|
||
cloud/aws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ | |
- hosts: all | ||
gather_facts: no | ||
strategy: free | ||
serial: 8 | ||
serial: 9 | ||
roles: | ||
- rds_instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
tests/integration/targets/rds_instance/roles/rds_instance/tasks/test_upgrade.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
--- | ||
- block: | ||
- name: Ensure the resource doesn't exist | ||
rds_instance: | ||
id: "{{ instance_id }}" | ||
state: absent | ||
skip_final_snapshot: True | ||
register: result | ||
|
||
- assert: | ||
that: | ||
- not result.changed | ||
ignore_errors: yes | ||
|
||
- name: Create a mariadb instance | ||
rds_instance: | ||
id: "{{ instance_id }}" | ||
state: present | ||
engine: mariadb | ||
engine_version: "{{ mariadb_engine_version }}" | ||
allow_major_version_upgrade: true | ||
username: "{{ username }}" | ||
password: "{{ password }}" | ||
db_instance_class: "{{ db_instance_class }}" | ||
allocated_storage: "{{ allocated_storage }}" | ||
register: result | ||
|
||
- assert: | ||
that: | ||
- result.changed | ||
- "result.db_instance_identifier == '{{ instance_id }}'" | ||
|
||
# Test upgrade of DB instance | ||
|
||
- name: Uprade a mariadb instance | ||
rds_instance: | ||
id: "{{ instance_id }}" | ||
state: present | ||
engine: mariadb | ||
engine_version: "{{ mariadb_engine_version_2 }}" | ||
allow_major_version_upgrade: true | ||
username: "{{ username }}" | ||
password: "{{ password }}" | ||
db_instance_class: "{{ db_instance_class }}" | ||
allocated_storage: "{{ allocated_storage }}" | ||
apply_immediately: True | ||
register: result | ||
|
||
- assert: | ||
that: | ||
- result.changed | ||
- '"engine_version" in result.pending_modified_values or result.engine_version == mariadb_engine_version_2' | ||
|
||
- name: Idempotence uprading a mariadb instance | ||
rds_instance: | ||
id: "{{ instance_id }}" | ||
state: present | ||
engine: mariadb | ||
engine_version: "{{ mariadb_engine_version_2 }}" | ||
allow_major_version_upgrade: true | ||
username: "{{ username }}" | ||
password: "{{ password }}" | ||
db_instance_class: "{{ db_instance_class }}" | ||
allocated_storage: "{{ allocated_storage }}" | ||
register: result | ||
retries: 30 | ||
delay: 10 | ||
until: result is not failed | ||
|
||
- assert: | ||
that: | ||
- not result.changed | ||
- '"engine_version" in result.pending_modified_values or result.engine_version == mariadb_engine_version_2' | ||
|
||
always: | ||
- name: Delete the instance | ||
rds_instance: | ||
id: "{{ instance_id }}" | ||
state: absent | ||
skip_final_snapshot: True | ||
wait: false | ||
ignore_errors: yes |