cloudigrade / cloudigrade

A tool for tracking and reporting RHEL usage in public clouds
https://cloudigra.de
GNU General Public License v3.0
8 stars 7 forks source link

Upgrade RDS to latest minor version #1350

Closed infinitewarp closed 2 years ago

infinitewarp commented 2 years ago

Summary

As a cloudigrade sysop, I want cloudigrade running the latest supported minor version of postgresql so that I have the latest bug, security, and performance fixes.

Why are we doing this? SRE recently deprecated the auto_minor_version_upgrade parameter, and it looks like that means we have to apply upgrades manually. See SRE's Deprecation notice for RDS databases using auto_minor_version_upgrade defaults parameter.

At the time of writing...

# production DB
gabi "select version()" | jq -r '.[1][0]'
PostgreSQL 13.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-12), 64-bit

# current available 13.x versions in AWS
aws rds describe-db-engine-versions --engine postgres | \
  jq -r '.DBEngineVersions[] | .EngineVersion' | \
  grep '^13\.' | sort -rn
13.7
13.6
13.5
13.4
13.3

Acceptance Criteria

Assumptions and Questions

abellotti commented 2 years ago

As of today:

$ get_db_version.sh stage
PostgreSQL version of stage DB:
PostgreSQL 13.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-12), 64-bit
$ get_db_version.sh prod
PostgreSQL version of prod DB:
PostgreSQL 13.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-12), 64-bit
$ get_rds_versions.sh 13
AWS RDS Minor versions for version 13:
13.7 13.6 13.5 13.4 13.3

Looks like we only need to update the minor version for prod.

abellotti commented 2 years ago
abellotti commented 2 years ago

For completion, I've also checked the latest Ephemeral deployment DB for us and got:

$ get_db_version.sh  ephemeral
PostgreSQL version of ephemeral DB:
PostgreSQL 13.7 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
abellotti commented 2 years ago

Where the configurations are:

abellotti commented 2 years ago

As far as Ephemeral, the minor version is fixed, we can only specify the major, see discussion here: https://coreos.slack.com/archives/C022YV4E0NA/p1667420485408689

infinitewarp commented 2 years ago

Also, I updated our monthly calendar reminder about gabi to also remind us about RDS versions.

abellotti commented 2 years ago

Schedule kicked in:

$ get_db_version.sh prod
PostgreSQL version of prod DB:
PostgreSQL 13.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-12), 64-bit
infinitewarp commented 2 years ago

Thanks for the quick check! Looks like this is all done. 👍