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

ssulav pushed a commit to branch HDDS-14675
in repository https://gitbox.apache.org/repos/asf/ozone-installer.git


The following commit(s) were added to refs/heads/HDDS-14675 by this push:
     new 33766fb  HDDS-14675. Move s3g smoke test to run from s3g host instead 
of om host
33766fb is described below

commit 33766fbd9751cd4b0d6881bd311a2217f763a91d
Author: Soumitra Sulav <[email protected]>
AuthorDate: Fri Feb 20 01:18:04 2026 +0530

    HDDS-14675. Move s3g smoke test to run from s3g host instead of om host
---
 playbooks/cluster.yml                              | 27 ++++++++---
 .../tasks/main.yml                                 | 46 +------------------
 roles/ozone_smoke_s3g/defaults/main.yml            | 16 +++++++
 roles/ozone_smoke_s3g/tasks/main.yml               | 53 ++++++++++++++++++++++
 roles/ozone_ui/tasks/main.yml                      |  2 +
 5 files changed, 93 insertions(+), 51 deletions(-)

diff --git a/playbooks/cluster.yml b/playbooks/cluster.yml
index b705b33..e25b2f7 100644
--- a/playbooks/cluster.yml
+++ b/playbooks/cluster.yml
@@ -65,15 +65,25 @@
       tags: ["ozone_service"]
       when: start_after_install | bool
 
-- name: "Ozone Smoke Test"
+- name: "Ozone Cluster Smoke Test"
   hosts: "{{ groups['om'] | list | first }}"
   gather_facts: false
   roles:
     - role: ozone_ui
       tags: ["ozone_ui"]
-    - role: ozone_smoke
-      tags: ["ozone_smoke"]
+    - role: ozone_smoke_cluster
+      tags: ["ozone_smoke_cluster"]
 
+- name: "Ozone S3G Smoke Test"
+  hosts: "{{ (groups.get('s3g', []) | list)[0] if (groups.get('s3g', []) | 
length) > 0 else 'never' }}"
+  gather_facts: false
+  roles:
+    - role: ozone_smoke_s3g
+      tags: ["ozone_smoke_s3g"]
+
+- name: "Display UI Endpoints"
+  hosts: "{{ groups['om'] | list | first }}"
+  gather_facts: false
   post_tasks:
     - name: "Build UI endpoints display lines"
       set_fact:
@@ -97,12 +107,17 @@
             )) +
             ['', 'S3 Gateway (HTTP):'] +
             ((endpoint_urls.s3g_http | length > 0) | ternary(
-              endpoint_urls.s3g_http | map('regex_replace', '^', '  - ') | 
list,
+              ['  - ' ~ (endpoint_urls.s3g_http | first)],
               ['  - Not configured']
             )) +
-            ['', 'S3 Gateway (Admin):'] +
+            ['', 'S3 Gateway (Web Admin):'] +
             ((endpoint_urls.s3g_admin | length > 0) | ternary(
-              endpoint_urls.s3g_admin | map('regex_replace', '^', '  - ') | 
list,
+              ['  - ' ~ (endpoint_urls.s3g_admin | first)],
+              ['  - Not configured']
+            )) +
+            ['', 'Datanode UI:'] +
+            ((endpoint_urls.datanode | length > 0) | ternary(
+              ['  - ' ~ (endpoint_urls.datanode | first)],
               ['  - Not configured']
             )) +
             [
diff --git a/roles/ozone_smoke/tasks/main.yml 
b/roles/ozone_smoke_cluster/tasks/main.yml
similarity index 61%
rename from roles/ozone_smoke/tasks/main.yml
rename to roles/ozone_smoke_cluster/tasks/main.yml
index 69337b2..2f2be78 100644
--- a/roles/ozone_smoke/tasks/main.yml
+++ b/roles/ozone_smoke_cluster/tasks/main.yml
@@ -19,7 +19,6 @@
     create_key_cmd: "{{ 'sh key put --type RATIS --replication ONE' if 
groups.get('datanodes', []) | length < 3 else 'sh key put' }}"
     vol: "demovol"
     bucket: "demobuck"
-    s3g_bucket: "demos3g"
     key: "demokey"
     ozone_bin: "{{ install_base }}/current/bin/ozone"
 
@@ -60,47 +59,4 @@
     msg:
       - "Stdout: {{ (key_info.stdout_lines | default([])) | join('\n') }}"
       - "Stderr: {{ (key_info.stderr_lines | default([])) | join('\n') }}"
