in files/gitlab-ctl-commands-ee/lib/geo/promote.rb [137:159]
def toggle_geo_services
return unless puma_enabled? || sidekiq_enabled? || geo_logcursor_enabled? || geo_postgresql_enabled?
log('Detected an application or a Sidekiq or a Geo log cursor or a Geo PostgreSQL node.')
unless progress_message('Disabling the secondary services and enabling the primary services in the cluster configuration file') do
if single_server_site?
GitlabCluster.config.set('primary', true)
GitlabCluster.config.set('secondary', false)
else
GitlabCluster.config.set('geo_secondary', 'enable', false) if puma_enabled? || sidekiq_enabled?
GitlabCluster.config.set('geo_logcursor', 'enable', false) if geo_logcursor_enabled?
GitlabCluster.config.set('geo_postgresql', 'enable', false) if geo_postgresql_enabled?
end
GitlabCluster.config.save
end
die("Unable to write to #{GitlabCluster::JSON_FILE}.")
end
end