Skip to content

Commit 62e60ad

Browse files
authored
Merge pull request #16 from qonto/runbook-improvement
Add mitigations commands for RDSUnappliedParameters
2 parents 89bd806 + 0c91c8b commit 62e60ad

File tree

1 file changed

+59
-3
lines changed

1 file changed

+59
-3
lines changed

content/runbooks/rds/RDSUnappliedParameters.md

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RDS parameter groups have `dynamic` and `static` parameters:
3131

3232
1. Check instance status
3333

34-
If instance is in `creating` status, the parameter group should be applied automatically by AWS in few minutes.
34+
If the instance is in `creating` status, the parameter group should be applied automatically by AWS in a few minutes.
3535

3636
1. Identify the RDS parameter group used by the RDS instance
3737

@@ -113,8 +113,64 @@ RDS parameter groups have `dynamic` and `static` parameters:
113113

114114
## Mitigation
115115

116-
- Apply RDS parameter group changes by restarting the RDS instance
116+
You must restart the RDS instance to fix the `pending-reboot` apply status.
117+
118+
{{< hint warning >}}
119+
**Important**
120+
121+
The following mitigation measures will restart the RDS instance, resulting in a **momentary outage**. You may consider shutting down the database clients and informing users first.
122+
{{< /hint >}}
123+
124+
1. Find a suitable time slot to restart the instance
125+
126+
Reboot operation can't be performed if the instance isn't in the `available` state. Avoid backup maintenance windows.
127+
128+
1. Apply RDS parameter group changes by restarting the RDS instance
129+
130+
```bash
131+
aws rds reboot-db-instance --no-force-failover --db-instance-identifier ${DB_IDENTIFIER}
132+
```
133+
134+
This operation is performed asynchronously, it could take several minutes.
135+
136+
<details>
137+
<summary>How to see when the restart occurred?</summary>
138+
139+
You can monitor the RDS events
140+
141+
```bash
142+
aws rds describe-events --source-type db-instance --event-categories "availability" --source-identifier ${DB_IDENTIFIER} | jq -r '.Events[] | (.Date + ":" + .Message)'
143+
```
144+
145+
Example:
146+
147+
```bash
148+
$ aws rds describe-events --source-type db-instance --event-categories "availability" --source-identifier ${DB_IDENTIFIER} | jq -r '.Events[] | (.Date + ":" + .Message)'
149+
2023-11-29T09:51:13.187000+00:00:DB instance restarted
150+
```
151+
152+
</details>
153+
154+
1. Check parameter group apply status is now `in-sync`.
155+
156+
```bash
157+
aws rds describe-db-instances --db-instance-identifier ${DB_IDENTIFIER} --query 'DBInstances[0].DBParameterGroups[0]'
158+
```
159+
160+
<details>
161+
<summary>Example</summary>
162+
163+
```bash
164+
$ aws rds describe-db-instances --db-instance-identifier ${DB_IDENTIFIER} --query 'DBInstances[0].DBParameterGroups[0]'
165+
{
166+
"DBParameterGroupName": "postgres14-primary",
167+
"ParameterApplyStatus": "in-sync"
168+
}
169+
```
170+
171+
</details>
117172

118173
## Additional resources
119174

120-
- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html>
175+
- [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html)
176+
- [Rebooting a DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RebootInstance.html)

0 commit comments

Comments
 (0)