[Feature flag] Rollout of `geo_proxy_direct_to_primary`
Summary
This issue is to rollout the feature on production,
that is currently behind the geo_proxy_direct_to_primary
feature flag.
Owners
- Team: groupgeo
- Most appropriate slack channel to reach out to:
#g_geo
- Best individual to reach out to: @mkozono
- PM: @sranasinghe
Stakeholders
Expectations
What are we expecting to happen?
If the feature flag is enabled, then Geo secondary sites receiving Git pushes over SSH will proxy the Git requests to the primary site over HTTP, without using the secondary site's Rails app as an intermediary.
When is the feature viable?
- Requires gitlab-shell!716 (merged) to be already deployed.
- Only impacts Git over SSH requests against Geo secondary sites.
What might happen if this goes wrong?
Geo secondary sites might fail to handle Git over SSH requests.
What can we monitor to detect problems with this?
Consider mentioning checks for 5xx errors or other anomalies like an increase in redirects (302 HTTP response status)
- If GitLab Shell in Geo secondary sites do not build the Git over HTTP push requests correctly, then the primary site may see malformed Git over HTTP push requests coming from Geo secondary sites.
- Errors in Git over SSH requests against Geo secondary sites.
- Less likely, errors in Git over SSH requests against primary or non-Geo sites.
What can we check for monitoring production after rollouts?
Consider adding links to check for Sentry errors, Production logs for 5xx, 302s, etc.
Rollout Steps
Note: Please make sure to run the chatops commands in the slack channel that gets impacted by the command.
Rollout on non-production environments
-
Verify the MR with the feature flag is merged to master. - Verify that the feature MRs have been deployed to non-production environments with:
-
/chatops run auto_deploy status <merge-commit-of-your-feature>
-
-
Enable the feature globally on non-production environments. -
/chatops run feature set geo_proxy_direct_to_primary true --dev --staging --staging-ref
-
-
Verify that the feature works as expected. Posting the QA result in this issue is preferable. The best environment to validate the feature in is staging-canary as this is the first environment deployed to. Note you will need to make sure you are configured to use canary as outlined here when accessing the staging environment in order to make sure you are testing appropriately.
Specific rollout on production
Geo is not configured in production.
Preparation before global rollout
Geo is not configured in production.
Global rollout on production
Geo is not configured in production.
(Optional) Release the feature with the feature flag
If you're still unsure whether the feature is deemed stable but want to release it in the current milestone, you can change the default state of the feature flag to be enabled. To do so, follow these steps:
-
Create a merge request with the following changes. Ask for review and merge it. => !121793 (merged) -
Set the default_enabled
attribute in the feature flag definition totrue
. -
Review what warrants a changelog entry and decide if a changelog entry is needed.
-
-
Ensure that the default-enabling MR has been included in the release package. If the merge request was deployed before the monthly release was tagged, the feature can be officially announced in a release blog post. -
/chatops run release check https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121793 16.1
https://gitlab.slack.com/archives/C02LN0K1N3Y/p1685740510173279
-
-
Consider cleaning up the feature flag from all environments by running these chatops command in #production
channel. Otherwise these settings may override the default enabled.-
/chatops run feature delete geo_proxy_direct_to_primary --dev --staging --staging-ref --production
https://gitlab.slack.com/archives/C02LN0K1N3Y/p1685739192698239
-
-
Close the feature issue to indicate the feature will be released in the current milestone. - [-] Set the next milestone to this rollout issue for scheduling the flag removal.
-
(Optional) You can create a separate issue for scheduling the steps below to Release the feature. => #390104 (closed) -
Set the title to "[Feature flag] Cleanup geo_proxy_direct_to_primary
". -
Execute the /copy_metadata <this-rollout-issue-link>
quick action to copy the labels from this rollout issue. -
Link this rollout issue as a related issue. -
Close this rollout issue.
-
WARNING: This approach has the downside that it makes it difficult for us to clean up the flag. For example, on-premise users could disable the feature on their GitLab instance. But when you remove the flag at some point, they suddenly see the feature as enabled and they can't roll it back to the previous behavior. To avoid this potential breaking change, use this approach only for urgent matters.
Rollback Steps
-
This feature can be disabled by running the following Chatops command:
/chatops run feature set geo_proxy_direct_to_primary false