diff --git a/files/gitlab-config-template/gitlab.rb.template b/files/gitlab-config-template/gitlab.rb.template index 308afda689a2b7eee670c96daa84ecb2bc94c1c2_ZmlsZXMvZ2l0bGFiLWNvbmZpZy10ZW1wbGF0ZS9naXRsYWIucmIudGVtcGxhdGU=..228e2b9d7848132177fc50662fc69b9db0669272_ZmlsZXMvZ2l0bGFiLWNvbmZpZy10ZW1wbGF0ZS9naXRsYWIucmIudGVtcGxhdGU= 100644 --- a/files/gitlab-config-template/gitlab.rb.template +++ b/files/gitlab-config-template/gitlab.rb.template @@ -2419,6 +2419,7 @@ # } # } # praefect['background_verification_verification_interval'] = "72h" +# praefect['background_verification_delete_invalid_records'] = false # praefect['sentry_dsn'] = "https://<key>:<secret>@sentry.io/<project>" # praefect['sentry_environment'] = "production" # praefect['auto_migrate'] = true diff --git a/files/gitlab-cookbooks/praefect/attributes/default.rb b/files/gitlab-cookbooks/praefect/attributes/default.rb index 308afda689a2b7eee670c96daa84ecb2bc94c1c2_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9wcmFlZmVjdC9hdHRyaWJ1dGVzL2RlZmF1bHQucmI=..228e2b9d7848132177fc50662fc69b9db0669272_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9wcmFlZmVjdC9hdHRyaWJ1dGVzL2RlZmF1bHQucmI= 100644 --- a/files/gitlab-cookbooks/praefect/attributes/default.rb +++ b/files/gitlab-cookbooks/praefect/attributes/default.rb @@ -42,3 +42,4 @@ default['praefect']['consul_service_name'] = 'praefect' default['praefect']['consul_service_meta'] = nil default['praefect']['background_verification_verification_interval'] = nil +default['praefect']['background_verification_delete_invalid_records'] = nil diff --git a/files/gitlab-cookbooks/praefect/templates/default/praefect-config.toml.erb b/files/gitlab-cookbooks/praefect/templates/default/praefect-config.toml.erb index 308afda689a2b7eee670c96daa84ecb2bc94c1c2_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9wcmFlZmVjdC90ZW1wbGF0ZXMvZGVmYXVsdC9wcmFlZmVjdC1jb25maWcudG9tbC5lcmI=..228e2b9d7848132177fc50662fc69b9db0669272_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9wcmFlZmVjdC90ZW1wbGF0ZXMvZGVmYXVsdC9wcmFlZmVjdC1jb25maWcudG9tbC5lcmI= 100644 --- a/files/gitlab-cookbooks/praefect/templates/default/praefect-config.toml.erb +++ b/files/gitlab-cookbooks/praefect/templates/default/praefect-config.toml.erb @@ -67,6 +67,9 @@ <% if @background_verification_verification_interval %> verification_interval = '<%= @background_verification_verification_interval %>' <% end %> +<% if @background_verification_delete_invalid_records %> +delete_invalid_records = <%= @background_verification_delete_invalid_records %> +<% end %> <% @virtual_storages.each do |name, config| %> [[virtual_storage]] diff --git a/spec/chef/cookbooks/praefect/recipes/praefect_spec.rb b/spec/chef/cookbooks/praefect/recipes/praefect_spec.rb index 308afda689a2b7eee670c96daa84ecb2bc94c1c2_c3BlYy9jaGVmL2Nvb2tib29rcy9wcmFlZmVjdC9yZWNpcGVzL3ByYWVmZWN0X3NwZWMucmI=..228e2b9d7848132177fc50662fc69b9db0669272_c3BlYy9jaGVmL2Nvb2tib29rcy9wcmFlZmVjdC9yZWNpcGVzL3ByYWVmZWN0X3NwZWMucmI= 100644 --- a/spec/chef/cookbooks/praefect/recipes/praefect_spec.rb +++ b/spec/chef/cookbooks/praefect/recipes/praefect_spec.rb @@ -155,6 +155,7 @@ reconciliation_scheduling_interval: reconciliation_scheduling_interval, reconciliation_histogram_buckets: reconciliation_histogram_buckets, background_verification_verification_interval: '168h', + background_verification_delete_invalid_records: true, }) end @@ -197,7 +198,8 @@ 'scheduling_interval' => '1m' }, 'background_verification' => { - 'verification_interval' => '168h' + 'verification_interval' => '168h', + 'delete_invalid_records' => true }, 'sentry' => { 'sentry_dsn' => 'https://my_key:my_secret@sentry.io/test_project',