Skip to content

InvalidParameterCombination error when creating ReplicationGroup with cluster mode enabled #1513

@matteo-magni

Description

@matteo-magni

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-00 namespace
  • apply code from this gist (make sure you do supply the ReplicationGroup resource with the cacheSubnetGroupName and securityGroupIDs correct for your environment)
  • see following status condition in ReplicationGroup resource:
  - 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.service/elasticacheIndicates issues or PRs that are related to elasticache-controller.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions