You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deleting a CloudSQLInstance object with .spec.deletionPolicy: delete and a non empty .spec.failoverReplica, the external resource doesn't get deleted with the error:
Warning CannotDeleteExternalResource 4m33s (x8 over 5m47s) managed/cloudsqlinstance.database.gcp.crossplane.io cannot delete the CloudSQL instance: googleapi: Error 400: The requested operation is not valid for a replication master instance., errorReplicationMasterInvalidOperation
This means that the failover replica has to be deleted first, and indeed if I do it myself, then both the managed and external resource get deleted.
And as far as I've seen in the code, the gcp provider does not check if there's a failover replica and try to delete that one first:
I've tried also to see if there was any similar issue but didn't find any, I'm not sure if I'm doing something wrong. If not, I'm happy to come up with a PR.
Crossplane version: v1.6.4 (planning to test with latest soon)
Provider GCP Version: v0.20.0 (planning to test with latest soon)
Kubernetes Version: Client v1.22.0, Server v1.22.12-gke-1200
OS: Container-Optimized OS
Kernel: Linux 5.10.127
The text was updated successfully, but these errors were encountered:
What happened?
When deleting a
CloudSQLInstance
object with.spec.deletionPolicy: delete
and a non empty.spec.failoverReplica
, the external resource doesn't get deleted with the error:This means that the failover replica has to be deleted first, and indeed if I do it myself, then both the managed and external resource get deleted.
And as far as I've seen in the code, the gcp provider does not check if there's a failover replica and try to delete that one first:
https://github.com/crossplane-contrib/provider-gcp/blob/master/pkg/controller/database/cloudsql.go#L192-L203
I've tried also to see if there was any similar issue but didn't find any, I'm not sure if I'm doing something wrong. If not, I'm happy to come up with a PR.
How can we reproduce it?
What environment did it happen in?
Crossplane version: v1.6.4 (planning to test with latest soon)
Provider GCP Version: v0.20.0 (planning to test with latest soon)
Kubernetes Version: Client v1.22.0, Server v1.22.12-gke-1200
OS: Container-Optimized OS
Kernel: Linux 5.10.127
The text was updated successfully, but these errors were encountered: