crossplane-contrib / provider-upjet-aws

Official AWS Provider for Crossplane by Upbound.
https://marketplace.upbound.io/providers/upbound/provider-aws
Apache License 2.0
143 stars 120 forks source link

Reconciliation is failing for rds aurora-postgresql database cluster and database instances #709

Closed Teja446 closed 1 month ago

Teja446 commented 1 year ago

What happened?

I have created a rds cluster with one reader cluster instance and one writer cluster instance using rds.aws.upbound.io/v1beta1

Note :-yaml code indentation not proper in comments , so attaching the code files as well. Please attached code aurora_xrd, aurora_comp, aurora_claim aurora_claim.txt aurora_comp.txt aurora_xrd.txt

cluster and cluster instances composition:-

apiVersion: apiextensions.crossplane.io/v1 kind: Composition metadata: name: aurorapostgresqlcomp spec: writeConnectionSecretsToNamespace: upbound-system compositeTypeRef: apiVersion: auroradb.ccp.org/v1alpha1 kind: auroradbcluster resources:

Error scenario 1 :-

I have created a cluster with one reader instance and one writer instance , first deleted one reader instance. Cluster instances are not getting created after deletion from console , reconciliation is failing and throwing an error “ Message: apply failed: error creating RDS Cluster (auroradbcluster-vk-lt2rm) Instance: InvalidParameterCombination: The requested DB Instance will be a member of a DB Cluster. Set backup window for the DB Cluster” . I have setup backup window for cluster , even though observing same issue image

Error scenario 2 :-

After deleting one reader instance(As explained scenario 1 ) , Now remaining resources are cluster and one writer instance . Now I deleted writer instance , cluster is also getting deleted with that writer instance as there is no instance remaining . In this case also , reconciliation is not happening . Cluster and cluster instances are not getting created back . I have described the cluster claim resource to check the error , got error message as “Message: apply failed: error creating RDS cluster: InvalidParameterCombination: AllocatedStorage isn't supported for DB engine aurora-postgresql” . Allocated storage is not defined in composition itself , even though this error is observing.

image

How can we reproduce it? Create the cluster and cluster instance resource, for example by using the below Composition. Check the created resource READY: True and SYNCED: True Delete cluster instance and verify reconciliation (cluster instance is not creating back) Delete another instance also now cluster will also get deleted as there are no instances remaining, verify reconciliation after deleting cluster (Cluster and cluster instances are not creating back) Check the resources in rds section in aws console --resources are not getting created back , this should not happen

The XRD that we are using:

apiVersion: apiextensions.crossplane.io/v1 kind: CompositeResourceDefinition metadata: name: auroradbclusters.auroradb.ccp.org spec: group: auroradb.ccp.org names: kind: auroradbcluster plural: auroradbclusters versions:

apiVersion: apiextensions.crossplane.io/v1 kind: Composition metadata: name: aurorapostgresqlcomp spec: writeConnectionSecretsToNamespace: upbound-system compositeTypeRef: apiVersion: auroradb.ccp.org/v1alpha1 kind: auroradbcluster resources:

The claim for this composition:

apiVersion: auroradb.ccp.org/v1alpha1 kind: auroradbcluster metadata: name: test-auroradbcluster spec: parameters: engine: aurora-postgresql engineVersion: "14.6" dbinstanceclass: db.r5.large region: us-east-1

What environment did it happen in? Crossplane Version: v1.12.1 Provider Version: v0.35.0 Kubernetes Version: v1.26.4 Kubernetes Distribution: EKS

svscheg commented 1 year ago

The issue reproduced on the latest master. Provider Version: v0.35.0

Teja446 commented 1 year ago

When can we expect the fix? Any timeline decided.

Teja446 commented 1 year ago

Reconciliation is still failing with latest version of AWS release: v0.3.6 Step1. Created Auroradb cluster with one reader and one writer instance image Step2. Reconciliation verification with latest aws version : v0.36.0 :-Deleted the one reader Cluster instance((“auroradbcluster-verify-q4wfs” ), but it is not creating after deletion. Reconciliation is not working , resource is not getting created automatically.

Note :- Tried above scenarios with latest version of upbound aws provider : v0.36.0

Teja446 commented 1 year ago

Any update on this ?

Teja446 commented 1 year ago

Any update on fix?

github-actions[bot] commented 6 months ago

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

github-actions[bot] commented 1 month ago

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

github-actions[bot] commented 1 month ago

This issue is being closed since there has been no activity for 14 days since marking it as stale. If you still need help, feel free to comment or reopen the issue!