@@ -259,6 +259,25 @@ for Cinder, Cinder backup, Glance, and Nova in Kolla Ansible.
259259 mgr : " profile rbd pool=images"
260260 state : present
261261
262+ .. note ::
263+
264+ By default, the ``client.cinder `` user is configured with read-only access
265+ to the ``images `` pool. However, to support copy-on-write (COW) snapshots,
266+ configure read-write access to the ``images `` pool by changing ``profile
267+ rbd-read-only pool=images `` to ``profile rbd pool=images ``:
268+
269+ .. code :: yaml
270+
271+ cephadm_keys :
272+ - name : client.cinder
273+ caps :
274+ mon : " profile rbd"
275+ osd : " profile rbd pool=volumes, profile rbd pool=vms, profile rbd pool=images"
276+ mgr : " profile rbd pool=volumes, profile rbd pool=vms"
277+
278+ For more details on enabling and configuring COW optimisations, see the
279+ :ref: `ceph-cow-optimisations ` section.
280+
262281Ceph Commands
263282~~~~~~~~~~~~~
264283
@@ -552,3 +571,88 @@ committed to the configuration.
552571
553572This configuration will be used during
554573``kayobe overcloud service deploy ``.
574+
575+ OpenStack integration
576+ =====================
577+
578+ .. _ceph-cow-optimisations :
579+
580+ Copy on write optimisations
581+ ---------------------------
582+
583+ Copy on write optimisations are currently disabled by default due to
584+ `security concerns <https://bugs.launchpad.net/kolla-ansible/+bug/1992153 >`__.
585+ To enable them, set ``stackhpc_enable_ceph_cow_optimisations `` to ``true `` in
586+ ``etc/kayobe/stackhpc.yml ``. Setting this flag to ``true `` causes Kayobe to
587+ render a `glance.conf ` file with the following content:
588+
589+ .. code :: ini
590+
591+ [DEFAULT]
592+ show_multiple_locations = true
593+ show_image_direct_url = true
594+
595+ [glance_store]
596+ rbd_thin_provisioning = true
597+
598+ .. warning ::
599+
600+ Enabling ``show_image_direct_url `` allows Glance to return the RADOS location
601+ (pool and image name) for each image. Although this does not expose any Ceph
602+ credentials, it can be considered an information leak in some environments.
603+ There are plans in kolla-ansible to deploy a separate ``glance-api `` instance
604+ for the internal endpoint, which would allow this to be enabled for the
605+ internal endpoint only.
606+
607+ Verify that the Cinder user has read-write access to the images pool by running:
608+
609+ .. code :: console
610+
611+ ceph auth get client.cinder
612+
613+ If the output includes `profile rbd-read-only pool=images `, update the caps using:
614+
615+ .. code :: console
616+
617+ ceph auth caps client.cinder mon 'profile rbd' osd 'profile rbd pool=volumes, profile rbd pool=vms, profile rbd pool=images' mgr 'profile rbd pool=volumes, profile rbd pool=vms'
618+
619+ Be sure to keep any existing capabilities and only change the capabilities on the
620+ images pool from `profile rbd-read-only pool=images ` to
621+ `profile rbd pool=images `. Then re-run the verification command to confirm the
622+ change.
623+
624+ The Ceph keyrings under the Cinder and Nova configurations should also be
625+ updated to remove the read-only flag (e.g. remove `readonly ` from the caps
626+ lines in `etc/kayobe/kolla/config/cinder/ceph.client.cinder.keyring ` and
627+ `etc/kayobe/kolla/config/nova/ceph.client.cinder.keyring `).
628+
629+ Example (before / after):
630+
631+ .. code :: ini
632+
633+ [client.cinder]
634+ key = redacted
635+ caps mgr = " profile rbd pool=volumes, profile rbd pool=vms"
636+ caps mon = " profile rbd"
637+ caps osd = " profile rbd pool=volumes, profile rbd pool=vms, profile rbd-read-only pool=images"
638+
639+ .. code :: ini
640+
641+ [client.cinder]
642+ key = redacted
643+ caps mgr = " profile rbd pool=volumes, profile rbd pool=vms"
644+ caps mon = " profile rbd"
645+ caps osd = " profile rbd pool=volumes, profile rbd pool=vms, profile rbd pool=images"
646+
647+ If you had to change the keyrings, you will need to reconfigure glance, nova and cinder:
648+
649+ .. code :: console
650+
651+ kayobe overcloud service deploy -kt glance,nova,cinder
652+
653+ otherwise, just reconfigure glance:
654+
655+ .. code :: console
656+
657+ kayobe overcloud service deploy -kt glance
658+
0 commit comments