Skip to content

Commit

Permalink
Merge pull request #381 from semihkisa/update_odf_role
Browse files Browse the repository at this point in the history
Updating odf_setup role
  • Loading branch information
betoredhat authored Aug 26, 2024
2 parents 48642b0 + b5af984 commit 40a8d63
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
9 changes: 5 additions & 4 deletions roles/odf_setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ Role Variables
| default_storageclass_annotation | '{"storageclass.kubernetes.io/is-default-class": "true"}' | String | No | Default storageclass annotation |
| external_ceph_data | | JSON | No | A JSON payload generated from RHCS |
| ocs_install_type | | String | Yes | `internal` for LSO, `external` for Ceph/RHCS |
| local_storage_devices | | List | No | For LSO, a list of local devices that will be use as backend |
| local_storage_devices | | List | Yes | For LSO, a list of local devices that will be use as backend |
| ocs_default_storage_class | storagecluster-cephfs | String | No | Default storage class name |
| gatherer_image | registry.access.redhat.com/ubi8/ubi | String | No | Image for disk-gatherer deployment |
| odf_setup_oc_tool_path | '/usr/local/bin/oc` | String | No | Path to the OpenShift Command Line Interface binary.


Inventory Groups and Variables
--------------
Expand All @@ -43,9 +45,8 @@ ocs_install_type=
# with ceph-external-cluster-details-exporter.py script
external_ceph_data='JSON_PAYLOAD'

# (Optional) when enable_lso=true List of disk devices per node to use for LSO
# If not specified, it will use all the local disks available
# comma separated, all servers must have the same
# When enable_lso=true, list of disk devices per node to use for LSO
# Comma separated, all servers must have the same
local_storage_devices=["/dev/sdX", "/dev/sdY", "/dev/sdZ"]

# (Optional) Default storage class name
Expand Down
3 changes: 3 additions & 0 deletions roles/odf_setup/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ default_storageclass_annotation: '{"storageclass.kubernetes.io/is-default-class"

# OCS gatherer_image
gatherer_image: registry.access.redhat.com/ubi8/ubi

# OpenShift Command Line Interface path
odf_setup_oc_tool_path: /usr/local/bin/oc
2 changes: 1 addition & 1 deletion roles/odf_setup/tasks/local-storage-operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
ansible.builtin.shell:
cmd: >
sleep 90;
{{ oc_tool_path }} logs
{{ odf_setup_oc_tool_path }} logs
--selector name=ocs-disk-gatherer
--tail=-1
--since=10m
Expand Down
7 changes: 7 additions & 0 deletions roles/odf_setup/tasks/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,11 @@
There are less than 3 nodes with the label
cluster.ocs.openshift.io/openshift-storage
when: nodes_info.resources | length < 3

- name: Assert that local_storage_devices is defined and is a list with at least one item
ansible.builtin.assert:
that:
- local_storage_devices is defined
- local_storage_devices | length > 0
fail_msg: "local_storage_devices must be a list with at least one item"
...

0 comments on commit 40a8d63

Please sign in to comment.