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 7a27db200a HDDS-11134. Create compatibility test for FSO bucket usage
(#7350)
7a27db200a is described below
commit 7a27db200a49d75bcefc9f3f5e8ceb656578d509
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Mon Oct 28 08:31:34 2024 +0100
HDDS-11134. Create compatibility test for FSO bucket usage (#7350)
---
hadoop-ozone/dist/src/main/compose/xcompat/test.sh | 18 ++++++++++++++----
.../dist/src/main/smoketest/compatibility/read.robot | 10 +++++++++-
.../dist/src/main/smoketest/compatibility/setup.robot | 1 +
.../dist/src/main/smoketest/compatibility/write.robot | 7 +++++++
4 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/hadoop-ozone/dist/src/main/compose/xcompat/test.sh
b/hadoop-ozone/dist/src/main/compose/xcompat/test.sh
index 8774cf2f63..96fbc1ec45 100755
--- a/hadoop-ozone/dist/src/main/compose/xcompat/test.sh
+++ b/hadoop-ozone/dist/src/main/compose/xcompat/test.sh
@@ -21,7 +21,8 @@ COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"
>/dev/null 2>&1 && pwd )"
export COMPOSE_DIR
basename=$(basename ${COMPOSE_DIR})
-current_version="${ozone.version}"
+# version is used in bucket name, which does not allow uppercase
+current_version="$(echo "${ozone.version}" | sed -e 's/-SNAPSHOT//' | tr
'[:upper:]' '[:lower:]')"
# TODO: debug acceptance test failures for client versions 1.0.0 on secure
clusters
old_versions="1.1.0 1.2.1 1.3.0 1.4.0" # container is needed for each version
in clients.yaml
@@ -55,13 +56,22 @@ _init() {
_write() {
_kinit
- execute_robot_test ${container} -N
"xcompat-cluster-${cluster_version}-client-${client_version}-write" -v
SUFFIX:${client_version} compatibility/write.robot
+ execute_robot_test ${container} -N
"xcompat-cluster-${cluster_version}-client-${client_version}-write" \
+ -v CLIENT_VERSION:${client_version} \
+ -v CLUSTER_VERSION:${cluster_version} \
+ -v SUFFIX:${client_version} \
+ compatibility/write.robot
}
_read() {
_kinit
local data_version="$1"
- execute_robot_test ${container} -N
"xcompat-cluster-${cluster_version}-client-${client_version}-read-${data_version}"
-v SUFFIX:${data_version} compatibility/read.robot
+ execute_robot_test ${container} -N
"xcompat-cluster-${cluster_version}-client-${client_version}-read-${data_version}"
\
+ -v CLIENT_VERSION:${client_version} \
+ -v CLUSTER_VERSION:${cluster_version} \
+ -v DATA_VERSION:${data_version} \
+ -v SUFFIX:${data_version} \
+ compatibility/read.robot
}
test_bucket_encryption() {
@@ -70,7 +80,7 @@ test_bucket_encryption() {
}
test_cross_compatibility() {
- echo "Starting cluster with COMPOSE_FILE=${COMPOSE_FILE}"
+ echo "Starting ${cluster_version} cluster with COMPOSE_FILE=${COMPOSE_FILE}"
OZONE_KEEP_RESULTS=true start_docker_env
diff --git a/hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot
b/hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot
index 57715cda95..e56465bb8b 100644
--- a/hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot
@@ -37,4 +37,12 @@ Dir Can Be Listed Using Shell
File Can Be Get
Execute ozone fs -get o3fs://bucket1.vol1/dir-${SUFFIX}/file-${SUFFIX}
/tmp/
Execute diff -q ${TESTFILE} /tmp/file-${SUFFIX}
- [teardown] Execute rm /tmp/file-${SUFFIX}
+ [teardown] Execute rm -f /tmp/file-${SUFFIX}
+
+FSO Bucket Can Be Read
+ Pass Execution If '${DATA_VERSION}' < '${FSO_VERSION}' Skipped
write test case
+ Pass Execution If '${CLIENT_VERSION}' < '${FSO_VERSION}' Client does
not support FSO
+ Pass Execution If '${CLUSTER_VERSION}' < '${FSO_VERSION}' Cluster
does not support FSO
+ Execute ozone fs -get
ofs://om/vol1/fso-bucket-${SUFFIX}/dir/subdir/file ${TEMP_DIR}/
+ Execute diff -q ${TESTFILE} ${TEMP_DIR}/file
+ [teardown] Execute rm -f ${TEMP_DIR}/file
diff --git a/hadoop-ozone/dist/src/main/smoketest/compatibility/setup.robot
b/hadoop-ozone/dist/src/main/smoketest/compatibility/setup.robot
index ae765f23e2..5620d00025 100644
--- a/hadoop-ozone/dist/src/main/smoketest/compatibility/setup.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/compatibility/setup.robot
@@ -20,6 +20,7 @@ Resource ../ozone-lib/shell.robot
*** Variables ***
${SUFFIX} ${EMPTY}
+${FSO_VERSION} 1.3.0
*** Keywords ***
diff --git a/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot
b/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot
index 4c611d4287..a44901a99a 100644
--- a/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot
@@ -33,3 +33,10 @@ Dir Can Be Created
File Can Be Put
Execute ozone fs -put ${TESTFILE}
o3fs://bucket1.vol1/dir-${SUFFIX}/file-${SUFFIX}
+
+FSO Bucket Can Be Created and Used
+ Pass Execution If '${CLIENT_VERSION}' < '${FSO_VERSION}' Client does
not support FSO
+ Pass Execution If '${CLUSTER_VERSION}' < '${FSO_VERSION}' Cluster
does not support FSO
+ Execute ozone sh bucket create --layout FILE_SYSTEM_OPTIMIZED
/vol1/fso-bucket-${SUFFIX}
+ Execute ozone fs -mkdir -p ofs://om/vol1/fso-bucket-${SUFFIX}/dir/subdir
+ Execute ozone fs -put ${TESTFILE}
ofs://om/vol1/fso-bucket-${SUFFIX}/dir/subdir/file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]