crossplane-contrib / provider-alibaba

Crossplane provider for Alibaba Cloud
Apache License 2.0
50 stars 18 forks source link

Succeeded to deploy RDSInstance, but failed for reconciling #65

Closed zzxwill closed 3 years ago

zzxwill commented 3 years ago

What happened?

Applying the following RDSInstance yaml.

apiVersion: database.alibaba.crossplane.io/v1alpha1
kind: RDSInstance
metadata:
  name: poc
  labels:
    example: "true"
    engine: mysql
spec:
  forProvider:
    engine: mysql
    engineVersion: "8.0"
    dbInstanceClass: "rds.mysql.c1.large"
    dbInstanceStorageInGB: 20
    securityIPList: "0.0.0.0/0"
    masterUsername: "oam-dev"
  writeConnectionSecretToRef:
    namespace: crossplane-system
    name: example-rds-2
  providerConfigRef:
    name: default
  deletionPolicy: Delete

Alibaba cloud resource mysql db is successfully created, but the reconciling failed during to the following issue.

➜  /Users/zhouzhengxi/Downloads k get rdsinstance
NAME           READY   SYNCED   STATE     ENGINE   VERSION   AGE
poc            True    False    Running   mysql    8.0       4m24s
2021-03-20T17:56:34.331+0800    DEBUG   controller-runtime.manager.events   Warning {"object": {"kind":"RDSInstance","name":"poc","uid":"6e74fad2-ce0f-4ee6-b394-2367e11e5c39","apiVersion":"database.alibaba.crossplane.io/v1alpha1","resourceVersion":"18463048"}, "reason": "CannotObserveExternalResource", "message": "cannot create RDS database account: SDK.ServerError\nErrorCode: InvalidAccountName.Malformed\nRecommend: https://error-center.aliyun.com/status/search?Keyword=InvalidAccountName.Malformed&source=PopGw\nRequestId: 04A612C0-5A37-4F3D-95C0-2EAD856F9E2A\nMessage: The specified parameter \"AccountName\" is not valid."}

The result between Crossplane provider and Alibaba cloud resource should be consistent.

How can we reproduce it?

Apply the template above.

What environment did it happen in?

Crossplane version: v0.12.0

zzxwill commented 3 years ago

This will also lead to failure of deleting the managed resource as the Observer is in infinite loop.

zzxwill commented 3 years ago

More time need to wait for the RDS's provisioning.