2023-05-24: Upgrade Omnibus and apply configuration changes to Redis nodes in gprd
Production Change
Change Summary
This CR is being done to complete this CA.
- Redis nodes in
gprd
need to be running at least Omnibus version15.11.0
for the configuration options we're changing to be available. - We're setting configuration options that will (theoretically) allow Redis/Sentinel to start on machine boot, and also delay the startup of the service for a short period of time to avoid replicating from a fresh node (and subsequent data loss).
- Finally we're applying the actual fix for the problem of Redis not starting up on boot: applying the change that was tested on
gstg
in this CR - deleting the downfiles for the services.
Change Details
- Services Impacted - ServiceRedis ServiceRedisCache ServiceRedisCacheSentinel ServiceRedisDbLoadBalancing ServiceRedisRepositoryCache ServiceRedisSessions ServiceRedisSidekiq ServiceRedisTraceChunks
-
Change Technician -
@ayeung
- Change Reviewer - @gsgl
- Time tracking - 2 days
- Downtime Component - some Redis writes may error while failing over between nodes
Detailed steps for the change
Change Steps - steps to take to execute the change
Estimated Time to Complete (mins) - 120 minutes (2 hours)
-
Apply this patch to this script diff --git a/scripts/redis-reconfigure.sh b/scripts/redis-reconfigure.sh index 8d97a929e..ce8fdf825 100755 --- a/scripts/redis-reconfigure.sh +++ b/scripts/redis-reconfigure.sh @@ -111,7 +111,7 @@ check_sentinel_quorum() { run_chef_client() { echo chef-client wait_for_input - ssh "$fqdn" "sudo chef-client" + ssh "$fqdn" "sudo chef-client-enable && sudo chef-client" }
-
Set label changein-progress /label ~change::in-progress
-
Stop Chef on all Redis nodes in gprd
by runningbundle exec knife ssh --no-host-key-verify roles:gprd-base-db-redis "sudo chef-client-disable https://gitlab.com/gitlab-com/gl-infra/production/-/issues/14511"
-
Merge and apply https://gitlab.com/gitlab-com/gl-infra/chef-repo/-/merge_requests/3533 -
Upgrade Omnibus version and reconfigure all clusters. WAIT at least 5 minutes between each cluster and monitor metrics. ./redis-reconfigure.sh gprd redis-sessions ./redis-reconfigure.sh gprd redis-cache ./redis-reconfigure.sh gprd redis-sidekiq ./redis-reconfigure.sh gprd redis-repository-cache ./redis-reconfigure.sh gprd redis-cache-sentinel ./redis-reconfigure.sh gprd redis-tracechunks ./redis-reconfigure.sh gprd redis-db-load-balancing ./redis-reconfigure.sh gprd redis
-
Stop Chef again on all Redis nodes in gprd
by runningbundle exec knife ssh --no-host-key-verify roles:gprd-base-db-redis "sudo chef-client-disable"
-
Merge and apply https://gitlab.com/gitlab-com/gl-infra/chef-repo/-/merge_requests/3538 -
Change Redis configuration settings and reconfigure all clusters. WAIT at least 5 minutes between each cluster and monitor metrics. ./redis-reconfigure.sh gprd redis-sessions ./redis-reconfigure.sh gprd redis-cache ./redis-reconfigure.sh gprd redis-sidekiq ./redis-reconfigure.sh gprd redis-repository-cache ./redis-reconfigure.sh gprd redis-cache-sentinel ./redis-reconfigure.sh gprd redis-tracechunks ./redis-reconfigure.sh gprd redis-db-load-balancing ./redis-reconfigure.sh gprd redis
-
Apply Ansible playbook to remove downfiles -
Change the hosts
key in theredis-downfiles
playbook tohosts: gprd
so that the playbook is applied to thegprd
hosts in the inventory. Save. -
Run ansible-playbook playbook.yml -i hosts
and leave the output as a comment on this CR
-
-
Set label changecomplete /label ~change::complete
Rollback
Rollback steps - steps to be taken in the event of a need to rollback this change
Estimated Time to Complete (mins) - 30 mins
-
Create an MR reverting the last change that was merged (Omnibus upgrade or configuration change) -
Merge and apply MR -
Run reconfiguration for all clusters ./redis-reconfigure.sh gprd redis-sessions ./redis-reconfigure.sh gprd redis-cache ./redis-reconfigure.sh gprd redis-sidekiq ./redis-reconfigure.sh gprd redis-repository-cache ./redis-reconfigure.sh gprd redis-cache-sentinel ./redis-reconfigure.sh gprd redis-tracechunks ./redis-reconfigure.sh gprd redis-db-load-balancing ./redis-reconfigure.sh gprd redis
-
Set label changeaborted /label ~change::aborted
No rollback for downfile deletion necessary as they serve no purpose other than to prevent services from starting on boot.
Monitoring
Key metrics to observe
-
Metric: Redis Apdex score
- Location: https://dashboards.gitlab.net/d/redis-main/redis-overview?orgId=1
- What changes to this metric should prompt a rollback: Sustained degradation violating our SLOs
-
Metric: Redis Cache Apdex score
- Location: https://dashboards.gitlab.net/d/redis-cache-main/redis-cache-overview?orgId=1
- What changes to this metric should prompt a rollback: Sustained degradation violating our SLOs
-
Metric: Redis Sessions Apdex score
- Location: https://dashboards.gitlab.net/d/redis-sessions-main/redis-sessions-overview?orgId=1
- What changes to this metric should prompt a rollback: Sustained degradation violating our SLOs
-
Metric: Redis Sidekiq Apdex score
- Location: https://dashboards.gitlab.net/d/redis-sidekiq-main/redis-sidekiq-overview?orgId=1
- What changes to this metric should prompt a rollback: Sustained degradation violating our SLOs
-
Metric: Redis Tracechunks Apdex score
- Location: https://dashboards.gitlab.net/d/redis-tracechunks-main/redis-tracechunks-overview?orgId=1
- What changes to this metric should prompt a rollback: Sustained degradation violating our SLOs
-
Metric: Redis Repository Cache Apdex score
- Location: https://dashboards.gitlab.net/d/redis-repository-cache-main/redis-repository-cache-overview?orgId=1
- What changes to this metric should prompt a rollback: Sustained degradation violating our SLOs
-
Metric: Redis DB Load Balancing Apdex score
- Location: https://dashboards.gitlab.net/d/redis-db-load-balancing-main/redis-db-load-balancing-overview?orgId=1
- What changes to this metric should prompt a rollback: Sustained degradation violating our SLOs
Change Reviewer checklist
-
Check if the following applies: - The scheduled day and time of execution of the change is appropriate.
- The change plan is technically accurate.
- The change plan includes estimated timing values based on previous testing.
- The change plan includes a viable rollback plan.
- The specified metrics/monitoring dashboards provide sufficient visibility for the change.
-
Check if the following applies: - The complexity of the plan is appropriate for the corresponding risk of the change. (i.e. the plan contains clear details).
- The change plan includes success measures for all steps/milestones during the execution.
- The change adequately minimizes risk within the environment/service.
- The performance implications of executing the change are well-understood and documented.
- The specified metrics/monitoring dashboards provide sufficient visibility for the change.
- If not, is it possible (or necessary) to make changes to observability platforms for added visibility?
- The change has a primary and secondary SRE with knowledge of the details available during the change window.
- The labels blocks deployments and/or blocks feature-flags are applied as necessary
Change Technician checklist
-
Check if all items below are complete: - The change plan is technically accurate.
- This Change Issue is linked to the appropriate Issue and/or Epic
- Change has been tested in staging and results noted in a comment on this issue.
- A dry-run has been conducted and results noted in a comment on this issue.
- The change execution window respects the Production Change Lock periods.
- For C1 and C2 change issues, the change event is added to the GitLab Production calendar.
- For C1 and C2 change issues, the SRE on-call has been informed prior to change being rolled out. (In #production channel, mention
@sre-oncall
and this issue and await their acknowledgement.) - For C1 and C2 change issues, the SRE on-call provided approval with the eoc_approved label on the issue.
- For C1 and C2 change issues, the Infrastructure Manager provided approval with the manager_approved label on the issue.
- Release managers have been informed (If needed! Cases include DB change) prior to change being rolled out. (In #production channel, mention
@release-managers
and this issue and await their acknowledgment.) - There are currently no active incidents that are severity1 or severity2
- If the change involves doing maintenance on a database host, an appropriate silence targeting the host(s) should be added for the duration of the change.
Edited by Adeline Yeung