forked from apache/ozone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88b88ff
commit a99e105
Showing
6 changed files
with
167 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
30 changes: 30 additions & 0 deletions
30
...ne/dist/src/main/compose/upgrade/upgrades/non-rolling-upgrade/callbacks/1.5.0/callback.sh
This file contains 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,30 @@ | ||
#!/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. | ||
|
||
source "$TEST_DIR"/testlib.sh | ||
|
||
with_this_version_pre_finalized() { | ||
# New layout features were added in this version, so OM and SCM should be pre-finalized. | ||
execute_robot_test "$SCM" -N "${OUTPUT_NAME}-check-finalization" --include pre-finalized upgrade/check-finalization.robot | ||
# Test that HSync is disabled when pre-finalized. | ||
execute_robot_test "$SCM" -N "${OUTPUT_NAME}-hsync" --include pre-finalized-hsync-tests hsync/upgrade-hsync-check.robot | ||
} | ||
|
||
with_this_version_finalized() { | ||
execute_robot_test "$SCM" -N "${OUTPUT_NAME}-check-finalization" --include finalized upgrade/check-finalization.robot | ||
execute_robot_test "$SCM" -N "${OUTPUT_NAME}-hsync" debug/ozone-debug-lease-recovery.robot | ||
} |
This file contains 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 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,45 @@ | ||
# 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. | ||
|
||
*** Settings *** | ||
Documentation Test HSync via freon CLI. | ||
Library OperatingSystem | ||
Library String | ||
Library BuiltIn | ||
Resource ../ozone-lib/freon.robot | ||
Test Timeout 5 minutes | ||
Suite Setup Get OM serviceId | ||
|
||
*** Variables *** | ||
${OMSERVICEID} | ||
${VOLUME} hsync-volume | ||
${BUCKET} hsync-bucket | ||
|
||
*** Keywords *** | ||
Get OM serviceId | ||
${confKey} = Execute And Ignore Error ozone getconf confKey ozone.om.service.ids | ||
${result} = Evaluate "Configuration ozone.om.service.ids is missing" in """${confKey}""" | ||
IF ${result} == ${True} | ||
Set Suite Variable ${OMSERVICEID} om | ||
ELSE | ||
Set Suite Variable ${OMSERVICEID} ${confKey} | ||
END | ||
|
||
*** Test Cases *** | ||
Generate key by HSYNC | ||
Freon DFSG sync=HSYNC path=ofs://${OMSERVICEID}/${VOLUME}/${BUCKET} | ||
|
||
Generate key by HFLUSH | ||
Freon DFSG sync=HFLUSH path=ofs://${OMSERVICEID}/${VOLUME}/${BUCKET} |
69 changes: 69 additions & 0 deletions
69
hadoop-ozone/dist/src/main/smoketest/hsync/upgrade-hsync-check.robot
This file contains 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,69 @@ | ||
# 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. | ||
|
||
*** Settings *** | ||
Documentation Test HSync during upgrade | ||
Library OperatingSystem | ||
Library String | ||
Library BuiltIn | ||
Resource ../commonlib.robot | ||
Default Tags pre-finalized-hsync-tests | ||
Suite Setup Run Keyword if '${SECURITY_ENABLED}' == 'true' Kinit test user testuser testuser.keytab | ||
|
||
*** Variables *** | ||
${OMSERVICEID} | ||
${VOLUME} | ||
${BUCKET} | ||
${KEY} | ||
|
||
*** Keywords *** | ||
Get OM serviceId | ||
${confKey} = Execute And Ignore Error ozone getconf confKey ozone.om.service.ids | ||
${result} = Evaluate "Configuration ozone.om.service.ids is missing" in """${confKey}""" | ||
IF ${result} == ${True} | ||
Set Suite Variable ${OMSERVICEID} om | ||
ELSE | ||
Set Suite Variable ${OMSERVICEID} ${confKey} | ||
END | ||
Create volume for upgrade test | ||
${random} = Generate Random String 5 [LOWER] | ||
${volume} = Set Variable vol-${random} | ||
${result} = Execute ozone sh volume create /${volume} | ||
Should not contain ${result} Failed | ||
Set Suite Variable ${VOLUME} ${volume} | ||
|
||
Create bucket for upgrade test | ||
${random} = Generate Random String 5 [LOWER] | ||
${bucket} = Set Variable buc-${random} | ||
${result} = Execute ozone sh bucket create -l FILE_SYSTEM_OPTIMIZED /${volume}/${bucket} | ||
Should not contain ${result} Failed | ||
Set Suite Variable ${BUCKET} ${bucket} | ||
|
||
Create key for upgrade test | ||
${random} = Generate Random String 5 [LOWER] | ||
${key} = Set Variable key-${random} | ||
${result} = Execute ozone sh key put /${volume}/${bucket}/${key} /etc/hosts | ||
Set Suite Variable ${KEY} ${key} | ||
|
||
*** Test Cases *** | ||
Test HSync Prior To Finalization | ||
Get OM serviceId | ||
Create volume for upgrade test | ||
Create bucket for upgrade test | ||
Create key for upgrade test | ||
${result} = Execute and checkrc ozone debug recover --path=ofs://${OMSERVICEID}/${VOLUME}/${BUCKET}/${KEY} 255 | ||
Should contain ${result} It belongs to the layout feature HBASE_SUPPORT, whose layout version is 7 | ||
${result} = Execute and checkrc ozone debug recover --path=o3fs://${BUCKET}.${VOLUME}.${OMSERVICEID}/${KEY} 255 | ||
Should contain ${result} It belongs to the layout feature HBASE_SUPPORT, whose layout version is 7 |
This file contains 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