-
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
Fix KeyError: SecurityGroups in elasticache module. #410
Fix KeyError: SecurityGroups in elasticache module. #410
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if you can expand the integration test that it tests the SecurityGroup option of your PR.
Furthermore, you need a changelog fragment.
Sure, I was in the progress of looking into expanding the tests anyway. |
…n wasn't picke up from test wide config
Also I am getting this build error:
Shouldn't we stop testing with Python 2.7, as it's super outdated an mist libraries start dropping support for it? |
We've mostly picked up our support 'requirements' from Ansible itself. Which will likely have some form of support for RHEL6 for another couple of years. Because boto3 is dropping support for Python 2.7 I suspect we'll be releasing a 'major' version somewhere after July in which we drop official support for Python 2.7. ( https://boto3.amazonaws.com/v1/documentation/api/1.16.56/guide/migrationpy3.html ) |
…ms/credentials passing
…cache subnet group in another place
Thanks for the tip @tremble, that seemed to have done the trick. All code should be fixed now. Now it's just about fixing the CI setup to allow access for test user:
|
@stefanhorning you need another PR in mattclay/aws-terminator Just reference in that PR to this PR. |
… naming everywhere)
I guess I addressed all issues now. So hopefully CI will turn green once mattclay/aws-terminator#126 is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New policies and terminator will be deployed shortly, couple of things here I found while testing those.
@jillr I think I addressed all your comments and a few more issues. I hope tests will run through now. Once green this PR can be merged. |
Tests are running through now. Just get an error in one of the python versions (running in parallel to the others): "code": "InsufficientCacheClusterCapacity",
"message": "Cannot create a cache cluster because there is no availability zone corresponding to the subnets in the cache subnet group with sufficient capacity." This is probably due to an AWS limit that get's hit if all the parallel tests try to create a cluster. @jillr Probably we need to increase the cache cluster limits for that AWS account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor tweaks.
The flake was due to Amazon capacity issues:
https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY
Co-authored-by: Mark Chappell <[email protected]>
Co-authored-by: Mark Chappell <[email protected]>
Co-authored-by: Mark Chappell <[email protected]>
recheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pass locally and LGTM once CI (excluding shippable) is green
recheck |
…s/elasticache_fixes Fix KeyError: SecurityGroups in elasticache module. Reviewed-by: https://github.com/apps/ansible-zuul This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections@dbf3697
…s/elasticache_fixes Fix KeyError: SecurityGroups in elasticache module. Reviewed-by: https://github.com/apps/ansible-zuul This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections@dbf3697
…s/elasticache_fixes Fix KeyError: SecurityGroups in elasticache module. Reviewed-by: https://github.com/apps/ansible-zuul This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections@fd0bcb5
…che_fixes Fix KeyError: SecurityGroups in elasticache module. Reviewed-by: https://github.com/apps/ansible-zuul
…che_fixes Fix KeyError: SecurityGroups in elasticache module. Reviewed-by: https://github.com/apps/ansible-zuul
…che_fixes Fix KeyError: SecurityGroups in elasticache module. Reviewed-by: https://github.com/apps/ansible-zuul
…_ec2_vpc_nat_gateway Migrate ec2_vpc_nat_gateway* modules and tests Migrate ec2_vpc_nat_gateway* modules and tests Reviewed-by: Jill R <None> Reviewed-by: Alina Buzachis <None> Reviewed-by: Gonéri Le Bouder <[email protected]> Reviewed-by: Mark Chappell <None> Reviewed-by: Mike Graves <[email protected]> Reviewed-by: None <None>
SUMMARY
Also improve docs a little.
ISSUE TYPE
COMPONENT NAME
elasticache module
ADDITIONAL INFORMATION
Module would otherwise throw
Fix KeyError: 'SecurityGroups'
when updating an existing Cache Cluster with a security group.Also it was confusing to me at first if the security group param should be provided when in a VPC, as the
cache_security_groups
flag can't be used then and I didn't read further down the docs (on the Docs website). Hence I added a hint for others. But ideally this should be handled by the module internally, as it can be detected if VPC or not, based on the cache_subnet_group param (so only one SG param needs to be exposed to user).