This is an automated email from the ASF dual-hosted git repository.
mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-ccm.git
The following commit(s) were added to refs/heads/trunk by this push:
new dfa4e82 Fix parsing of java_versions_supported in bin/cassandra.in.sh
dfa4e82 is described below
commit dfa4e82ba46346cd87a85f784c66b796a6334e7b
Author: mck <[email protected]>
AuthorDate: Thu Mar 12 21:21:39 2026 +0100
Fix parsing of java_versions_supported in bin/cassandra.in.sh
Add extra debug (both stderr and stdout) from a cluster/node when it fails
to start.
Downgrade the python2.7 GHA CI to jdk8 to avoid the cgroup NPE.
And run CI once a week to catch trunk failures earlier.
Remove DSE testing in CI as the downloads are no longer available (without
click-through).
patch by Mick Semb Wever; reviewed by Brandon Williams for CASSANDRA-18831
---
.github/workflows/main-python-2-7.yml | 30 ++++++++++++++++++++++++++----
.github/workflows/main.yml | 8 ++------
ccmlib/cmds/cluster_cmds.py | 14 +++++++++++---
ccmlib/cmds/node_cmds.py | 15 +++++++++++----
ccmlib/common.py | 4 ++--
5 files changed, 52 insertions(+), 19 deletions(-)
diff --git a/.github/workflows/main-python-2-7.yml
b/.github/workflows/main-python-2-7.yml
index 6acd9a9..f05cc37 100644
--- a/.github/workflows/main-python-2-7.yml
+++ b/.github/workflows/main-python-2-7.yml
@@ -20,6 +20,8 @@ on:
push:
pull_request:
workflow_dispatch:
+ schedule:
+ - cron: '0 0 * * 0'
jobs:
lint_test_smoke:
@@ -39,7 +41,18 @@ jobs:
sed -i '/buster-updates/d' /etc/apt/sources.list
mkdir -p /usr/share/man/man1
apt-get update
- apt-get install -y curl netcat-openbsd sudo git gcc python-dev
openjdk-11-jdk-headless ant
+ apt-get install -y curl netcat-openbsd sudo git gcc python-dev ant
wget
+
+ # Use JDK 8 manually ( bc
https://bugs.openjdk.org/browse/JDK-8287073 )
+
JDK8_URL="https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u432-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u432b06.tar.gz"
+
JDK8_SHA256="abaaa90deadf51bd28921453baf2992b3dff6171bb7142f5bdd14ef269f7b245"
+ wget -q "$JDK8_URL" -O jdk8.tar.gz
+ echo "$JDK8_SHA256 jdk8.tar.gz" | sha256sum -c -
+ tar -xzf jdk8.tar.gz -C /usr/lib/jvm/
+ mv /usr/lib/jvm/jdk8u432-b06 /usr/lib/jvm/java-8-openjdk-amd64
+ update-alternatives --install /usr/bin/java java
/usr/lib/jvm/java-8-openjdk-amd64/bin/java 1
+ update-alternatives --set java
/usr/lib/jvm/java-8-openjdk-amd64/bin/java
+ rm jdk8.tar.gz
- name: Set up Python environment
run: |
@@ -56,7 +69,7 @@ jobs:
- name: Smoke tests
shell: bash
run: |
- export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
+ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
# hack to fix setup.cfg not being parsed by pbr (FIXME why isn't pbr
working...)
export PBR_VERSION=$(grep version setup.cfg | awk -F= '{print $2}' |
xargs)
./setup.py install
@@ -67,8 +80,17 @@ jobs:
for i in {1..9}; do
echo "Checking nc -z 127.0.0.1 7000"
while nc -z 127.0.0.1 7000 ; do echo . ; ./ccm stop || true ;
sleep 1 ; done
- ./ccm start -v --root && ./ccm remove && return 0 || echo
retrying
- sleep 20
+ if ./ccm start -v --root; then
+ ./ccm remove && return 0
+ else
+ echo "=== Start failed, showing logs ==="
+ find ~/.ccm -name "startup-*-stderr.log" -o -name
"startup-*-stdout.log" -o -name "system.log" | while read f; do
+ echo "=== $f ==="
+ tail -100 "$f" 2>/dev/null || true
+ done
+ echo "=== Retrying in 20 seconds ==="
+ sleep 20
+ fi
done
echo "ccm start failed after 9 attempts"
exit 1
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index bea1f0f..6a5576f 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -20,6 +20,8 @@ on:
push:
pull_request:
workflow_dispatch:
+ schedule:
+ - cron: '0 0 * * 0'
jobs:
lint_test_smoke:
@@ -84,12 +86,6 @@ jobs:
ccm_test
./ccm create test --version='git:trunk' -n1 --vnodes --quiet
ccm_test
- ./ccm create test -v 6.8.54 -n1 --vnodes --dse --quiet
- ccm_test
-
- # todo, when hcd is available
- #./ccm create test -v 1.1.0 -n1 --vnodes --hcd --quiet
- #ccm_test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
diff --git a/ccmlib/cmds/cluster_cmds.py b/ccmlib/cmds/cluster_cmds.py
index cb774ad..48ebbe8 100644
--- a/ccmlib/cmds/cluster_cmds.py
+++ b/ccmlib/cmds/cluster_cmds.py
@@ -528,9 +528,17 @@ class ClusterStartCmd(Cmd):
exit(1)
except NodeError as e:
print_(str(e), file=sys.stderr)
- print_("Standard error output is:", file=sys.stderr)
- for line in e.process.stderr_file.readlines():
- print_(line.rstrip('\n'), file=sys.stderr)
+ if e.process is not None:
+ if hasattr(e.process, 'stderr_file') and e.process.stderr_file
is not None:
+ print_("Standard error output is:", file=sys.stderr)
+ e.process.stderr_file.seek(0)
+ for line in e.process.stderr_file.readlines():
+ print_(line.rstrip('\n'), file=sys.stderr)
+ if hasattr(e.process, 'stdout_file') and e.process.stdout_file
is not None:
+ print_("Standard output is:", file=sys.stderr)
+ e.process.stdout_file.seek(0)
+ for line in e.process.stdout_file.readlines():
+ print_(line.rstrip('\n'), file=sys.stderr)
exit(1)
diff --git a/ccmlib/cmds/node_cmds.py b/ccmlib/cmds/node_cmds.py
index 46efc3b..4f3ac0e 100644
--- a/ccmlib/cmds/node_cmds.py
+++ b/ccmlib/cmds/node_cmds.py
@@ -199,10 +199,17 @@ class NodeStartCmd(Cmd):
jvm_version=self.options.jvm_version)
except NodeError as e:
print_(str(e), file=sys.stderr)
- print_("Standard error output is:", file=sys.stderr)
- e.process.stderr_file.seek(0)
- for line in e.process.stderr_file.readlines():
- print_(line.rstrip('\n'), file=sys.stderr)
+ if e.process is not None:
+ if hasattr(e.process, 'stderr_file') and e.process.stderr_file
is not None:
+ print_("Standard error output is:", file=sys.stderr)
+ e.process.stderr_file.seek(0)
+ for line in e.process.stderr_file.readlines():
+ print_(line.rstrip('\n'), file=sys.stderr)
+ if hasattr(e.process, 'stdout_file') and e.process.stdout_file
is not None:
+ print_("Standard output is:", file=sys.stderr)
+ e.process.stdout_file.seek(0)
+ for line in e.process.stdout_file.readlines():
+ print_(line.rstrip('\n'), file=sys.stderr)
exit(1)
diff --git a/ccmlib/common.py b/ccmlib/common.py
index 5d4b4aa..32e1339 100644
--- a/ccmlib/common.py
+++ b/ccmlib/common.py
@@ -755,7 +755,7 @@ def get_supported_jdk_versions_internal(path, pattern):
for line in f:
match = re.search(pattern, line)
if match:
- versions = match.group(1).split(',')
+ versions = re.split(r'[,\s]+', match.group(1))
versions = [8 if v == '1.8' else int(v) for v in versions]
return versions
return None
@@ -773,7 +773,7 @@ def get_supported_jdk_versions_from_dist(install_dir):
if versions is None:
# binary distributions have supported Java versions specified in
bin/cassandra.in.sh since 5.1
versions =
get_supported_jdk_versions_internal(os.path.join(install_dir, 'bin',
'cassandra.in.sh'),
-
'java_versions_supported=([0-9.,]+)')
+
'java_versions_supported="?([0-9., ]+)"?')
if versions and len(versions) > 0:
info("Supported Java versions for Cassandra distribution in '{}':
{}".format(install_dir, versions))
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]