diff options
| author | Zuul <zuul@review.opendev.org> | 2026-04-20 09:15:13 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2026-04-20 09:15:13 +0000 |
| commit | e89a36ad156851d1919f73d5b71d35c1d9cbc659 (patch) | |
| tree | c0042ee5d27446690d8940be65fdc3502f8066d7 | |
| parent | 2e89b220ab9b30beef8cb2e3d336d51abe83067b (diff) | |
| parent | df63282b329965b03a8956170aa0b5406a894e56 (diff) | |
| download | kolla-ansible-e89a36ad156851d1919f73d5b71d35c1d9cbc659.tar.gz kolla-ansible-e89a36ad156851d1919f73d5b71d35c1d9cbc659.zip | |
Merge "cinder: Change default destination for cinder-volume/backup containers"
| -rw-r--r-- | ansible/inventory/all-in-one | 17 | ||||
| -rw-r--r-- | ansible/inventory/multinode | 14 | ||||
| -rw-r--r-- | ansible/roles/cinder/defaults/main.yml | 10 | ||||
| -rw-r--r-- | ansible/roles/cinder/tasks/precheck.yml | 4 | ||||
| -rw-r--r-- | ansible/roles/iscsi/defaults/main.yml | 12 | ||||
| -rw-r--r-- | ansible/site.yml | 4 | ||||
| -rw-r--r-- | doc/source/reference/storage/cinder-guide.rst | 47 | ||||
| -rw-r--r-- | releasenotes/notes/move-cinder-volume-b4ee8e4378ea6828.yaml | 16 | ||||
| -rw-r--r-- | tests/templates/inventory.j2 | 17 | ||||
| -rw-r--r-- | zuul.d/scenarios/cephadm.yaml | 1 |
10 files changed, 101 insertions, 41 deletions
diff --git a/ansible/inventory/all-in-one b/ansible/inventory/all-in-one index 3eed0195e..a878e29a6 100644 --- a/ansible/inventory/all-in-one +++ b/ansible/inventory/all-in-one @@ -270,12 +270,26 @@ network cinder [cinder-backup:children] +cinder + +[cinder-backup-lvm:children] +storage + +[cinder-backup-multiple:children] +cinder storage [cinder-scheduler:children] cinder [cinder-volume:children] +cinder + +[cinder-volume-lvm:children] +storage + +[cinder-volume-multiple:children] +cinder storage # Cloudkitty @@ -286,11 +300,12 @@ cloudkitty cloudkitty # iSCSI +# NOTE(mnasiadka): We need iscsid on cinder-volume hosts and clients [iscsid:children] compute storage -ironic +# NOTE(mnasiadka): We need tgtd on storage nodes for Cinder LVM [tgtd:children] storage diff --git a/ansible/inventory/multinode b/ansible/inventory/multinode index eb533b8f5..2b3157b9c 100644 --- a/ansible/inventory/multinode +++ b/ansible/inventory/multinode @@ -288,12 +288,26 @@ neutron cinder [cinder-backup:children] +cinder + +[cinder-backup-lvm:children] +storage + +[cinder-backup-multiple:children] +cinder storage [cinder-scheduler:children] cinder [cinder-volume:children] +cinder + +[cinder-volume-lvm:children] +storage + +[cinder-volume-multiple:children] +cinder storage # Cloudkitty diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index 4258d863e..50d764c62 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -41,7 +41,10 @@ cinder_services: healthcheck: "{{ cinder_scheduler_healthcheck }}" cinder-volume: container_name: cinder_volume - group: cinder-volume + group: >- + {{ 'cinder-volume-multiple' if (cinder_enabled_backends | length > 1 and enable_cinder_backend_lvm | bool) else + 'cinder-volume-lvm' if enable_cinder_backend_lvm | bool else + 'cinder-volume' }} enabled: true image: "{{ cinder_volume_image_full }}" privileged: true @@ -52,7 +55,10 @@ cinder_services: healthcheck: "{{ cinder_volume_healthcheck }}" cinder-backup: container_name: cinder_backup - group: cinder-backup + group: >- + {{ 'cinder-backup-multiple' if (cinder_enabled_backends | length > 1 and enable_cinder_backend_lvm | bool) else + 'cinder-backup-lvm' if enable_cinder_backend_lvm | bool else + 'cinder-backup' }} enabled: "{{ enable_cinder_backup | bool }}" image: "{{ cinder_backup_image_full }}" privileged: true diff --git a/ansible/roles/cinder/tasks/precheck.yml b/ansible/roles/cinder/tasks/precheck.yml index ebaf913bf..35870c848 100644 --- a/ansible/roles/cinder/tasks/precheck.yml +++ b/ansible/roles/cinder/tasks/precheck.yml @@ -54,7 +54,7 @@ when: - enable_cinder | bool - enable_cinder_backend_lvm | bool - - inventory_hostname in groups['cinder-volume'] + - inventory_hostname in groups['cinder-volume-multiple'] if cinder_enabled_backends | length > 1 else inventory_hostname in groups['cinder-volume-lvm'] - name: Checking for coordination backend if Ceph backend is enabled run_once: true @@ -64,7 +64,7 @@ - not skip_cinder_backend_check | bool - cinder_backend_ceph | bool - cinder_coordination_backend == '' - - groups['cinder-volume'] | length > 1 + - groups['cinder-volume-multiple'] | length > 1 if enable_cinder_backend_lvm | bool else groups['cinder-volume'] | length > 1 - name: Check if S3 configurations are defined ansible.builtin.assert: diff --git a/ansible/roles/iscsi/defaults/main.yml b/ansible/roles/iscsi/defaults/main.yml index 8d94bcaf5..ecf8ad6e1 100644 --- a/ansible/roles/iscsi/defaults/main.yml +++ b/ansible/roles/iscsi/defaults/main.yml @@ -57,10 +57,18 @@ tgtd_default_volumes: iscsid_extra_volumes: "{{ default_extra_volumes }}" tgtd_extra_volumes: "{{ default_extra_volumes }}" +iscsid_cinder_backup_group: >- + {{ 'cinder-backup-multiple' if (cinder_enabled_backends | length > 1 and enable_cinder_backend_lvm | bool) else + 'cinder-backup-lvm' if enable_cinder_backend_lvm | bool else + 'cinder-backup' }} +iscsid_cinder_volume_group: >- + {{ 'cinder-volume-multiple' if (cinder_enabled_backends | length > 1 and enable_cinder_backend_lvm | bool) else + 'cinder-volume-lvm' if enable_cinder_backend_lvm | bool else + 'cinder-volume' }} enable_iscsid_for_cinder: >- {{ (inventory_hostname in groups['compute'] - or inventory_hostname in groups['cinder-backup'] - or inventory_hostname in groups['cinder-volume']) + or inventory_hostname in groups[iscsid_cinder_backup_group] if enable_cinder_backend_lvm | bool + or inventory_hostname in groups[iscsid_cinder_volume_group] if enable_cinder_backend_lvm | bool) and enable_cinder | bool and enable_cinder_backend_iscsi | bool }} enable_iscsid_for_ironic: >- diff --git a/ansible/site.yml b/ansible/site.yml index 51838593c..911596dc1 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -603,8 +603,12 @@ hosts: - cinder-api - cinder-backup + - cinder-backup-lvm + - cinder-backup-multiple - cinder-scheduler - cinder-volume + - cinder-volume-lvm + - cinder-volume-multiple - "&enable_cinder_True" serial: '{{ kolla_serial|default("0") }}' max_fail_percentage: >- diff --git a/doc/source/reference/storage/cinder-guide.rst b/doc/source/reference/storage/cinder-guide.rst index 07192f0fb..9766c053a 100644 --- a/doc/source/reference/storage/cinder-guide.rst +++ b/doc/source/reference/storage/cinder-guide.rst @@ -67,6 +67,14 @@ Enable the ``lvm`` backend in ``/etc/kolla/globals.yml``: enable_cinder_backend_lvm: true +Edit the inventory file and add ``storage`` group as a child of +``cinder-volume`` group: + +.. code-block:: ini + + [cinder-volume:children] + storage + .. note:: There are currently issues using the LVM backend in a multi-controller setup, @@ -151,9 +159,11 @@ Cinder LVM2 backend with iSCSI As of Newton-1 milestone, Kolla supports LVM2 as cinder backend. It is accomplished by introducing two new containers ``tgtd`` and ``iscsid``. -``tgtd`` container serves as a bridge between cinder-volume process and a -server hosting Logical Volume Groups (LVG). ``iscsid`` container serves as -a bridge between nova-compute process and the server hosting LVG. +``tgtd`` container is the target part of iSCSI setup which needs to run +on the ``storage`` Ansible group for exposing volumes from LVM. +``iscsid`` container is the client part of iSCSI setup which needs to run +together with nova-compute for instance access to storage and on hosts +running ``cinder-volume`` and ``cinder-backup`` for volume operations. In order to use Cinder's LVM backend, a LVG named ``cinder-volumes`` should exist on the server and following parameter must be specified in @@ -163,37 +173,6 @@ exist on the server and following parameter must be specified in enable_cinder_backend_lvm: true -For Ubuntu and LVM2/iSCSI -------------------------- - -``iscsd`` process uses configfs which is normally mounted at -``/sys/kernel/config`` to store discovered targets information, on centos/rhel -type of systems this special file system gets mounted automatically, which is -not the case on debian/ubuntu. Since ``iscsid`` container runs on every nova -compute node, the following steps must be completed on every Ubuntu server -targeted for nova compute role. - -* Add configfs module to ``/etc/modules`` -* Rebuild initramfs using: ``update-initramfs -u`` command -* Stop ``open-iscsi`` system service due to its conflicts - with iscsid container. - - Ubuntu 16.04 (systemd): - ``systemctl stop open-iscsi; systemctl stop iscsid`` - -* Make sure configfs gets mounted during a server boot up process. There are - multiple ways to accomplish it, one example: - - .. code-block:: console - - mount -t configfs /etc/rc.local /sys/kernel/config - - .. note:: - - There is currently an issue with the folder /sys/kernel/config as it is - either empty or does not exist in several operating systems, - see `_bug 1631072 <https://bugs.launchpad.net/kolla/+bug/1631072>`__ for more info - Cinder backend with external iSCSI storage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/releasenotes/notes/move-cinder-volume-b4ee8e4378ea6828.yaml b/releasenotes/notes/move-cinder-volume-b4ee8e4378ea6828.yaml new file mode 100644 index 000000000..10cab6193 --- /dev/null +++ b/releasenotes/notes/move-cinder-volume-b4ee8e4378ea6828.yaml @@ -0,0 +1,16 @@ +--- +upgrade: + - | + ``cinder-volume`` and ``cinder-backup`` containers are now + deployed by default on ``cinder`` group - which effectively + is ``control`` by default (earlier it defaulted to ``storage``). + - | + New Ansible inventory groups have been introduced to support properly + Cinder LVM backend setup: + + * ``cinder-backup-lvm`` + * ``cinder-backup-multiple`` + * ``cinder-volume-lvm`` + * ``cinder-volume-multiple`` + + Please update your inventory overrides accordingly. diff --git a/tests/templates/inventory.j2 b/tests/templates/inventory.j2 index e9f5da5ad..2991518ce 100644 --- a/tests/templates/inventory.j2 +++ b/tests/templates/inventory.j2 @@ -355,14 +355,31 @@ neutron cinder [cinder-backup:children] +cinder + +[cinder-backup-lvm:children] +storage + +[cinder-backup-multiple:children] +cinder storage [cinder-scheduler:children] cinder [cinder-volume:children] +cinder + +[cinder-volume-lvm:children] storage +[cinder-volume-multiple:children] +cinder +storage + +[cinder-scheduler:children] +cinder + # Cloudkitty [cloudkitty-api:children] cloudkitty diff --git a/zuul.d/scenarios/cephadm.yaml b/zuul.d/scenarios/cephadm.yaml index ea36ecc91..11bbcacc4 100644 --- a/zuul.d/scenarios/cephadm.yaml +++ b/zuul.d/scenarios/cephadm.yaml @@ -8,6 +8,7 @@ - ^ansible/group_vars/baremetal/ansible-python-interpreter.yml - ^ansible/roles/(ceph-rgw|certificates|cinder|common|fluentd|glance|haproxy-config|heat|horizon|keystone|loadbalancer|loadbalancer-config|neutron|nova|nova-cell|openvswitch|placement|proxysql|rabbitmq|valkey)/ - ^roles/cephadm/ + - ^tests/templates/inventory.j2 vars: kolla_ansible_setup_disks_file_path: "/var/lib/ceph-osd.img" kolla_ansible_setup_disks_vg_name: "cephvg" |
