-
Notifications
You must be signed in to change notification settings - Fork 271
Description
Describe the bug
A cluster-enabled ReplicationGroup with 2 (or more) nodes would fail if created along with its CacheParameterGroup.
The CacheParameterGroup gets created and, before it can set the actual value for the cluster-enabled parameter, the ACK controller attempts to create the ReplicationGroup. This leads to a non-recoverable error (ACK.Terminal is "True") because the ReplicationGroup must have 2 nodes but the cluster-enabled parameter is still set to no (the default value).
Steps to reproduce
- prepare a k8s cluster with Elasticache ACK controller
- create the
elasticache-00namespace - apply code from this gist (make sure you do supply the
ReplicationGroupresource with thecacheSubnetGroupNameandsecurityGroupIDscorrect for your environment) - see following status condition in
ReplicationGroupresource:
- message: "InvalidParameterCombination: Use a parameter group with cluster-enabled
parameter to create more than one node group.\n\tstatus code: 400, request id:
f0c028b5-1097-4a37-819a-f5d8bc3026dc"
status: "True"
type: ACK.Terminal
Expected outcome
The ReplicationGroup gets created correctly with cluster mode enabled and exactly 2 nodes.
It might actually fail until the CacheParameterGroup sets the cluster-enabled parameter to yes, but it would eventually reconcile.
Environment
- Kubernetes version: 1.23
- Using EKS: Yes, version v1.23.10-eks-15b7512
- AWS service targeted: Elasticache
Tested with Elasticache ACK v0.0.20 as well as the one compiled off the ack-bot/rt-v0.20.1-codegen-v0.20.1 branch (because I needed the fix to issue #1318 ): same error.