Skip to content
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

Issue with Updating autoMinorVersionUpgrade Setting in Aurora DB Cluster via Crossplane #2142

Open
akusingh-tibco opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@akusingh-tibco
Copy link

What happened?

I'm attempting to set up an Aurora DB Cluster with one writer and several reader instances. By default, the autoMinorVersionUpgrade option is set to true. However, when I try to perform an update through the AWS console or via a Crossplane claim, it doesn't seem to work. We initially thought that updating through AWS might not be effective since Crossplane could be reconciling the state, but even after updating the Crossplane configuration, the changes are still not being applied.

How can we reproduce it?

I am experiencing an issue while deploying an Aurora DB Cluster using Crossplane. Below are the steps I followed and the problems encountered:

  1. Provider Version: I am using the following provider version: package: xpkg.upbound.io/crossplane-contrib/provider-aws:v0.43.1.
  2. CRD Creation: I created a Custom Resource Definition (CRD) that includes all necessary parameters.
  3. Composition Setup: I created a Composition to provision the Aurora DB cluster along with other dependent cloud resources, such as security groups and DB subnet groups.
  4. Patches Configuration: In the patches field of the Composition, I included the required parameters, but initially the autoMinorVersionUpgrade parameter was missing:
- fromFieldPath: "spec.parameters.allowMajorVersionUpgrade"
  toFieldPath: "spec.forProvider.allowMajorVersionUpgrade"
- fromFieldPath: "spec.parameters.applyImmediately"
  toFieldPath: "spec.forProvider.applyImmediately"
  1. Initial Claim Creation: Upon creating the claim, the Aurora DB cluster was provisioned with Auto Minor Version Upgrade set to true, which I verified in the AWS console.
  2. Identifying the Issue: I suspected that the autoMinorVersionUpgrade parameter was not set due to its omission in the patches field of the Composition.
  3. Updating Composition: I updated the patches field of the Composition to include the autoMinorVersionUpgrade parameter:
- fromFieldPath: "spec.parameters.allowMajorVersionUpgrade"
  toFieldPath: "spec.forProvider.allowMajorVersionUpgrade"
- fromFieldPath: "spec.parameters.autoMinorVersionUpgrade"
  toFieldPath: "spec.forProvider.autoMinorVersionUpgrade"
- fromFieldPath: "spec.parameters.applyImmediately"
  toFieldPath: "spec.forProvider.applyImmediately"
  1. Redeploying the Claim: After redeploying the claim, the autoMinorVersionUpgrade flag value was reflected in the claim CR, but the resource did not get updated. I did not see any error logs in the Crossplane pods.
  2. Manual Update Attempt: I attempted to update the autoMinorVersionUpgrade flag directly from the AWS UI, which resulted in the following error in the Crossplane pod logs:
2025/01/06 06:56:24 Found observed difference in dbinstance
&v1alpha1.DBInstanceParameters{
    ... // 2 ignored and 1 identical fields
-       AutoMinorVersionUpgrade: nil,
+       AutoMinorVersionUpgrade: &true,
    AvailabilityZone:        nil,
    BackupRetentionPeriod:   nil,
    ... // 5 ignored and 42 identical fields
    }
2025-01-06T06:56:24.747Z        DEBUG   provider-aws    External resource differs from desired state    {"controller": "managed/dbinstance.rds.aws.crossplane.io", "request": {"name":"rds-instance-0-nsjh9-q6xsq"}, "uid": "07cb7903-5ff0-46e8-842e-1a9212d0f379", "version": "36334", "external-name": "rds-instance-0-nsjh9-q6xsq", "diff": "Found observed difference in dbinstance\n  &v1alpha1.DBInstanceParameters{\n  \t... // 2 ignored and 1 identical fields\n- \tAutoMinorVersionUpgrade: nil,\n+ \tAutoMinorVersionUpgrade: &true,\n  \tAvailabilityZone:        nil,\n  \tBackupRetentionPeriod:   nil,\n  \t... // 5 ignored and 42 identical fields\n  }\n"}

Fresh Install Testing: After performing a fresh install of the Crossplane charts with the updated Composition (including the autoMinorVersionUpgrade in the patch field), the initial claim correctly picked the value for autoMinorVersionUpgrade. However, when I updated the claim with a different value for the autoMinorVersionUpgrade flag, Crossplane did not reflect this change.

Conclusion
The autoMinorVersionUpgrade flag should be set via the claims, but it is not updating as expected. I would like to raise this issue for further investigation and resolution. Thank you!

What environment did it happen in?

Crossplane version: v1.13.2
Kubernetes Version: 1.31
Cloud provider: AWS
OS: ubuntu ec2 machines

@akusingh-tibco akusingh-tibco added the bug Something isn't working label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant