This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 1315df6461 HDDS-13337. Reduce config required to enable Byteman 
listener (#8701)
1315df6461 is described below

commit 1315df6461754873fbd38d0b45c7ecbf38ef3ac3
Author: Doroszlai, Attila <6454655+adorosz...@users.noreply.github.com>
AuthorDate: Mon Jul 7 12:42:22 2025 +0200

    HDDS-13337. Reduce config required to enable Byteman listener (#8701)
---
 hadoop-ozone/dist/pom.xml                          |  2 +-
 .../dist/src/main/compose/ozonesecure-ha/.env      |  2 -
 .../src/main/compose/ozonesecure-ha/byteman.yaml   | 47 ----------------------
 .../src/main/compose/ozonesecure-ha/docker-config  |  1 +
 .../main/compose/ozonesecure-ha/test-byteman.sh    | 36 -----------------
 .../dist/src/main/compose/ozonesecure-ha/test.sh   |  3 ++
 .../dist/src/main/dockerlibexec/entrypoint.sh      |  4 ++
 7 files changed, 9 insertions(+), 86 deletions(-)

diff --git a/hadoop-ozone/dist/pom.xml b/hadoop-ozone/dist/pom.xml
index b6a62358b6..ecd51b4583 100644
--- a/hadoop-ozone/dist/pom.xml
+++ b/hadoop-ozone/dist/pom.xml
@@ -25,7 +25,7 @@
   <name>Apache Ozone Distribution</name>
   <properties>
     <!-- suffix appended to Ozone version to get Docker image version -->
-    <docker.ozone-runner.version>20250625-1-jdk21</docker.ozone-runner.version>
+    <docker.ozone-runner.version>20250625-2-jdk21</docker.ozone-runner.version>
     
<docker.ozone-testkr5b.image>ghcr.io/apache/ozone-testkrb5:20241129-1</docker.ozone-testkr5b.image>
     <docker.ozone.image>apache/ozone</docker.ozone.image>
     <docker.ozone.image.flavor>-rocky</docker.ozone.image.flavor>
diff --git a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/.env 
b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/.env
index 18011f88d3..75619126ca 100644
--- a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/.env
+++ b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/.env
@@ -27,5 +27,3 @@ RANGER_DB_IMAGE_VERSION=12
 RANGER_IMAGE=ghcr.io/adoroszlai/ranger-admin
 
RANGER_IMAGE_VERSION=0ae34250d3af672776fca6a53047699adf3afce5-${ranger.version}-8
 RANGER_VERSION=${ranger.version}
-BYTEMAN_PORT=9091
-BYTEMAN_HOME=/opt/byteman/
diff --git a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/byteman.yaml 
b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/byteman.yaml
deleted file mode 100644
index 73388b9ac4..0000000000
--- a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/byteman.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-x-byteman-config:
-  &byteman-config
-  environment:
-    BYTEMAN_HOME: /opt/byteman/
-    OZONE_SERVER_OPTS: 
-javaagent:/opt/byteman.jar=listener:true,address:0.0.0.0,port:${BYTEMAN_PORT}
-    BYTEMAN_PORT: ${BYTEMAN_PORT}
-
-services:
-  datanode1:
-    <<: *byteman-config
-  datanode2:
-    <<: *byteman-config
-  datanode3:
-    <<: *byteman-config
-  om1:
-    <<: *byteman-config
-  om2:
-    <<: *byteman-config
-  om3:
-    <<: *byteman-config
-  httpfs:
-    <<: *byteman-config
-  s3g:
-    <<: *byteman-config
-  scm1.org:
-    <<: *byteman-config
-  scm2.org:
-    <<: *byteman-config
-  scm3.org:
-    <<: *byteman-config
-  recon:
-    <<: *byteman-config
diff --git a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/docker-config 
b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/docker-config
index c5ab0bf944..e38952dc70 100644
--- a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/docker-config
+++ b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/docker-config
@@ -154,6 +154,7 @@ KMS-SITE.XML_hadoop.kms.proxyuser.s3g.hosts=*
 
 #Enable this variable to print out all hadoop rpc traffic to the stdout. See 
http://byteman.jboss.org/ to define your own instrumentation.
 
#BYTEMAN_SCRIPT_URL=https://raw.githubusercontent.com/apache/hadoop/trunk/dev-support/byteman/hadooprpc.btm
+BYTEMAN_PORT=9091
 
 OZONE_DATANODE_SECURE_USER=root
 JSVC_HOME=/usr/bin
diff --git a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test-byteman.sh 
b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test-byteman.sh
deleted file mode 100644
index cd1aad851c..0000000000
--- a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test-byteman.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#suite:HA-secure
-
-set -u -o pipefail
-
-COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-export COMPOSE_DIR
-
-export SECURITY_ENABLED=true
-export OM_SERVICE_ID="omservice"
-export SCM=scm1.org
-export COMPOSE_FILE=docker-compose.yaml:byteman.yaml
-
-# shellcheck source=/dev/null
-source "$COMPOSE_DIR/../testlib.sh"
-
-start_docker_env
-
-## Run virtual host test cases
-execute_robot_test om1 ozone-fi/byteman_faults_sample.robot
diff --git a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test.sh 
b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test.sh
index 1c134350c7..bd4df3af6e 100755
--- a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test.sh
+++ b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test.sh
@@ -51,3 +51,6 @@ for bucket in link; do
   ## Exclude virtual-host.robot
   exclude="--exclude virtual-host --exclude no-bucket-type"
 done
+
+# Run Fault Injection tests at the end
+execute_robot_test s3g ozone-fi/byteman_faults_sample.robot
diff --git a/hadoop-ozone/dist/src/main/dockerlibexec/entrypoint.sh 
b/hadoop-ozone/dist/src/main/dockerlibexec/entrypoint.sh
index 65e709da29..2c5cf9f335 100755
--- a/hadoop-ozone/dist/src/main/dockerlibexec/entrypoint.sh
+++ b/hadoop-ozone/dist/src/main/dockerlibexec/entrypoint.sh
@@ -149,6 +149,10 @@ if [ -n "$BYTEMAN_SCRIPT" ] || [ -n "$BYTEMAN_SCRIPT_URL" 
]; then
   AGENT_STRING="-javaagent:/opt/byteman.jar=script:$BYTEMAN_SCRIPT"
   export HADOOP_OPTS="$AGENT_STRING $HADOOP_OPTS"
   echo "Process is instrumented with adding $AGENT_STRING to HADOOP_OPTS"
+elif [[ -n "${BYTEMAN_PORT}" ]]; then
+  # listen only in Ozone server processes
+  
AGENT_STRING="-javaagent:/opt/byteman.jar=listener:true,address:0.0.0.0,port:${BYTEMAN_PORT}"
+  export OZONE_SERVER_OPTS="${OZONE_SERVER_OPTS:-} ${AGENT_STRING}"
 fi
 
 if [[ -n "${ASYNC_PROFILER_HOME}" ]]; then


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@ozone.apache.org
For additional commands, e-mail: commits-h...@ozone.apache.org

Reply via email to