-
Notifications
You must be signed in to change notification settings - Fork 398
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
community.aws.rds_cluster module fails to manage cluster after creating cluster #1409
Comments
Files identified in the description:
If these files are inaccurate, please update the |
@imesias Thank you for raising this issue. Will have a look and let you know. |
@alinabuzachis @jillr @markuman @s-hertel @tremble I had a minute to have a quick look at this today. It appears the 'KeyError' is valid. I noticed the way you tackled this previously was to pop the values off and compare before it reaches https://github.com/ansible-collections/community.aws/blob/main/plugins/modules/rds_cluster.py#L836 which is where the error occurs because the key I suspect I could add the following to resolve? desired_db_cluster_parameter_group = modify_params.pop("DBClusterParameterGroupName", None)
if desired_db_cluster_parameter_group:
if desired_db_cluster_parameter_group != current_cluster["DBClusterParameterGroup"]:
changing_params["DBClusterParameterGroupName"] = desired_db_cluster_parameter_group If someone could guide me along the contribution process I'd be happy to submit a PR. |
….py (#1417) Fix KeyError when Cluster Parameter Group is specified in rds_cluster.py SUMMARY Fix KeyError when comparing state. Fixes: #1409 ISSUE TYPE Bugfix Pull Request COMPONENT NAME rds_cluster.py Reviewed-by: Alina Buzachis <None> Reviewed-by: Markus Bergholz <[email protected]>
….py (#1417) Fix KeyError when Cluster Parameter Group is specified in rds_cluster.py SUMMARY Fix KeyError when comparing state. Fixes: #1409 ISSUE TYPE Bugfix Pull Request COMPONENT NAME rds_cluster.py Reviewed-by: Alina Buzachis <None> Reviewed-by: Markus Bergholz <[email protected]> (cherry picked from commit b3bc689)
….py (#1417) Fix KeyError when Cluster Parameter Group is specified in rds_cluster.py SUMMARY Fix KeyError when comparing state. Fixes: #1409 ISSUE TYPE Bugfix Pull Request COMPONENT NAME rds_cluster.py Reviewed-by: Alina Buzachis <None> Reviewed-by: Markus Bergholz <[email protected]> (cherry picked from commit b3bc689)
….py (#1417) (#1433) [PR #1417/b3bc6893 backport][stable-4] Fix KeyError when Cluster Parameter Group is specified in rds_cluster.py This is a backport of PR #1417 as merged into main (b3bc689). SUMMARY Fix KeyError when comparing state. Fixes: #1409 ISSUE TYPE Bugfix Pull Request COMPONENT NAME rds_cluster.py Reviewed-by: Mark Chappell <None>
….py (ansible-collections#1417) Fix KeyError when Cluster Parameter Group is specified in rds_cluster.py SUMMARY Fix KeyError when comparing state. Fixes: ansible-collections#1409 ISSUE TYPE Bugfix Pull Request COMPONENT NAME rds_cluster.py Reviewed-by: Alina Buzachis <None> Reviewed-by: Markus Bergholz <[email protected]> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections@b3bc689
Summary
When I try and create a cluster using
community.aws.rds_cluster
to create an rds cluster. Upon first execution of the playbook the cluster is created. When run again expecting to see 'ok' instead of changed the module fails with an error:Issue Type
Bug Report
Component Name
rds_cluster
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
control node: macOS
Steps to Reproduce
Expected Results
When you execute the play the first time the cluster is created, when you execute it a second time the playbook fails with an error. I expected it to say 'ok' as in the resource exists and is already created. I
Actual Results
I suspect that there is a difference being detected between what is defined and what has just been created in the environment so the code attempts a method with the wrong attributes.
Code of Conduct
The text was updated successfully, but these errors were encountered: