QChris has uploaded a new change for review.
https://gerrit.wikimedia.org/r/141116
Change subject: Parametrize redis' dbfilename
......................................................................
Parametrize redis' dbfilename
Wikimetrics is currently using a custom redis configuration template,
and we want to bring Wikimetrics' requirements back to the redis
module. Wikimetrics needs to be able to specify the dbfilename, as
this file gets backed up for Wikimetrics.
Bug: 66911
Change-Id: I7a0a226053d562f879f188d1e42ff0b71b352c0a
---
M modules/redis/manifests/init.pp
M modules/redis/templates/redis.conf.erb
2 files changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/16/141116/1
diff --git a/modules/redis/manifests/init.pp b/modules/redis/manifests/init.pp
index f28c97b..cdda195 100644
--- a/modules/redis/manifests/init.pp
+++ b/modules/redis/manifests/init.pp
@@ -16,6 +16,7 @@
$password = false,
$auto_aof_rewrite_min_size = '512mb',
$config_template = 'redis/redis.conf.erb',
+ $dbfilename = undef, # filename for rdb. If undef, "$hostname-$port.rdb"
is used
) {
case $::operatingsystem {
debian, ubuntu: {
diff --git a/modules/redis/templates/redis.conf.erb
b/modules/redis/templates/redis.conf.erb
index eed5c00..05a6b19 100644
--- a/modules/redis/templates/redis.conf.erb
+++ b/modules/redis/templates/redis.conf.erb
@@ -127,7 +127,11 @@
rdbchecksum yes
# The filename where to dump the DB
-dbfilename <%= @hostname %>-<%= port %>.rdb
+<% if @dbfilename -%>
+dbfilename <%= @dbfilename %>
+<% else -%>
+dbfilename <%= @hostname %>-<%= @port %>.rdb
+<% end -%>
# The working directory.
#
--
To view, visit https://gerrit.wikimedia.org/r/141116
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a0a226053d562f879f188d1e42ff0b71b352c0a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: QChris <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits