From 1651f252aa82b3cdc07faa955da1b61e767bea4a Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Fri, 9 Jun 2023 23:20:03 +0300 Subject: [PATCH] Allow custom loopback devices in multinode scripts story: 2010760 task: 48047 Change-Id: Ie370429a9fe48c98894ce60470e3266649c4685c --- tools/deployment/multinode/030-ceph.sh | 9 ++++++--- tools/gate/playbooks/multinode-deploy-cinder.yaml | 5 ++++- tools/gate/playbooks/vars.yaml | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/deployment/multinode/030-ceph.sh b/tools/deployment/multinode/030-ceph.sh index 54d9f1c30e..fb0f82c9f5 100755 --- a/tools/deployment/multinode/030-ceph.sh +++ b/tools/deployment/multinode/030-ceph.sh @@ -14,6 +14,9 @@ set -xe +: ${CEPH_OSD_DATA_DEVICE:=/dev/loop0} +: ${CEPH_OSD_DB_WAL_DEVICE:=/dev/loop1} + #NOTE: Deploy command [ -s /tmp/ceph-fs-uuid.txt ] || uuidgen > /tmp/ceph-fs-uuid.txt CEPH_PUBLIC_NETWORK="$(./tools/deployment/multinode/kube-node-subnet.sh)" @@ -60,12 +63,12 @@ conf: osd: - data: type: bluestore - location: /dev/loop0 + location: ${CEPH_OSD_DATA_DEVICE} block_db: - location: /dev/loop1 + location: ${CEPH_OSD_DB_WAL_DEVICE} size: "5GB" block_wal: - location: /dev/loop1 + location: ${CEPH_OSD_DB_WAL_DEVICE} size: "2GB" storageclass: cephfs: diff --git a/tools/gate/playbooks/multinode-deploy-cinder.yaml b/tools/gate/playbooks/multinode-deploy-cinder.yaml index ed77c2428b..1c38ee3bd1 100644 --- a/tools/gate/playbooks/multinode-deploy-cinder.yaml +++ b/tools/gate/playbooks/multinode-deploy-cinder.yaml @@ -29,12 +29,15 @@ args: chdir: "{{ zuul_osh_relative_path | default(zuul.project.src_dir) }}" - hosts: all + vars_files: + - vars.yaml tasks: - name: Create loopback devices for CEPH on all nodes + environment: "{{ multinode_env }}" shell: | set -xe; pwd; - ./tools/deployment/common/setup-ceph-loopback-device.sh --ceph-osd-data /dev/loop0 --ceph-osd-dbwal /dev/loop1 + ./tools/deployment/common/setup-ceph-loopback-device.sh --ceph-osd-data ${CEPH_OSD_DATA_DEVICE} --ceph-osd-dbwal ${CEPH_OSD_DB_WAL_DEVICE} args: chdir: "{{ zuul_osh_relative_path | default(zuul.project.src_dir) }}" - hosts: primary diff --git a/tools/gate/playbooks/vars.yaml b/tools/gate/playbooks/vars.yaml index 8b313a092b..81b0e17d84 100644 --- a/tools/gate/playbooks/vars.yaml +++ b/tools/gate/playbooks/vars.yaml @@ -19,3 +19,5 @@ multinode_env: OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}" OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}" zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}" + CEPH_OSD_DATA_DEVICE: "{{ ceph_osd_data_device | default('/dev/loop0') }}" + CEPH_OSD_DB_WAL_DEVICE: "{{ ceph_osd_db_wal_device | default('/dev/loop1') }}"