-  run_once: true
-
-- name: "Create test bucket on S3G host (if present)"
-  block:
-    - name: "Install awscli on S3G host"
-      package:
-        name: awscli
-        state: present
-      become: true
-
-    - name: "AWS CLI configure dummy credentials for S3G tests"
-      shell: |
-        set -euo pipefail
-        aws configure set aws_access_key_id dummy
-        aws configure set aws_secret_access_key dummy
-      args:
-        executable: /bin/bash
-
-    - name: "AWS CLI S3G: create test bucket '{{ s3g_bucket }}'"
-      shell: |
-        set -o pipefail
-        aws s3api create-bucket --bucket {{ s3g_bucket }} --endpoint-url 
"http://{{ groups['s3g'][0] }}:9878" || true
-      args:
-        executable: /bin/bash
-      register: aws_create_result
-      changed_when: false
-
-    - name: "AWS CLI S3G: list buckets"
-      shell: |
-        set -o pipefail
-        aws s3api list-buckets --endpoint-url "http://{{ groups['s3g'][0] 
}}:9878"
-      args:
-        executable: /bin/bash
-      register: aws_list_result
-      changed_when: false
-
-    - name: "Show AWS CLI S3G check output"
-      debug:
-        msg:
-          - "Create bucket output: {{ (aws_create_result.stdout | default('')) 
}}"
-          - "List buckets output: {{ (aws_list_result.stdout | default('')) }}"
-  when:
-    - groups.get('s3g', []) | length > 0
-    - inventory_hostname == groups['s3g'][0]
\ No newline at end of file
+  run_once: true
\ No newline at end of file
diff --git a/roles/ozone_smoke_s3g/defaults/main.yml 
b/roles/ozone_smoke_s3g/defaults/main.yml
new file mode 100644
index 0000000..5609943
--- /dev/null
+++ b/roles/ozone_smoke_s3g/defaults/main.yml
@@ -0,0 +1,16 @@
+# 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 MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT.  In no event shall the ASF be liable for any
+# claim, damages or other liability.
+#
+s3g_bucket: demos3g
diff --git a/roles/ozone_smoke_s3g/tasks/main.yml 
b/roles/ozone_smoke_s3g/tasks/main.yml
new file mode 100644
index 0000000..5952ee7
--- /dev/null
+++ b/roles/ozone_smoke_s3g/tasks/main.yml
@@ -0,0 +1,53 @@
+# 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 MERCHANTABILITY, FITNESS FOR A PARTICULAR
+# PURPOSE AND NONINFRINGEMENT.  In no event shall the ASF be liable for any
+# claim, damages or other liability.
+#
+---
+- name: "Install awscli on S3G host"
+  package:
+    name: awscli
+    state: present
+  become: true
+
+- name: "AWS CLI configure dummy credentials for S3G tests"
+  shell: |
+    set -euo pipefail
+    aws configure set aws_access_key_id dummy
+    aws configure set aws_secret_access_key dummy
+  args:
+    executable: /bin/bash
+
+- name: "AWS CLI S3G: create test bucket '{{ s3g_bucket }}'"
+  shell: |
+    set -o pipefail
+    aws s3api create-bucket --bucket {{ s3g_bucket }} --endpoint-url 
"http://{{ inventory_hostname }}:9878" || true
+  args:
+    executable: /bin/bash
+  register: aws_create_result
+  changed_when: false
+
+- name: "AWS CLI S3G: list buckets"
+  shell: |
+    set -o pipefail
+    aws s3api list-buckets --endpoint-url "http://{{ inventory_hostname 
}}:9878"
+  args:
+    executable: /bin/bash
+  register: aws_list_result
+  changed_when: false
+
+- name: "Show AWS CLI S3G check output"
+  debug:
+    msg:
+      - "Create bucket output: {{ (aws_create_result.stdout | default('')) }}"
+      - "List buckets output: {{ (aws_list_result.stdout | default('')) }}"
diff --git a/roles/ozone_ui/tasks/main.yml b/roles/ozone_ui/tasks/main.yml
index 692550b..bf7167b 100644
--- a/roles/ozone_ui/tasks/main.yml
+++ b/roles/ozone_ui/tasks/main.yml
@@ -20,6 +20,7 @@
     _scm_hosts_ui: "{{ groups.get('scm', []) | list }}"
     _recon_hosts_ui: "{{ groups.get('recon', []) | list }}"
     _s3g_hosts_ui: "{{ groups.get('s3g', []) | list }}"
+    _datanodes_ui: "{{ groups.get('datanodes', []) | list }}"
 
 - name: "Compute service UI URLs"
   set_fact:
@@ -29,6 +30,7 @@
       recon: "{{ (_recon_hosts_ui | length > 0) | ternary(['http://' + 
_recon_hosts_ui[0] + ':9888'], []) }}"
       s3g_http: "{{ _s3g_hosts_ui | 
map('regex_replace','^(.*)$','http://\\1:9878') | list }}"
       s3g_admin: "{{ _s3g_hosts_ui | 
map('regex_replace','^(.*)$','http://\\1:19878') | list }}"
+      datanode: "{{ (_datanodes_ui | length > 0) | ternary(['http://' + 
_datanodes_ui[0] + ':9882'], []) }}"
 
 - name: "Export UI endpoints to controller logs directory"
   copy:


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

Reply via email to