Fixes the command that changes Shared Runners timeout.

For the migration process we need to ensure, that during the switch
moment no job on Shared Runners will be running. The baclout window
was scheduled to take 1 hour, and this is the timeout that we want
to enforce on Runners.

While we need to update the general Shared Runners named
`shared-runners-manager-X.gitlab.com` - since the timeout is currently
set to 3 hours, we should not touch `gitlab-org` labelled Shared
Runners named `gitlab-shared-runners-manager-X.gitlab.com`.

`gitlab-org` runners already are configured with a 1 hour timeout
and this is the expected timeout for them.

Since it aligns with what we need for the migration, I've updated
the commands that are changeing the timeout. Now we're not touching
the `gitlab-org` runners at all, which means that:

- there is no change during the preparation step (`gitlab-org` runners
  during the migration will be set to 1h timeout),
- the reconfiguration step (or the failover step) will not change
  the expected timeout of `gitlab-org` runners, which should be left
  as 1h after the migration is ended.
parent 42c07bc5
Pipeline #88640 passed with stage
in 1 minute and 1 second
......@@ -89,7 +89,7 @@ working order, including database replication between the two sites.
* `sudo crontab -e` to get an editor window, uncomment the line involving rsync
1. [ ] ↩️ {+ Fail-back Handler +}: Update GitLab shared runners to expire jobs after 3 hours
* In a Rails console, run:
* `Ci::Runner.instance_type.update_all(maximum_timeout: 10800)`
* `Ci::Runner.instance_type.where("id NOT IN (?)", Ci::Runner.instance_type.joins(:taggings).joins(:tags).where("tags.name = ?", "gitlab-org").pluck(:id)).update_all(maximum_timeout: 10800)`
1. [ ] ↩️ {+ Fail-back Handler +}: Enable access to the azure environment from the
outside world
* Staging: Revert https://dev.gitlab.org/cookbooks/chef-repo/merge_requests/2029
......
......@@ -125,7 +125,7 @@ These dashboards might be useful during the failover:
1. [ ] 🐺 {+ Coordinator +}: Update GitLab shared runners to expire jobs after 1 hour
* In a Rails console, run:
* `Ci::Runner.instance_type.update_all(maximum_timeout: 3600)`
* `Ci::Runner.instance_type.where("id NOT IN (?)", Ci::Runner.instance_type.joins(:taggings).joins(:tags).where("tags.name = ?", "gitlab-org").pluck(:id)).update_all(maximum_timeout: 3600)`
# T minus 1 hour (__FAILOVER_DATE__) [📁](bin/scripts/02_failover/050_t-1h)
......@@ -560,7 +560,7 @@ unexpected ways.
* Production: Apply https://dev.gitlab.org/cookbooks/chef-repo/merge_requests/2322
1. [ ] 🐺 {+ Coordinator +}: Update GitLab shared runners to expire jobs after 3 hours
* In a Rails console, run:
* `Ci::Runner.instance_type.update_all(maximum_timeout: 10800)`
* `Ci::Runner.instance_type.where("id NOT IN (?)", Ci::Runner.instance_type.joins(:taggings).joins(:tags).where("tags.name = ?", "gitlab-org").pluck(:id)).update_all(maximum_timeout: 10800)`
#### Phase 9: Communicate [📁](bin/scripts/02_failover/060_go/p09)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment