summaryrefslogtreecommitdiff
path: root/manifests/base.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-03-12 16:02:56 +0100
committervarac <varacanero@zeromail.org>2013-03-12 16:02:56 +0100
commit7c9462a0fab1c6e499b62caa2093dedfa9c8adc8 (patch)
tree88d78a236361b4ac596efcc91aa2f387d6c2dd48 /manifests/base.pp
parent546350d6f6e83e9ea22db79d07bdc38c694fbcdb (diff)
Added Exec[wait_for_couchdb]
So Couchdb::Query and Couchdb::Update doesn't try to connect to couchdb before it is up and running. That fixes a nasty race condition, see Fix doc update error on puppetrun (Feature #1964).
Diffstat (limited to 'manifests/base.pp')
-rw-r--r--manifests/base.pp10
1 files changed, 9 insertions, 1 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 45d991b..7afe1a0 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -16,10 +16,18 @@ class couchdb::base {
ensure => running,
hasstatus => true,
enable => true,
- require => Package['couchdb'],
+ require => Package['couchdb']
+ }
+
+ # todo: make host/port configurable
+ exec {'wait_for_couchdb':
+ command => 'wget --retry-connrefused --tries 10 --quiet "http://127.0.0.1:5984" -O /dev/null',
+ require => Service['couchdb']
}
# required for couch-doc-update script
+
+
package { 'couchrest':
ensure => installed,
provider => 'gem'