diff --git a/hadoop-ozone/dist/src/main/compose/ozone-om-ha/.ssh/id_rsa b/hadoop-ozone/dist/src/main/compose/ozone-om-ha/.ssh/id_rsa index 6632ce51c54a..b4b1604f806e 100644 --- a/hadoop-ozone/dist/src/main/compose/ozone-om-ha/.ssh/id_rsa +++ b/hadoop-ozone/dist/src/main/compose/ozone-om-ha/.ssh/id_rsa @@ -1,18 +1,3 @@ -# 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. -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEA4BJi6WJuAa1ratShvYYWVwmYBqxE57btHjU6NtVN1SnPZx/f 6LezOpQGsLBXE/bl7uG+fD05Z378B/0wE5QhYwvJ9Ge0jsfhVOi90p/FEYfR2l+C diff --git a/hadoop-ozone/dist/src/main/compose/ozone-om-ha/.ssh/id_rsa.pub b/hadoop-ozone/dist/src/main/compose/ozone-om-ha/.ssh/id_rsa.pub index ae390529c7eb..0e5cb14756d7 100644 --- a/hadoop-ozone/dist/src/main/compose/ozone-om-ha/.ssh/id_rsa.pub +++ b/hadoop-ozone/dist/src/main/compose/ozone-om-ha/.ssh/id_rsa.pub @@ -1,16 +1 @@ -# 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. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgEmLpYm4BrWtq1KG9hhZXCZgGrETntu0eNTo21U3VKc9nH9/ot7M6lAawsFcT9uXu4b58PTlnfvwH/TATlCFjC8n0Z7SOx+FU6L3Sn8URh9HaX4L0tF8u87oCAD4dBrUGhhB36eiuH9dBBWly6RKffYJvrjatbc7GxBO/e5OSUMtqk/DSVKksmBhZxutrKivCNjDish9ViGIf8b5yS/MlEGmaVKApik1fJ5iOlloM/GgpB60YV/hbqfCecbWgeiM1gK92gdOcA/Wx1C7fj8BSI5iDSE6eZeF80gM3421lvyPDWyVhFaGbka4rXBX/fb9QSRBA9RTqhRKAEmAIf49H hadoop@cdae967fa87a diff --git a/hadoop-ozone/dist/src/main/compose/ozone-om-ha/docker-config b/hadoop-ozone/dist/src/main/compose/ozone-om-ha/docker-config index c5e1680ddbef..feafda931dac 100644 --- a/hadoop-ozone/dist/src/main/compose/ozone-om-ha/docker-config +++ b/hadoop-ozone/dist/src/main/compose/ozone-om-ha/docker-config @@ -25,6 +25,7 @@ OZONE-SITE.XML_ozone.om.ratis.enable=true OZONE-SITE.XML_ozone.scm.names=scm OZONE-SITE.XML_ozone.scm.datanode.id.dir=/data OZONE-SITE.XML_ozone.scm.block.client.address=scm +OZONE-SITE.XML_ozone.scm.container.size=1GB OZONE-SITE.XML_ozone.metadata.dirs=/data/metadata OZONE-SITE.XML_ozone.handler.type=distributed OZONE-SITE.XML_ozone.scm.client.address=scm diff --git a/hadoop-ozone/dist/src/main/compose/ozone-om-ha/run.sh b/hadoop-ozone/dist/src/main/compose/ozone-om-ha/test.sh similarity index 100% rename from hadoop-ozone/dist/src/main/compose/ozone-om-ha/run.sh rename to hadoop-ozone/dist/src/main/compose/ozone-om-ha/test.sh diff --git a/hadoop-ozone/dist/src/main/smoketest/omha/testOMHA.robot b/hadoop-ozone/dist/src/main/smoketest/omha/testOMHA.robot index 8c5a706961fe..2ca618cc3267 100644 --- a/hadoop-ozone/dist/src/main/smoketest/omha/testOMHA.robot +++ b/hadoop-ozone/dist/src/main/smoketest/omha/testOMHA.robot @@ -33,6 +33,7 @@ ${VOLUME} volume1 ${BUCKET} bucket1 ${TEST_FILE} NOTICE.txt ${WRITE_FILE_COUNT} 0 +${TEMPDIR} /tmp ** Keywords *** Open Connection And Log In @@ -68,12 +69,13 @@ Create volume and bucket Write Test File ${writeFileCount} = Evaluate ${WRITE_FILE_COUNT}+1 Set Global Variable ${WRITE_FILE_COUNT} ${writeFileCount} - ${fileName} = Catenate SEPARATOR= ${WRITE_FILE_COUNT} .txt - Copy File ${TEST_FILE} ${fileName} - Execute ozone fs -copyFromLocal ${fileName} o3fs://${BUCKET}.${VOLUME}.${OM_SERVICE_ID}/ + ${fileName} = Set Variable omha-${WRITE_FILE_COUNT}.txt + ${testFilePath} = Set Variable ${TEMPDIR}/${fileName} + Copy File ${TEST_FILE} ${testFilePath} + Execute ozone fs -copyFromLocal ${testFilePath} o3fs://${BUCKET}.${VOLUME}.${OM_SERVICE_ID}/ ${result} = Execute ozone sh key list o3://${OM_SERVICE_ID}/${VOLUME}/${BUCKET} | jq -r '.name' Should contain ${result} ${fileName} - Remove File ${fileName} + Remove File ${testFilePath} Put Key [arguments] ${FILE} ${KEY} @@ -133,6 +135,23 @@ Stop Leader OM and Verify Failover # Restart stopped OM Start OM ${leaderOM} +Test Multiple Failovers + FOR ${INDEX} IN RANGE 5 + # Find Leader OM and stop it + ${leaderOM} = Get OM Leader Node + ${stopOMResult} = Stop OM ${leaderOM} + + # Verify that new Leader OM is elected + ${newLeaderOM} = Get OM Leader Node + Should Not be Equal ${leaderOM} ${newLeaderOM} OMs did not failover + + # Verify write succeeds after failover + Write Test File + + # Restart OM + Start OM ${leaderOM} + END + Restart OM and Verify Ratis Logs Set Test Variable ${OM_HOST} om2 Set Test Variable ${keyBase} testOMRestart_ @@ -163,21 +182,4 @@ Restart OM and Verify Ratis Logs # Verify that the logs match with the Leader OMs logs List Should Contain Sub List ${logsAfter} ${logsLeader} -Test Multiple Failovers - FOR ${INDEX} IN RANGE 5 - # Find Leader OM and stop it - ${leaderOM} = Get OM Leader Node - ${stopOMResult} = Stop OM ${leaderOM} - - # Verify that new Leader OM is elected - ${newLeaderOM} = Get OM Leader Node - Should Not be Equal ${leaderOM} ${newLeaderOM} OMs did not failover - - # Verify write succeeds after failover - Write Test File - - # Restart OM - Start OM ${leaderOM} - END - diff --git a/hadoop-ozone/pom.xml b/hadoop-ozone/pom.xml index af28185e07e5..3517b236615b 100644 --- a/hadoop-ozone/pom.xml +++ b/hadoop-ozone/pom.xml @@ -245,6 +245,7 @@ **/target/** .gitattributes .idea/** + **/.ssh/id_rsa* dev-support/*tests dev-support/checkstyle* dev-support/jdiff/**