adoroszlai commented on code in PR #4943:
URL: https://github.com/apache/ozone/pull/4943#discussion_r1248610081


##########
hadoop-ozone/dist/src/main/compose/ozonesecure/test-root-ca-rotation.sh:
##########
@@ -0,0 +1,56 @@
+#!/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.
+
+#suite:secure
+
+COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+export COMPOSE_DIR
+
+export SECURITY_ENABLED=true
+export OM_SERVICE_ID="omservice"
+export SCM=scm1.org

Review Comment:
   ```suggestion
   export SCM=scm
   ```
   
   This is the cause for the safe mode timeout.
   
   SCM actually exits safe mode, but we're checking in the wrong container 
(`scm1.org` does not exist):
   
   ```
   scm_1       | 2023-07-01 04:10:26,398 
[EventQueue-OpenPipelineForHealthyPipelineSafeModeRule] INFO 
safemode.SCMSafeModeManager: SCM exiting safe mode.
   ```



##########
hadoop-ozone/dist/src/main/compose/ozonesecure/test-root-ca-rotation.sh:
##########
@@ -0,0 +1,56 @@
+#!/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.
+
+#suite:secure
+
+COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+export COMPOSE_DIR
+
+export SECURITY_ENABLED=true
+export OM_SERVICE_ID="omservice"
+export SCM=scm1.org
+export COMPOSE_FILE=docker-compose.yaml:root-ca-rotation.yaml
+
+: ${OZONE_BUCKET_KEY_NAME:=key1}
+
+# shellcheck source=/dev/null
+source "$COMPOSE_DIR/../testlib.sh"
+
+start_docker_env
+
+execute_command_in_container kms hadoop key create ${OZONE_BUCKET_KEY_NAME}
+
+execute_robot_test s3g kinit.robot
+
+# verify root CA rotation monitor task is active on leader
+wait_for_execute_command scm 30 "jps | grep StorageContainerManagerStarter |  
sed 's/StorageContainerManagerStarter//' | xargs | xargs -I {} jstack {} | grep 
'RootCARotationManager-Active'"
+
+# wait and verify root CA is rotated
+wait_for_execute_command scm 90 "ozone admin cert info 2"
+
+# verify om operations and data operations
+execute_commands_in_container scm1.org "ozone sh volume create /r-v1 && ozone 
sh bucket create /r-v1/r-b1"

Review Comment:
   ```suggestion
   execute_commands_in_container scm "ozone sh volume create /r-v1 && ozone sh 
bucket create /r-v1/r-b1"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to