-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-13251. Support dynamic Byteman scripts via bmsubmit in ozonesecure-ha #8654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
7bbccd6
Adding Byteman support in acceptance test suites via new docker-compose
ssulav 24096c0
Reused ozonesecure-ha config
ssulav 840dd49
Addressed review comments
ssulav b7cf25a
Add BYTEMAN_HOME in .env
ssulav 61bd2c2
Updating the image version for CI
ssulav 0a937ae
Add Apache license header to all files
ssulav 7a8074b
Updated runner version adn Cleaned up code based on review
ssulav 97e3801
Removed extra variables
ssulav 4bae053
Updated OZONE_OPTS to OZONE_SERVER_OPTS
ssulav c73cc3d
Added more methods for wider control
ssulav 50f6067
Add #suite:HA-secure to enable acceptance-suites run
ssulav 47e5d53
Updating interface to address in java opts
ssulav 16527c9
Add README
ssulav a84fed4
Merge branch 'apache:master' into HDDS-13251-Byteman
ssulav fdc3bbc
Added License info in README
ssulav bc9ba58
Bump ozone-runner to 20250625-1-jdk21
adoroszlai bbd2eca
Updated logger from console to info for cleaner log
ssulav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # 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. | ||
|
|
||
| HDDS_VERSION=${hdds.version} | ||
| HADOOP_IMAGE=apache/hadoop | ||
| HADOOP_VERSION=${hadoop.version} | ||
| OZONE_RUNNER_VERSION=${docker.ozone-runner.version} | ||
| OZONE_RUNNER_IMAGE=apache/ozone-runner | ||
| OZONE_TESTKRB5_IMAGE=${docker.ozone-testkr5b.image} | ||
| OZONE_VOLUME=./data | ||
| OZONE_OPTS= | ||
| RANGER_DB_IMAGE=postgres | ||
| RANGER_DB_IMAGE_VERSION=12 | ||
| RANGER_IMAGE=ghcr.io/adoroszlai/ranger-admin | ||
| RANGER_IMAGE_VERSION=0ae34250d3af672776fca6a53047699adf3afce5-${ranger.version}-8 | ||
| RANGER_VERSION=${ranger.version} | ||
| # Byteman agent configuration for different Ozone components | ||
| BYTEMAN_OPTS="-javaagent:/opt/byteman.jar=listener:true" |
10 changes: 10 additions & 0 deletions
10
...zone/dist/src/main/compose/ozonesecure-ha-fi/byteman-scripts/skip-notify-group-remove.btm
ssulav marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| RULE skip notifyGroupRemove | ||
| CLASS org.apache.hadoop.ozone.container.common.transport.server.ratis.ContainerStateMachine | ||
| METHOD notifyGroupRemove | ||
| AT ENTRY | ||
| IF TRUE | ||
| DO | ||
| System.out.println("[" + java.time.LocalDateTime.now() + "] BYTEMAN: " + | ||
| "Skip notifyGroupRemove in ContainerStateMachine"); | ||
| return; | ||
| ENDRULE |
10 changes: 10 additions & 0 deletions
10
hadoop-ozone/dist/src/main/compose/ozonesecure-ha-fi/byteman-scripts/skip-put-block.btm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| RULE Block putBlock | ||
| CLASS org.apache.hadoop.ozone.container.keyvalue.impl.BlockManagerImpl | ||
| METHOD putBlock | ||
| AT ENTRY | ||
| IF TRUE | ||
| DO | ||
| System.out.println("[" + java.time.LocalDateTime.now() + "] BYTEMAN: " + | ||
| "Blocking putBlock in BlockManagerImpl"); | ||
| return 0; | ||
| ENDRULE |
289 changes: 289 additions & 0 deletions
289
hadoop-ozone/dist/src/main/compose/ozonesecure-ha-fi/docker-compose.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,289 @@ | ||
| # 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-common-config: | ||
| &common-config | ||
| dns_search: . | ||
| image: ${OZONE_RUNNER_IMAGE}:${OZONE_RUNNER_VERSION} | ||
| volumes: | ||
| - ../..:/opt/hadoop | ||
| - ../_keytabs:/etc/security/keytabs | ||
| - ./krb5.conf:/etc/krb5.conf | ||
| - ./byteman-scripts:/opt/byteman/scripts:ro | ||
ssulav marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| env_file: | ||
| - docker-config | ||
|
|
||
| services: | ||
| kdc: | ||
| image: ${OZONE_TESTKRB5_IMAGE} | ||
| hostname: kdc | ||
| dns_search: . | ||
| volumes: | ||
| - ../..:/opt/hadoop | ||
| - ../_keytabs:/etc/security/keytabs | ||
| command: ["/opt/hadoop/compose/common/init-kdc.sh"] | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.100 | ||
| kms: | ||
| image: ${HADOOP_IMAGE}:${HADOOP_VERSION} | ||
| dns_search: . | ||
| ports: | ||
| - 9600:9600 | ||
| env_file: | ||
| - ./docker-config | ||
| volumes: | ||
| - ../_keytabs:/etc/security/keytabs | ||
| - ./krb5.conf:/etc/krb5.conf | ||
| - ../../libexec/transformation.py:/opt/transformation.py | ||
| environment: | ||
| HADOOP_CONF_DIR: /opt/hadoop/etc/hadoop | ||
| command: ["hadoop", "kms"] | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.101 | ||
| datanode1: | ||
| <<: *common-config | ||
| ports: | ||
| - 19864:9999 | ||
| - 9090:9090 | ||
| command: ["/opt/hadoop/bin/ozone","datanode"] | ||
| extra_hosts: | ||
| - "scm1.org=172.25.0.116" | ||
| - "scm2.org=172.25.0.117" | ||
| - "scm3.org=172.25.0.118" | ||
| - "recon=172.25.0.115" | ||
| environment: | ||
| WAITFOR: scm3.org:9894 | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9090 | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.102 | ||
| datanode2: | ||
| <<: *common-config | ||
| ports: | ||
| - 9866:9999 | ||
| - 9091:9091 | ||
| command: ["/opt/hadoop/bin/ozone","datanode"] | ||
| extra_hosts: | ||
| - "scm1.org=172.25.0.116" | ||
| - "scm2.org=172.25.0.117" | ||
| - "scm3.org=172.25.0.118" | ||
| - "recon=172.25.0.115" | ||
| environment: | ||
| WAITFOR: scm3.org:9894 | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9091 | ||
ssulav marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.103 | ||
| datanode3: | ||
| <<: *common-config | ||
| ports: | ||
| - 9868:9999 | ||
| - 9092:9092 | ||
ssulav marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| command: ["/opt/hadoop/bin/ozone","datanode"] | ||
| extra_hosts: | ||
| - "scm1.org=172.25.0.116" | ||
| - "scm2.org=172.25.0.117" | ||
| - "scm3.org=172.25.0.118" | ||
| - "recon=172.25.0.115" | ||
| environment: | ||
| WAITFOR: scm3.org:9894 | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9092 | ||
ssulav marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.104 | ||
| om1: | ||
| hostname: om1 | ||
| <<: *common-config | ||
| ports: | ||
| - 9880:9874 | ||
| - 9890:9872 | ||
| - 9093:9093 | ||
| #- 18001:18001 | ||
| environment: | ||
| WAITFOR: scm3.org:9894 | ||
| ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9093 | ||
| command: ["/opt/hadoop/bin/ozone","om"] | ||
| extra_hosts: | ||
| - "scm1.org=172.25.0.116" | ||
| - "scm2.org=172.25.0.117" | ||
| - "scm3.org=172.25.0.118" | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.111 | ||
| om2: | ||
| hostname: om2 | ||
| <<: *common-config | ||
| ports: | ||
| - 9882:9874 | ||
| - 9892:9872 | ||
| - 9094:9094 | ||
| #- 18002:18002 | ||
| environment: | ||
| WAITFOR: scm3.org:9894 | ||
| ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9094 | ||
| command: ["/opt/hadoop/bin/ozone","om"] | ||
| extra_hosts: | ||
| - "scm1.org=172.25.0.116" | ||
| - "scm2.org=172.25.0.117" | ||
| - "scm3.org=172.25.0.118" | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.112 | ||
| om3: | ||
| hostname: om3 | ||
| <<: *common-config | ||
| ports: | ||
| - 9884:9874 | ||
| - 9894:9872 | ||
| - 9095:9095 | ||
| #- 18003:18003 | ||
| environment: | ||
| WAITFOR: scm3.org:9894 | ||
| ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9095 | ||
| command: ["/opt/hadoop/bin/ozone","om"] | ||
| extra_hosts: | ||
| - "scm1.org=172.25.0.116" | ||
| - "scm2.org=172.25.0.117" | ||
| - "scm3.org=172.25.0.118" | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.113 | ||
| httpfs: | ||
| hostname: httpfs | ||
| <<: *common-config | ||
| ports: | ||
| - 14000:14000 | ||
| - 9100:9100 | ||
| command: [ "/opt/hadoop/bin/ozone","httpfs" ] | ||
| environment: | ||
| OZONE-SITE.XML_hdds.scm.safemode.min.datanode: ${OZONE_SAFEMODE_MIN_DATANODES:-1} | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9100 | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.119 | ||
| s3g: | ||
| hostname: s3g | ||
| <<: *common-config | ||
| ports: | ||
| - 9878:9878 | ||
| - 9101:9101 | ||
| command: ["ozone","s3g"] | ||
| environment: | ||
| OZONE-SITE.XML_ozone.s3g.domain.name=s3g.internal | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9101 | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.120 | ||
| scm1.org: | ||
| hostname: scm1.org | ||
| <<: *common-config | ||
| ports: | ||
| - 9990:9876 | ||
| - 9992:9860 | ||
| - 9097:9097 | ||
| env_file: | ||
| - docker-config | ||
| environment: | ||
| ENSURE_SCM_INITIALIZED: /data/metadata/scm/current/VERSION | ||
| OZONE-SITE.XML_hdds.scm.safemode.min.datanode: "${OZONE_SAFEMODE_MIN_DATANODES:-3}" | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9097 | ||
| command: ["/opt/hadoop/bin/ozone","scm"] | ||
| extra_hosts: | ||
| - "om1=172.25.0.111" | ||
| - "om2=172.25.0.112" | ||
| - "om3=172.25.0.113" | ||
| - "scm1.org=172.25.0.116" | ||
| - "scm2.org=172.25.0.117" | ||
| - "scm3.org=172.25.0.118" | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.116 | ||
| scm2.org: | ||
| hostname: scm2.org | ||
| <<: *common-config | ||
| ports: | ||
| - 9994:9876 | ||
| - 9996:9860 | ||
| - 9098:9098 | ||
| environment: | ||
| WAITFOR: scm1.org:9894 | ||
| ENSURE_SCM_BOOTSTRAPPED: /data/metadata/scm/current/VERSION | ||
| OZONE-SITE.XML_hdds.scm.safemode.min.datanode: "${OZONE_SAFEMODE_MIN_DATANODES:-3}" | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9098 | ||
| command: ["/opt/hadoop/bin/ozone","scm"] | ||
| extra_hosts: | ||
| - "om1=172.25.0.111" | ||
| - "om2=172.25.0.112" | ||
| - "om3=172.25.0.113" | ||
| - "scm1.org=172.25.0.116" | ||
| - "scm2.org=172.25.0.117" | ||
| - "scm3.org=172.25.0.118" | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.117 | ||
| scm3.org: | ||
| hostname: scm3.org | ||
| <<: *common-config | ||
| ports: | ||
| - 9998:9876 | ||
| - 10002:9860 | ||
| - 9099:9099 | ||
| environment: | ||
| WAITFOR: scm2.org:9894 | ||
| ENSURE_SCM_BOOTSTRAPPED: /data/metadata/scm/current/VERSION | ||
| OZONE-SITE.XML_hdds.scm.safemode.min.datanode: "${OZONE_SAFEMODE_MIN_DATANODES:-3}" | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9099 | ||
| command: ["/opt/hadoop/bin/ozone","scm"] | ||
| extra_hosts: | ||
| - "om1=172.25.0.111" | ||
| - "om2=172.25.0.112" | ||
| - "om3=172.25.0.113" | ||
| - "scm1.org=172.25.0.116" | ||
| - "scm2.org=172.25.0.117" | ||
| - "scm3.org=172.25.0.118" | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.118 | ||
| recon: | ||
| hostname: recon | ||
| <<: *common-config | ||
| ports: | ||
| - 9888:9888 | ||
| - 9096:9096 | ||
| environment: | ||
| OZONE_OPTS: ${BYTEMAN_OPTS},port:9096 | ||
| command: ["/opt/hadoop/bin/ozone","recon"] | ||
| extra_hosts: | ||
| - "om1=172.25.0.111" | ||
| - "om2=172.25.0.112" | ||
| - "om3=172.25.0.113" | ||
| - "scm1.org=172.25.0.116" | ||
| - "scm2.org=172.25.0.117" | ||
| - "scm3.org=172.25.0.118" | ||
| networks: | ||
| ozone_net: | ||
| ipv4_address: 172.25.0.115 | ||
| networks: | ||
| ozone_net: | ||
| ipam: | ||
| driver: default | ||
| config: | ||
| - subnet: "172.25.0.0/24" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.