Allow custom loopback devices in multinode scripts

story: 2010760
task: 48047
Change-Id: Ie370429a9fe48c98894ce60470e3266649c4685c
This commit is contained in:
Vladimir Kozhukalov 2023-06-09 23:20:03 +03:00
parent 02a9e1e0ed
commit 1651f252aa
3 changed files with 12 additions and 4 deletions

View File

@ -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:

View File

@ -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

View File

@ -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') }}"