From 57eedab08131e40524b875b039183f17d619e322 Mon Sep 17 00:00:00 2001 From: Ann Taraday Date: Mon, 8 Apr 2024 16:45:47 +0200 Subject: [PATCH] Fix nodetool execution Set JAVA_TOOL_OPTIONS to -Dcom.sun.jndi.rmiURLParsing=legacy in order to run nodetool without passing address. Fixes: #142 --- .github/workflows/e2e-tests.yml | 2 +- test/kuttl/nodetool/00-assert.yaml | 22 +++++++++++++++++++++ test/kuttl/nodetool/00-createCluster.yaml | 17 ++++++++++++++++ test/kuttl/nodetool/01-nodetool-status.yaml | 6 ++++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 test/kuttl/nodetool/00-assert.yaml create mode 100644 test/kuttl/nodetool/00-createCluster.yaml create mode 100644 test/kuttl/nodetool/01-nodetool-status.yaml diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 5b872bb0..0a0e884c 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -79,7 +79,7 @@ jobs: strategy: max-parallel: 2 matrix: - test-name: [operations, sidecars, scaling, multi-dcs, backup-restore] + test-name: [operations, sidecars, scaling, multi-dcs, backup-restore, nodetool] steps: - id: lower-repo shell: pwsh diff --git a/test/kuttl/nodetool/00-assert.yaml b/test/kuttl/nodetool/00-assert.yaml new file mode 100644 index 00000000..4d4772d5 --- /dev/null +++ b/test/kuttl/nodetool/00-assert.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: cassandra-e2e-dc1-rack1 +status: + currentReplicas: 2 + replicas: 2 +--- +apiVersion: db.orange.com/v2 +kind: CassandraCluster +metadata: + name: cassandra-e2e +status: + cassandraRackStatus: + dc1-rack1: + cassandraLastAction: + name: Initializing + status: Done + phase: Running + lastClusterAction: Initializing + lastClusterActionStatus: Done + phase: Running \ No newline at end of file diff --git a/test/kuttl/nodetool/00-createCluster.yaml b/test/kuttl/nodetool/00-createCluster.yaml new file mode 100644 index 00000000..df5416c2 --- /dev/null +++ b/test/kuttl/nodetool/00-createCluster.yaml @@ -0,0 +1,17 @@ +apiVersion: db.orange.com/v2 +kind: CassandraCluster +metadata: + name: cassandra-e2e +spec: + nodesPerRacks: 2 + cassandraImage: cassandra:3.11.9 + autoPilot: true + resources: + limits: + cpu: 300m + memory: 512Mi + topology: + dc: + - name: dc1 + rack: + - name: rack1 diff --git a/test/kuttl/nodetool/01-nodetool-status.yaml b/test/kuttl/nodetool/01-nodetool-status.yaml new file mode 100644 index 00000000..571b7d20 --- /dev/null +++ b/test/kuttl/nodetool/01-nodetool-status.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Run nodetool status + - script: kubectl exec cassandra-e2e-dc1-rack1-0 -- nodetool status \ No newline at end of file