Merge branch '2189-fix-geo-secondary' into 'master'

Resolve "Post-install script failed during an install with Geo secondary enabled"

Closes #2189

See merge request !1464
This commit is contained in:
Marin Jankovski 2017-04-11 14:33:25 +00:00
commit ba19b7c0fe
5 changed files with 12 additions and 25 deletions

View File

@ -1,18 +0,0 @@
#
# Copyright:: Copyright (c) 2016 GitLab B.V.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
node.consume_attributes(GitlabEE.generate_config)

View File

@ -16,7 +16,6 @@
#
include_recipe 'gitlab::default'
include_recipe 'gitlab-ee::config'
[
'sentinel',

View File

@ -102,10 +102,11 @@ end
# run only on new installation at which point we expect to have correct binaries.
include_recipe 'gitlab::postgresql-bin'
if node['gitlab']['geo-postgresql']['bootstrap']
execute 'start geo-postgresql' do
command '/opt/gitlab/bin/gitlab-ctl start geo-postgresql'
retries 20
execute 'start geo-postgresql' do
command '/opt/gitlab/bin/gitlab-ctl start geo-postgresql'
retries 20
unless node['gitlab']['geo-postgresql']['bootstrap']
action :nothing
end
end

View File

@ -22,3 +22,8 @@ if File.exists?('/etc/gitlab/gitlab.rb')
end
node.consume_attributes(Gitlab.generate_config(node['fqdn']))
# If is EE package, load EE config
if defined?(GitlabEE) == 'constant'
node.consume_attributes(GitlabEE.generate_config)
end

View File

@ -13,7 +13,7 @@ describe GitlabGeo do
RSpec::Mocks.with_temporary_scope do
stub_gitlab_rb(geo_primary_role: { enable: true })
end
ChefSpec::SoloRunner.converge('gitlab::config', 'gitlab-ee::config')
ChefSpec::SoloRunner.converge('gitlab::config', 'gitlab-ee::default')
end
context 'in postgres settings' do
@ -46,7 +46,7 @@ describe GitlabGeo do
RSpec::Mocks.with_temporary_scope do
stub_gitlab_rb(geo_secondary_role: { enable: true })
end
ChefSpec::SoloRunner.converge('gitlab::config', 'gitlab-ee::config')
ChefSpec::SoloRunner.converge('gitlab::config', 'gitlab-ee::default')
end
context 'in geo_postgres settings' do