This is an automated email from the ASF dual-hosted git repository.

hanishakoneru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 924b50c  HDDS-2621. Enable OM HA acceptance tests. (#265)
924b50c is described below

commit 924b50c2be071ab3a5ec987869c3b5e0bb074701
Author: Hanisha Koneru <[email protected]>
AuthorDate: Tue Mar 31 09:40:39 2020 -0700

    HDDS-2621. Enable OM HA acceptance tests. (#265)
---
 .../dist/src/main/compose/ozone-om-ha/.ssh/id_rsa  | 15 --------
 .../src/main/compose/ozone-om-ha/.ssh/id_rsa.pub   | 15 --------
 .../src/main/compose/ozone-om-ha/docker-config     |  1 +
 .../main/compose/ozone-om-ha/{run.sh => test.sh}   |  0
 .../dist/src/main/smoketest/omha/testOMHA.robot    | 44 +++++++++++-----------
 hadoop-ozone/pom.xml                               |  1 +
 6 files changed, 25 insertions(+), 51 deletions(-)

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 6632ce5..b4b1604 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 ae39052..0e5cb14 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 c5e1680..feafda9 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 8c5a706..2ca618c 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 9e8ecb0..522e820 100644
--- a/hadoop-ozone/pom.xml
+++ b/hadoop-ozone/pom.xml
@@ -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>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to