-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-12327. Restore non-HA (to HA) upgrade test #7880
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 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2705bbd
HDDS-12327. Restore non-HA (to HA) upgrade test
chiacyu e119849
Test non-ha upgrade
jojochuang c571441
Merge branch 'master' into HDDS-12327
jojochuang 8f646b6
do not add OM service in non-HA
adoroszlai 308af5c
revert changes for COMPOSE_CLUSTER==ha
adoroszlai 07d2310
handle upgrade from non-HA in Robot test
adoroszlai 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
23 changes: 23 additions & 0 deletions
23
hadoop-ozone/dist/src/main/compose/upgrade/compose/non-ha/.env
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,23 @@ | ||
| # 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} | ||
| OZONE_RUNNER_VERSION=${docker.ozone-runner.version} | ||
| OZONE_RUNNER_IMAGE=apache/ozone-runner | ||
| OZONE_TEST_IMAGE=apache/ozone-runner:${docker.ozone-runner.version} | ||
| OZONE_DIR=/opt/hadoop | ||
| OZONE_VOLUME=./data | ||
| OM_SERVICE_ID=omservice |
155 changes: 155 additions & 0 deletions
155
hadoop-ozone/dist/src/main/compose/upgrade/compose/non-ha/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,155 @@ | ||
| # 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. | ||
|
|
||
| # reusable fragments (see https://docs.docker.com/compose/compose-file/#extension-fields) | ||
| x-common-config: | ||
| &common-config | ||
| env_file: | ||
| - docker-config | ||
| image: ${OZONE_TEST_IMAGE} | ||
|
|
||
| x-environment: | ||
| &environment | ||
| OZONE-SITE.XML_ozone.server.default.replication: ${OZONE_REPLICATION_FACTOR:-1} | ||
| OZONE_UPGRADE_TO: ${OZONE_UPGRADE_TO:-0} | ||
| OZONE_UPGRADE_FROM: ${OZONE_UPGRADE_FROM:-0} | ||
|
|
||
| x-datanode: | ||
| &datanode | ||
| command: ["ozone","datanode"] | ||
| <<: *common-config | ||
| environment: | ||
| <<: *environment | ||
| ports: | ||
| - 19864 | ||
| - 9882 | ||
|
|
||
| x-volumes: | ||
| - &ozone-dir ${TEST_DIR}/../..:${OZONE_DIR} | ||
| - &transformation ${TEST_DIR}/../../libexec/transformation.py:/opt/hadoop/libexec/transformation.py | ||
|
|
||
| services: | ||
| om: | ||
| command: ["ozone","om"] | ||
| <<: *common-config | ||
| environment: | ||
| ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION | ||
| <<: *environment | ||
| ports: | ||
| - 9862 | ||
| - 9874 | ||
| networks: | ||
| net: | ||
| ipv4_address: 10.9.0.11 | ||
| volumes: | ||
| - ${OZONE_VOLUME}/om:/data | ||
| - *ozone-dir | ||
| - *transformation | ||
| scm: | ||
| command: ["ozone","scm"] | ||
| <<: *common-config | ||
| environment: | ||
| ENSURE_SCM_INITIALIZED: /data/metadata/scm/current/VERSION | ||
| OZONE-SITE.XML_hdds.scm.safemode.min.datanode: ${OZONE_SAFEMODE_MIN_DATANODES:-1} | ||
| <<: *environment | ||
| networks: | ||
| net: | ||
| ipv4_address: 10.9.0.12 | ||
| ports: | ||
| - 9876:9876 | ||
| volumes: | ||
| - ${OZONE_VOLUME}/scm:/data | ||
| - *ozone-dir | ||
| - *transformation | ||
| dn1: | ||
| <<: *datanode | ||
| networks: | ||
| net: | ||
| ipv4_address: 10.9.0.13 | ||
| volumes: | ||
| - ${OZONE_VOLUME}/dn1:/data | ||
| - *ozone-dir | ||
| - *transformation | ||
| dn2: | ||
| <<: *datanode | ||
| networks: | ||
| net: | ||
| ipv4_address: 10.9.0.14 | ||
| volumes: | ||
| - ${OZONE_VOLUME}/dn2:/data | ||
| - *ozone-dir | ||
| - *transformation | ||
| dn3: | ||
| <<: *datanode | ||
| networks: | ||
| net: | ||
| ipv4_address: 10.9.0.15 | ||
| volumes: | ||
| - ${OZONE_VOLUME}/dn3:/data | ||
| - *ozone-dir | ||
| - *transformation | ||
| dn4: | ||
| <<: *datanode | ||
| networks: | ||
| net: | ||
| ipv4_address: 10.9.0.16 | ||
| volumes: | ||
| - ${OZONE_VOLUME}/dn4:/data | ||
| - *ozone-dir | ||
| - *transformation | ||
| dn5: | ||
| <<: *datanode | ||
| networks: | ||
| net: | ||
| ipv4_address: 10.9.0.17 | ||
| volumes: | ||
| - ${OZONE_VOLUME}/dn5:/data | ||
| - *ozone-dir | ||
| - *transformation | ||
| recon: | ||
| command: ["ozone","recon"] | ||
| <<: *common-config | ||
| environment: | ||
| <<: *environment | ||
| networks: | ||
| net: | ||
| ipv4_address: 10.9.0.18 | ||
| ports: | ||
| - 9888:9888 | ||
| volumes: | ||
| - ${OZONE_VOLUME}/recon:/data | ||
| - *ozone-dir | ||
| - *transformation | ||
| s3g: | ||
| command: ["ozone","s3g"] | ||
| <<: *common-config | ||
| environment: | ||
| <<: *environment | ||
| networks: | ||
| net: | ||
| ipv4_address: 10.9.0.19 | ||
| ports: | ||
| - 9878:9878 | ||
| volumes: | ||
| - ${OZONE_VOLUME}/s3g:/data | ||
| - *ozone-dir | ||
| - *transformation | ||
| networks: | ||
| net: | ||
| driver: bridge | ||
| ipam: | ||
| config: | ||
| - subnet: 10.9.0.0/16 |
56 changes: 56 additions & 0 deletions
56
hadoop-ozone/dist/src/main/compose/upgrade/compose/non-ha/docker-config
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,56 @@ | ||
| # 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. | ||
|
|
||
| OZONE-SITE.XML_ozone.metadata.dirs=/data/metadata | ||
|
|
||
| OZONE-SITE.XML_ozone.client.failover.max.attempts=6 | ||
|
|
||
| OZONE-SITE.XML_ozone.om.service.ids=omservice | ||
| OZONE-SITE.XML_ozone.om.nodes.omservice=om1 | ||
| OZONE-SITE.XML_ozone.om.address.omservice.om1=om | ||
|
|
||
| #OZONE-SITE.XML_ozone.om.address=om | ||
| OZONE-SITE.XML_ozone.om.http-address=om:9874 | ||
|
|
||
| OZONE-SITE.XML_ozone.scm.container.size=1GB | ||
| OZONE-SITE.XML_ozone.scm.datanode.ratis.volume.free-space.min=10MB | ||
| OZONE-SITE.XML_ozone.scm.pipeline.creation.interval=30s | ||
| OZONE-SITE.XML_ozone.scm.pipeline.owner.container.count=1 | ||
| OZONE-SITE.XML_ozone.scm.names=scm | ||
| OZONE-SITE.XML_ozone.scm.datanode.id.dir=/data/metadata | ||
| OZONE-SITE.XML_ozone.scm.block.client.address=scm | ||
| OZONE-SITE.XML_ozone.scm.container.size=1GB | ||
| OZONE-SITE.XML_ozone.scm.client.address=scm | ||
|
|
||
| OZONE-SITE.XML_hdds.datanode.dir=/data/hdds | ||
| OZONE-SITE.XML_hdds.datanode.volume.min.free.space=100MB | ||
|
|
||
| OZONE-SITE.XML_ozone.recon.db.dir=/data/metadata/recon | ||
| OZONE-SITE.XML_ozone.recon.om.snapshot.task.interval.delay=1m | ||
| OZONE-SITE.XML_hdds.scmclient.max.retry.timeout=30s | ||
| OZONE-SITE.XML_ozone.http.basedir=/tmp/ozone_http | ||
| OZONE-SITE.XML_ozone.fs.hsync.enabled=true | ||
|
|
||
| OZONE_CONF_DIR=/etc/hadoop | ||
| OZONE_LOG_DIR=/var/log/hadoop | ||
|
|
||
| no_proxy=om,scm,s3g,kdc,localhost,127.0.0.1 | ||
|
|
||
| OM_SERVICE_ID=omservice | ||
|
|
||
| # Explicitly enable filesystem snapshot feature for this Docker compose cluster | ||
| # Does not take effect on Ozone versions < 1.4.0 | ||
| OZONE-SITE.XML_ozone.filesystem.snapshot.enabled=true | ||
31 changes: 31 additions & 0 deletions
31
hadoop-ozone/dist/src/main/compose/upgrade/compose/non-ha/load.sh
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 @@ | ||
| #!/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. | ||
|
|
||
| # Fail if required variables are not set. | ||
| set -u | ||
| : "${OZONE_VOLUME}" | ||
| : "${TEST_DIR}" | ||
| set +u | ||
|
|
||
| source "$TEST_DIR/testlib.sh" | ||
|
|
||
| export COMPOSE_FILE="$TEST_DIR/compose/non-ha/docker-compose.yaml" | ||
| export OM_SERVICE_ID=omservice | ||
| export SECURITY_ENABLED=false | ||
| create_data_dirs "${OZONE_VOLUME}"/{om,dn1,dn2,dn3,dn4,dn5,recon,s3g,scm} | ||
|
|
||
| echo "Using docker cluster defined in $COMPOSE_FILE" |
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having to add OM service ID for
non-hatest to pass means one of:(1) Users with non-HA cluster will need to make config changes for the upgrade.
(2) The test is not modeling real-life upgrade steps correctly. We need to tweak the test, not the environment.
I tend to think it's the latter.
Proposed test fix: master...adoroszlai:ozone:refs/heads/HDDS-12327
test run: https://github.com/adoroszlai/ozone/actions/runs/14060297062/job/39370001881
Please take a look. If you agree, I'll push my additional commits to this PR's branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes sense to me. The Robot tests will closely resemble how the upgrade is actually executed by a user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Feel free to push these commits in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok i just updated the branch with these commits. Waiting for CI