Tim Landscheidt has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/329390 )
Change subject: puppetdb: Use tuning.conf only in production ...................................................................... puppetdb: Use tuning.conf only in production tuning.conf is tailored for the actual production hosts PuppetDB runs on. In Labs, its "shared_buffers = 7680MB" will make it impossible to start PostgreSQL on most types of instances. Rather than trying to optimize for possibly vastly different environments (small vs. large instances, instances with only PuppetDB running or other applications as well, etc.), for Labs this change just uses the PostgreSQL defaults instead. Change-Id: Iacb20d86a7ff04412f578108c6e42c268680a4ff --- M modules/role/manifests/puppetmaster/puppetdb.pp 1 file changed, 22 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/90/329390/1 diff --git a/modules/role/manifests/puppetmaster/puppetdb.pp b/modules/role/manifests/puppetmaster/puppetdb.pp index ac03a10..80b1ff6 100644 --- a/modules/role/manifests/puppetmaster/puppetdb.pp +++ b/modules/role/manifests/puppetmaster/puppetdb.pp @@ -68,12 +68,28 @@ } # Tuning - file { '/etc/postgresql/9.4/main/tuning.conf': - ensure => 'present', - owner => 'root', - group => 'root', - mode => '0444', - source => 'puppet:///modules/role/puppetdb/tuning.conf', + if $::realm == 'production' { + file { '/etc/postgresql/9.4/main/tuning.conf': + ensure => 'present', + owner => 'root', + group => 'root', + mode => '0444', + source => 'puppet:///modules/role/puppetdb/tuning.conf', + } + } else { + # tuning.conf is tailored for the actual production hosts + # PuppetDB runs on. For Labs, rather than trying to optimize + # for possibly vastly different environments (small vs. large + # instances, instances with only PuppetDB running or other + # applications as well, etc.), we rely on PostgreSQL defaults + # instead. + file { '/etc/postgresql/9.4/main/tuning.conf': + ensure => 'present', + owner => 'root', + group => 'root', + mode => '0444', + content => '', + } } sysctl::parameters { 'postgres_shmem': -- To view, visit https://gerrit.wikimedia.org/r/329390 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iacb20d86a7ff04412f578108c6e42c268680a4ff Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Landscheidt <t...@tim-landscheidt.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits