GWicke has uploaded a new change for review.
https://gerrit.wikimedia.org/r/173287
Change subject: Re-do several lost fixes in restbase module
......................................................................
Re-do several lost fixes in restbase module
A merge conflict in a git stash pop apparently lost most of the original fixes
in this patch, so re-do them here. This is a follow-up to 3cbb1eba8ab8d, and
adresses Alex's review comments there.
Change-Id: I55a63b60a606d13ba4f201d3cc5b9b22d793c0f6
---
M modules/restbase/manifests/init.pp
M modules/restbase/templates/restbase.default.erb
M modules/restbase/templates/restbase.init
3 files changed, 16 insertions(+), 30 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/87/173287/1
diff --git a/modules/restbase/manifests/init.pp
b/modules/restbase/manifests/init.pp
index 0362a91..3747433 100644
--- a/modules/restbase/manifests/init.pp
+++ b/modules/restbase/manifests/init.pp
@@ -12,6 +12,9 @@
# [*seeds*]
# Array of cassandra hosts (IP or host names) to contact.
# Default: ['localhost']
+# [*cassandra_defaultConsistency*]
+# Default cassandra query consistency level. Typically 'one' or
+# 'localQuorum'. Default: 'localQuorum'.
# [*port*]
# Port where to run the restbase service. Default: 7231
# [*logstash_host*]
@@ -51,7 +54,7 @@
ensure => directory,
owner => 'restbase',
group => 'restbase',
- mode => '0775',
+ mode => '755',
before => Service['restbase'],
}
@@ -59,7 +62,7 @@
content => template('restbase/restbase.default.erb'),
owner => 'root',
group => 'root',
- mode => '0444',
+ mode => '444',
notify => Service['restbase'],
}
@@ -67,15 +70,15 @@
content => template('restbase/restbase.init'),
owner => 'root',
group => 'root',
- mode => '0755',
+ mode => '755',
notify => Service['restbase'],
}
file { '/etc/restbase':
ensure => directory,
- owner => 'restbase',
- group => 'restbase',
- mode => '0775',
+ owner => 'root',
+ group => 'root',
+ mode => '755',
before => Service['restbase'],
}
@@ -83,15 +86,15 @@
content => template('restbase/config.yaml.erb'),
owner => 'root',
group => 'root',
- mode => '0444',
+ mode => '444',
notify => Service['restbase'],
}
file { '/usr/lib/restbase':
ensure => directory,
- owner => 'restbase',
- group => 'restbase',
- mode => '0775',
+ owner => 'root',
+ group => 'root',
+ mode => '755',
before => Service['restbase'],
}
diff --git a/modules/restbase/templates/restbase.default.erb
b/modules/restbase/templates/restbase.default.erb
index d5e29f7..8dbc652 100644
--- a/modules/restbase/templates/restbase.default.erb
+++ b/modules/restbase/templates/restbase.default.erb
@@ -2,9 +2,4 @@
SETTINGS_FILE=/etc/restbase/config.yaml
-PORT="<%= @port %>"
-
-# Default is to listen on all interfaces
-#INTERFACE="0.0.0.0"
-
DAEMON_ARGS="-c $SETTINGS_FILE"
diff --git a/modules/restbase/templates/restbase.init
b/modules/restbase/templates/restbase.init
index befcb96..b44d99d 100644
--- a/modules/restbase/templates/restbase.init
+++ b/modules/restbase/templates/restbase.init
@@ -42,7 +42,6 @@
# and status_of_proc is working.
. /lib/lsb/init-functions
-DAEMON_ARGS="-c $SETTINGS_FILE"
#
# Function that starts the daemon/service
#
@@ -56,26 +55,15 @@
# 1 if daemon was already running
# 2 if daemon could not be started
- # calling /bin/sh is a hack needed to get output redirection on Ubuntu
- # 12.04 LTS, see below
start-stop-daemon --start --quiet --pidfile $PIDFILE -bm \
-c restbase:restbase --test \
- --exec /bin/sh -- \
- -c "$DAEMON $DAEMON_ARGS > /dev/null 2>&1" \
+ --exec $DAEMON -- $DAEMON_ARGS \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE -bm \
-c restbase:restbase \
- --exec /bin/sh -- \
- -c "$DAEMON $DAEMON_ARGS > /dev/null 2>&1" \
+ --exec $DAEMON -- $DAEMON_ARGS \
|| return 2
- echo "Started RESTBase server on port $PORT"
-
- # Cleaner version of the above, but does not work with Ubuntu 12.04
- # LTS as the --no-close parameter is not yet supported there
- #start-stop-daemon --start --quiet --pidfile $PIDFILE -bm --no-close \
- # -c restbase:restbase \
- # --exec $DAEMON -- $DAEMON_ARGS >>
/var/log/restbase/restbase.log 2>&1 \
- # || return 2
+ echo "Started RESTBase server, by default listening on port 7231"
# Add code here, if necessary, that waits for the process to be ready
--
To view, visit https://gerrit.wikimedia.org/r/173287
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I55a63b60a606d13ba4f201d3cc5b9b22d793c0f6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: GWicke <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits