diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-05-23 16:09:00 +0200 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-02 19:45:58 +0200 |
commit | ef9f23b797d7467a1d1bda15e29d1f33b070065f (patch) | |
tree | fff741860bfb8f574cd28f0c2ae4cc0a7a14c342 | |
parent | 254830c1f963f344585a45d96a03985e1ec2df0e (diff) | |
download | gitlab-ce-ef9f23b797d7467a1d1bda15e29d1f33b070065f.tar.gz |
Mark migration as requiring no downtime
+ Add spaces for four phases approach
+ fix InfluxDB rename
-rw-r--r-- | app/views/admin/application_settings/_form.html.haml | 2 | ||||
-rw-r--r-- | config.ru | 1 | ||||
-rw-r--r-- | db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb | 2 | ||||
-rw-r--r-- | spec/controllers/metrics_controller_spec.rb | 5 |
4 files changed, 9 insertions, 1 deletions
diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index 3c020c71832..d552704df88 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -234,7 +234,7 @@ %fieldset %legend Metrics - Influx %p - Setup Influx to measure a wide variety of statistics like the time spent + Setup InfluxDB to measure a wide variety of statistics like the time spent in running SQL queries. These settings require a = link_to 'restart', help_page_path('administration/restart_gitlab') to take effect. diff --git a/config.ru b/config.ru index cac4cf10c36..2614c9aaf74 100644 --- a/config.ru +++ b/config.ru @@ -14,6 +14,7 @@ if defined?(Unicorn) use Unicorn::WorkerKiller::Oom, min, max end end + # set default directory for multiproces metrics gathering ENV['prometheus_multiproc_dir'] ||= 'tmp/prometheus_data_dir' diff --git a/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb b/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb index e675fb7cd58..4e2c94be943 100644 --- a/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb +++ b/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb @@ -2,6 +2,8 @@ class AddPrometheusSettingsToMetricsSettings < ActiveRecord::Migration include Gitlab::Database::MigrationHelpers disable_ddl_transaction! + DOWNTIME = false + def up add_column_with_default(:application_settings, :prometheus_metrics_enabled, :boolean, default: false, allow_null: false) diff --git a/spec/controllers/metrics_controller_spec.rb b/spec/controllers/metrics_controller_spec.rb index 99ad7b7738b..cd31f750ffd 100644 --- a/spec/controllers/metrics_controller_spec.rb +++ b/spec/controllers/metrics_controller_spec.rb @@ -27,6 +27,7 @@ describe MetricsController do it 'returns DB ping metrics' do get :metrics + expect(response.body).to match(/^db_ping_timeout 0$/) expect(response.body).to match(/^db_ping_success 1$/) expect(response.body).to match(/^db_ping_latency [0-9\.]+$/) @@ -34,6 +35,7 @@ describe MetricsController do it 'returns Redis ping metrics' do get :metrics + expect(response.body).to match(/^redis_ping_timeout 0$/) expect(response.body).to match(/^redis_ping_success 1$/) expect(response.body).to match(/^redis_ping_latency [0-9\.]+$/) @@ -41,6 +43,7 @@ describe MetricsController do it 'returns file system check metrics' do get :metrics + expect(response.body).to match(/^filesystem_access_latency{shard="default"} [0-9\.]+$/) expect(response.body).to match(/^filesystem_accessible{shard="default"} 1$/) expect(response.body).to match(/^filesystem_write_latency{shard="default"} [0-9\.]+$/) @@ -56,6 +59,7 @@ describe MetricsController do it 'returns proper response' do get :metrics + expect(response.status).to eq(404) end end @@ -64,6 +68,7 @@ describe MetricsController do context 'without authorization token' do it 'returns proper response' do get :metrics + expect(response.status).to eq(404) end end |