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
{{ message }}
This repository was archived by the owner on Jan 26, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,7 @@ This action detaches classic load balancers from subnets belonging to target AZ
131
131
132
132
#### Relational Database Service (RDS)
133
133
134
-
This action forces RDS to reboot and failover to another AZ:
134
+
This action forces RDS to reboot and failover to another AZ, and/or promotes one of the Aurora Replicas (read-only instances) in the DB cluster to be the primary instance (the cluster writer):
Copy file name to clipboardExpand all lines: azchaosaws/rds/actions.py
+93-4Lines changed: 93 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,8 @@ def fail_az(
19
19
configuration: Configuration=None,
20
20
) ->Dict[str, Any]:
21
21
"""
22
-
Reboots and forces a failover of your RDS instances to another AZ. Only RDS instances with the corresponding tags and is in the target AZ
22
+
Reboots and forces a failover of your RDS instances (including Aurora single-master clusters) to another AZ. Only RDS instances
23
+
and/or DB clusters with the corresponding tags and is in the target AZ
23
24
with Multi-AZ enabled will be impacted.
24
25
25
26
Parameters:
@@ -28,7 +29,7 @@ def fail_az(
28
29
dry_run (bool): The boolean flag to simulate a dry run or not. Setting to True will only run read-only operations and not make changes to resources. (Accepted values: True | False)
29
30
30
31
Optional:
31
-
tags (List[Dict[str, str]]): A list of key-value pairs to filter the RDS instance(s) by. (Default: [{'Key': 'AZ_FAILURE', 'Value': 'True'}])
32
+
tags (List[Dict[str, str]]): A list of key-value pairs to filter the RDS instance(s) and/or DB cluster(s) by. (Default: [{'Key': 'AZ_FAILURE', 'Value': 'True'}])
"[RDS] No DB instances to failover... Ensure that the DBs in the AZ you specified are tagged with the tag filter you provided or tagged with the default value."
183
+
)
184
+
else:
185
+
logger.info(
186
+
"[RDS] DB instances that was forced to failover: {} count({})".format(
187
+
success_failover_dbs, len(success_failover_dbs)
188
+
)
189
+
)
190
+
191
+
ifnotsuccess_failover_clusters:
192
+
logger.warning(
193
+
"[RDS] No DB clusters to failover... Ensure that the DB cluster(s) in with primary in the AZ you specified are tagged with the tag filter you provided or tagged with the default value."
194
+
)
195
+
else:
196
+
logger.info(
197
+
"[RDS] DB clusters that was forced to failover: {} count({})".format(
0 commit comments