Skip to content

Instantly share code, notes, and snippets.

@eevans
Created March 21, 2018 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eevans/75138b10f1219b9788186de672d04774 to your computer and use it in GitHub Desktop.
Save eevans/75138b10f1219b9788186de672d04774 to your computer and use it in GitHub Desktop.
diff -u cassandra-2.2.6/debian/changelog cassandra-2.2.6/debian/changelog
--- cassandra-2.2.6/debian/changelog
+++ cassandra-2.2.6/debian/changelog
@@ -1,3 +1,9 @@
+cassandra (2.2.6-wmf3) unstable; urgency=medium
+
+ * Comment out JVM test invocation that blocks start up.
+
+ -- Eric Evans <eevans@wikimedia.org> Mon, 12 Mar 2018 11:06:06 -0500
+
cassandra (2.2.6-wmf2) unstable; urgency=medium
* Backported https://issues.apache.org/jira/browse/CASSANDRA-11752,
diff -u cassandra-2.2.6/debian/patches/00list cassandra-2.2.6/debian/patches/00list
--- cassandra-2.2.6/debian/patches/00list
+++ cassandra-2.2.6/debian/patches/00list
@@ -3,0 +4 @@
+110remove_cassandra-7254_test.dpatch
only in patch2:
unchanged:
--- cassandra-2.2.6.orig/README.wmf.md
+++ cassandra-2.2.6/README.wmf.md
@@ -0,0 +1,57 @@
+Building Cassandra for Wikimedia
+================================
+
+### Cleanup any locally generated cruft
+
+ $ rm -rf logs/ data/
+
+### Create a release artifact in the expected format
+
+ $ VERSION=2.2.6
+ $ git archive --format=tar --prefix=cassandra-$VERSION/ \
+ <treeish> | gzip > ../cassandra_$VERSION.orig.tar.gz
+
+### Build a Debian package
+
+ $ dpkg-buildpackage -rfakeroot -us -uc -i'\.git.*'
+
+Delta to 2.2.6 (release)
+-------------------------
+
+ commit c4dda2525fbe3c1f6f29fea8afa5bb6249d24070
+ Author: Eric Evans <eevans@wikimedia.org>
+ Date: Mon Mar 12 13:17:47 2018 -0500
+
+ prompt compiler to use utf-8 source encoding
+
+ commit feb033b34195ad993b57ad5192dec4471fb58aa4
+ Author: Eric Evans <eevans@wikimedia.org>
+ Date: Mon Mar 12 11:07:21 2018 -0500
+
+ Update for 2.2.6-wmf3 Debian package release
+
+ commit 3a5687f3d67240e0f6f260d9802b53ee52632e79
+ Author: Eric Evans <eevans@wikimedia.org>
+ Date: Mon Mar 12 10:57:37 2018 -0500
+
+ comment out startup test
+
+ https://issues.apache.org/jira/browse/CASSANDRA-7254 added a pre-start
+ invocation of the JVM that blocks when using the Prometheus JMX exporter. This
+ patch comments out this invocation, since the condition the test checks for
+ should not be a problem in our environment.
+
+ Bug: T186567
+
+ commit 9e94b97694c36d85ffc86e6ef00043758252df0f
+ Author: Eric Evans <eevans@wikimedia.org>
+ Date: Mon Mar 12 10:49:04 2018 -0500
+
+ import WMF build (2.2.6-wmf2)
+
+ commit e892e3e3ba1b687222915f1c4f523bb7d212d63f
+ Author: Eric Evans <eevans@wikimedia.org>
+ Date: Mon Mar 12 10:51:54 2018 -0500
+
+ README.wmf.md
+
only in patch2:
unchanged:
--- cassandra-2.2.6.orig/build.xml
+++ cassandra-2.2.6/build.xml
@@ -798,6 +798,7 @@
<src path="${build.src.gen-java}"/>
<compilerarg value="-XDignore.symbol.file"/>
<compilerarg value="-Xbootclasspath/p:${build.src.jdkoverride}"/>
+ <compilerarg line="-encoding utf-8"/>
<classpath refid="cassandra.classpath"/>
</javac>
<antcall target="createVersionPropFile"/>
@@ -1156,7 +1157,8 @@
<classpath>
<path refid="cassandra.classpath"/>
</classpath>
- <compilerarg value="-XDignore.symbol.file"/>
+ <compilerarg value="-XDignore.symbol.file"/>
+ <compilerarg line="-encoding utf-8"/>
<src path="${test.unit.src}"/>
<src path="${test.long.src}"/>
<src path="${test.burn.src}"/>
only in patch2:
unchanged:
--- cassandra-2.2.6.orig/debian/patches/110remove_cassandra-7254_test.dpatch
+++ cassandra-2.2.6/debian/patches/110remove_cassandra-7254_test.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 110remove_cassandra-7254_test.dpatch by Eric Evans <eevans@wikimedia.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff --git a/bin/cassandra b/bin/cassandra
+index c968c35636..f5d87f4f4f 100755
+--- a/bin/cassandra
++++ b/bin/cassandra
+@@ -257,12 +257,13 @@ while true; do
+ esac
+ done
+
+-# see CASSANDRA-7254
+-"$JAVA" -cp "$CLASSPATH" $JVM_OPTS 2>&1 | grep -q 'Error: Exception thrown by the agent : java.lang.NullPointerException'
+-if [ $? -ne "1" ]; then
+- echo Unable to bind JMX, is Cassandra already running?
+- exit 1;
+-fi
++# Blocks startup when using the Prometheus exporter agent (see: T186567)
++# # see CASSANDRA-7254
++# "$JAVA" -cp "$CLASSPATH" $JVM_OPTS 2>&1 | grep -q 'Error: Exception thrown by the agent : java.lang.NullPointerException'
++# if [ $? -ne "1" ]; then
++# echo Unable to bind JMX, is Cassandra already running?
++# exit 1;
++# fi
+
+ # Start up the service
+ launch_service "$pidfile" "$foreground" "$properties" "$classname"
only in patch2:
unchanged:
only in patch2:
unchanged:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment