Skip to content

[Elasticache] when using redis >=6, the controller still compares the patch version #1737

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

Closed
Julian-Chu opened this issue Mar 20, 2023 · 6 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. service/elasticache Indicates issues or PRs that are related to elasticache-controller.

Comments

@Julian-Chu
Copy link

Julian-Chu commented Mar 20, 2023

Describe the bug
when I set engineVersion: 6.2 in the manifest, the controller always logs the engineVersion is diff because of patch version.

2023-03-20T12:48:56.000Z	INFO	ackrt	desired resource state has changed	{"account": "647927084307", "role": "", "region": "eu-west-1", "kind": "ReplicationGroup", "namespace": "cloud-application-platform", "name": "oamapp-0083-version-test", "is_adopted": false, "generation": 2, "diff": [{"Path":{"Parts":["Spec","EngineVersion"]},"A":"6.2","B":"6.2.6"}]}

based on elasticache doc, the patch version is managed by AWS when redis >=6:

Beginning with Redis 6.0, ElastiCache for Redis will offer a single version for each Redis OSS minor release, rather than offering multiple patch versions.

This issue also prevents the sequent modification like description change.

Steps to reproduce
apply the following yaml, and log the elasticache controller

apiVersion: elasticache.services.k8s.aws/v1alpha1
kind: ReplicationGroup
metadata:
  name: oamapp-0083-version-test
spec:
    cacheNodeType: cache.t3.micro
    cacheParameterGroupName: default.redis6.x
    cacheSubnetGroupName: default
    description: version test
    engine: redis
    engineVersion: "6.2"
    numNodeGroups: 1
    replicationGroupID: oamapp-0083-version-test
    replicasPerNodeGroup: 0
    transitEncryptionEnabled: true
    tags:
      - key: test
        value: "test"

Expected outcome
if set minor version explicitly like 7.0 or 6.2, controller should skip the patch version

source code

Environment

  • Kubernetes version: 1.23
  • Using EKS: 1.23
  • AWS service targeted: elasticache controller v0.0.22
@a-hilaly a-hilaly added kind/bug Categorizes issue or PR as related to a bug. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. service/elasticache Indicates issues or PRs that are related to elasticache-controller. labels Mar 20, 2023
@jaypipes
Copy link
Collaborator

Hmm, this is another one of ElastiCache's server-side override fields. Similar to the User AccessString, ElastiCache will override the value of this field in certain cases from what the user provided in the desired field value.

We have another issue that is tracking this problem though you can see we've made no progress on this in 18 months. We should be able to use a custom comparison code block to handle these cases individually for now, but long term I'd like to persue issue #855 as the eventual code-generated solution.

@Julian-Chu
Copy link
Author

Thanks @jaypipes , my team will submit the custom comparison for short term 😄

@Julian-Chu Julian-Chu changed the title [Elasticache] when using reids >=6, the controller still compares the patch version [Elasticache] when using redis >=6, the controller still compares the patch version Mar 21, 2023
@Julian-Chu
Copy link
Author

/assign @joaquinservetto

@ack-prow
Copy link

ack-prow bot commented Mar 24, 2023

@Julian-Chu: GitHub didn't allow me to assign the following users: joaquinservetto.

Note that only aws-controllers-k8s members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @joaquinservetto

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

ack-prow bot pushed a commit to aws-controllers-k8s/elasticache-controller that referenced this issue Apr 13, 2023
Issue #, if available:

Description of changes:

The purpose of this changes is to avoid the controller to compare patch versions when Redis version is >=6, since It's managed by AWS. More details [here](aws-controllers-k8s/community#1737). 
 
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
@ack-bot
Copy link
Collaborator

ack-bot commented Jun 22, 2023

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-prow ack-prow bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 22, 2023
@Julian-Chu
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. service/elasticache Indicates issues or PRs that are related to elasticache-controller.
Projects
None yet
Development

No branches or pull requests

4 participants