Filippo Giunchedi has submitted this change and it was merged.

Change subject: Extend classpath via Puppet
......................................................................


Extend classpath via Puppet

Permits the configuration of a list of files and/or directories to be added
to Cassandra's classpath.

This changeset specifies no entries and should therefore be a no-op.

Bug: T133395
Change-Id: I1ca51b74e6593505143d6f783245ce54bbb3aed5
---
M modules/cassandra/manifests/init.pp
R modules/cassandra/templates/cassandra.in.sh.erb
2 files changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Filippo Giunchedi: Looks good to me, approved
  Mobrovac: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/cassandra/manifests/init.pp 
b/modules/cassandra/manifests/init.pp
index 846807d..2be9cc1 100644
--- a/modules/cassandra/manifests/init.pp
+++ b/modules/cassandra/manifests/init.pp
@@ -187,7 +187,7 @@
 #   Default: []
 #
 # [*extra_classpath*]
-#   Additional classpath to be appended to the default.
+#   Additional files and/or directories to append to the JVM classpath.
 #   Default: []
 #
 # [*jmx_port*]
@@ -453,7 +453,7 @@
 
     file { '/etc/cassandra.in.sh':
         ensure  => present,
-        source  => "puppet:///modules/${module_name}/cassandra.in.sh",
+        content => template("${module_name}/cassandra.in.sh.erb"),
         owner   => 'cassandra',
         group   => 'cassandra',
         mode    => '0444',
diff --git a/modules/cassandra/files/cassandra.in.sh 
b/modules/cassandra/templates/cassandra.in.sh.erb
similarity index 87%
rename from modules/cassandra/files/cassandra.in.sh
rename to modules/cassandra/templates/cassandra.in.sh.erb
index b0f2624..57930ff 100644
--- a/modules/cassandra/files/cassandra.in.sh
+++ b/modules/cassandra/templates/cassandra.in.sh.erb
@@ -17,6 +17,10 @@
     CLASSPATH=$CLASSPATH:$jar
 done
 
+<% if not @extra_classpath.empty? -%>
+EXTRA_CLASSPATH="<%= Array(@extra_classpath).join(':') %>"
+<% end -%>
+
 CLASSPATH="$CLASSPATH:$EXTRA_CLASSPATH"
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/313619
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ca51b74e6593505143d6f783245ce54bbb3aed5
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Eevans <[email protected]>
Gerrit-Reviewer: Eevans <[email protected]>
Gerrit-Reviewer: Elukey <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Mobrovac <[email protected]>
Gerrit-Reviewer: Ppchelko <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to