Skip to content

Commit c6cdcb6

Browse files
authored
Update terminal exception code to not include recoverable states (#58)
Issue #, if available: aws-controllers-k8s/community#1151 Description of changes: * Remove *InvalidDBClusterStateFault*, *InvalidDBInstanceStateFault*, *InvalidDBInstanceState* and *InvalidVPCNetworkStateFault* from Terminal Exception codes * All these errors are recoverable and putting them in terminal state code causes reconciliation to stop in valid cases like deleting DBCluster and DBInstances together. When DBInstances eventually get deleted, the DeleteDBCluster call stops returning InvalidDBClusterStateFault as per [troubleshoot guide](https://aws.amazon.com/premiumsupport/knowledge-center/rds-error-delete-aurora-cluster/) * If there are specific cases where these errors will need to enforce Terminal State, custom hooks can be used in future. ------- * For DBCluster operations, "InvalidDBClusterStateFault", "InvalidDBInstanceStateFault", "InvalidVPCNetworkStateFault" go away when DBInstance and DBSubnetGroup get into correct state. * For DBInstance operations, "InvalidDBInstanceState" goes away when DBInstance moves into correct state * For GlobalCluster, the "InvalidDBClusterStateFault" goes away when DBCluster moves into correct state. ---- * locally tested that e2e tests are passing By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 5828a7f commit c6cdcb6

File tree

6 files changed

+6
-21
lines changed

6 files changed

+6
-21
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2022-01-31T20:38:22Z"
3-
build_hash: 4ebcd703a95a2fbd71bd07130f92aa6813c1398b
4-
go_version: go1.17.1
5-
version: v0.16.3
2+
build_date: "2022-02-02T19:12:40Z"
3+
build_hash: 76bb8df5f54ad3791f93f4aa4d805f61fccb3591
4+
go_version: go1.17.5
5+
version: v0.16.4
66
api_directory_checksum: cae902b75e1b0827659c4bfe7ef9f6bb98769f5c
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.37.10
99
generator_config_info:
10-
file_checksum: e87619caa6304d2a07818296e3a6a5fd4da1e704
10+
file_checksum: 9e97b1b3599949c830774210b9c24676b613b9d5
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,7 @@ resources:
8383
- InvalidParameter
8484
- InvalidParameterValue
8585
- InvalidParameterCombination
86-
- InvalidDBClusterStateFault
87-
- InvalidDBInstanceStateFault
8886
- InvalidSubnet
89-
- InvalidVPCNetworkStateFault
9087
- KMSKeyNotAccessibleFault
9188
- StorageQuotaExceeded
9289
fields:
@@ -129,7 +126,6 @@ resources:
129126
- InvalidParameter
130127
- InvalidParameterValue
131128
- InvalidParameterCombination
132-
- InvalidDBInstanceState
133129
- DBSecurityGroupNotFound
134130
- DBSubnetGroupNotFoundFault
135131
- DBParameterGroupNotFound
@@ -158,7 +154,6 @@ resources:
158154
terminal_codes:
159155
- GlobalClusterAlreadyExistsFault
160156
- GlobalClusterQuotaExceededFault
161-
- InvalidDBClusterStateFault
162157
fields:
163158
GlobalClusterIdentifier:
164159
is_primary_key: true

generator.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,7 @@ resources:
8383
- InvalidParameter
8484
- InvalidParameterValue
8585
- InvalidParameterCombination
86-
- InvalidDBClusterStateFault
87-
- InvalidDBInstanceStateFault
8886
- InvalidSubnet
89-
- InvalidVPCNetworkStateFault
9087
- KMSKeyNotAccessibleFault
9188
- StorageQuotaExceeded
9289
fields:
@@ -129,7 +126,6 @@ resources:
129126
- InvalidParameter
130127
- InvalidParameterValue
131128
- InvalidParameterCombination
132-
- InvalidDBInstanceState
133129
- DBSecurityGroupNotFound
134130
- DBSubnetGroupNotFoundFault
135131
- DBParameterGroupNotFound
@@ -158,7 +154,6 @@ resources:
158154
terminal_codes:
159155
- GlobalClusterAlreadyExistsFault
160156
- GlobalClusterQuotaExceededFault
161-
- InvalidDBClusterStateFault
162157
fields:
163158
GlobalClusterIdentifier:
164159
is_primary_key: true

pkg/resource/db_cluster/sdk.go

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/resource/db_instance/sdk.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/resource/global_cluster/sdk.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)