Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions hadoop-ozone/dist/src/main/compose/ozone-om-ha/.ssh/id_rsa
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 0 additions & 15 deletions hadoop-ozone/dist/src/main/compose/ozone-om-ha/.ssh/id_rsa.pub
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
44 changes: 23 additions & 21 deletions hadoop-ozone/dist/src/main/smoketest/omha/testOMHA.robot
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ${VOLUME} volume1
${BUCKET} bucket1
${TEST_FILE} NOTICE.txt
${WRITE_FILE_COUNT} 0
${TEMPDIR} /tmp

** Keywords ***
Open Connection And Log In
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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_
Expand Down Expand Up @@ -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


1 change: 1 addition & 0 deletions hadoop-ozone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@
<exclude>**/target/**</exclude>
<exclude>.gitattributes</exclude>
<exclude>.idea/**</exclude>
<exclude>**/.ssh/id_rsa*</exclude>
<exclude>dev-support/*tests</exclude>
<exclude>dev-support/checkstyle*</exclude>
<exclude>dev-support/jdiff/**</exclude>
Expand Down