adoroszlai commented on code in PR #8654: URL: https://github.com/apache/ozone/pull/8654#discussion_r2154450491
########## hadoop-ozone/dist/src/main/compose/ozonesecure-ha-fi/docker-compose.yaml: ########## @@ -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 Review Comment: This extra mount is not necessary, the same files are already available in the container at `/opt/hadoop/compose/byteman-scripts`. ########## hadoop-ozone/dist/src/main/compose/ozonesecure-ha-fi/byteman-scripts/skip-notify-group-remove.btm: ########## Review Comment: Existing byteman scripts are at `/opt/hadoop/share/ozone/byteman` in the container, sources at `dev-support/byteman`. ########## hadoop-ozone/dist/src/main/compose/ozonesecure-ha-fi/docker-compose.yaml: ########## @@ -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 + 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 Review Comment: Byteman port should be the same in all containers, so this per-service definition is unnecessary. ########## hadoop-ozone/dist/src/main/compose/ozonesecure-ha-fi/.env: ########## Review Comment: Please don't duplicate an existing environment (`ozonesecure-ha`). If some customization is needed, create an add-on. There are multiple examples for that, one of them is Vault, see `hadoop-ozone/dist/src/main/compose/ozonesecure/*vault*`. ########## hadoop-ozone/dist/src/main/compose/ozonesecure-ha-fi/docker-compose.yaml: ########## @@ -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 + 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 + networks: + ozone_net: + ipv4_address: 172.25.0.103 + datanode3: + <<: *common-config + ports: + - 9868:9999 + - 9092:9092 Review Comment: Port mapping for Byteman does not seem to be necessary. ########## hadoop-ozone/dist/src/main/smoketest/ozone-fi/byteman_faults_sample.robot: ########## @@ -0,0 +1,16 @@ +*** Settings *** +Resource BytemanKeywords.robot +Suite Setup Setup All Byteman Agents + +*** Test Cases *** +Test Skip Put Block on the datanode + Inject Fault Into Component datanode1 /opt/byteman/scripts/skip-put-block.btm + + # Run your Ozone operations that should be affected by delay + Execute Ozone Command ozone sh volume create /vol1 Review Comment: Where is `Execute Ozone Command` defined? How is it different from `Execute`? ########## hadoop-ozone/dist/src/main/compose/ozonesecure-ha-fi/docker-compose.yaml: ########## @@ -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 + 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 + networks: + ozone_net: + ipv4_address: 172.25.0.103 + datanode3: + <<: *common-config + ports: + - 9868:9999 + - 9092:9092 + 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 Review Comment: We already have some byteman support in place, which sets `HADOOP_OPTS` to a fixed script: https://github.com/apache/ozone/blob/f713e57b190a9d3c0216ed0a509bc7c0ccbcdfaf/hadoop-ozone/dist/src/main/dockerlibexec/entrypoint.sh#L132-L152 Please change `entrypoint.sh` to allow `listener=true,port=${BYTEMAN_PORT}` if `$BYTEMAN_PORT` is set. Then custom `OZONE_OPTS` and `BYTEMAN_OPTS` will be unnecessary. BTW 9090 is Prometheus' port. ########## hadoop-ozone/dist/src/main/smoketest/ozone-fi/BytemanKeywords.robot: ########## @@ -0,0 +1,49 @@ +*** Settings *** +Library BytemanLibrary + +*** Variables *** +${DATANODE1_BYTEMAN_HOST_PORT} 172.25.0.102:9090 +${DATANODE2_BYTEMAN_HOST_PORT} 172.25.0.103:9091 +${DATANODE3_BYTEMAN_HOST_PORT} 172.25.0.104:9092 +${OM1_BYTEMAN_HOST_PORT} 172.25.0.111:9093 +${OM2_BYTEMAN_HOST_PORT} 172.25.0.112:9094 +${OM3_BYTEMAN_HOST_PORT} 172.25.0.113:9095 +${RECON_BYTEMAN_HOST_PORT} 172.25.0.115:9096 +${SCM1_BYTEMAN_HOST_PORT} 172.25.0.116:9097 +${SCM2_BYTEMAN_HOST_PORT} 172.25.0.117:9098 +${SCM3_BYTEMAN_HOST_PORT} 172.25.0.118:9099 +${HTTPFS_BYTEMAN_HOST_PORT} 172.25.0.119:9100 +${S3G_BYTEMAN_HOST_PORT} 172.25.0.120:9101 Review Comment: Please don't hard-code IPs here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
