Skip to content

Commit 3efa1f7

Browse files
committed
Update docs for client.cinder to support COW snapshots
This is to support copy on write snapshots: ``` Performing standard snapshot because direct snapshot failed: no write permission on storage pool images: nova.exception.Forbidden: no write permission on storage pool images ``` when using ceph for nova ephemeral storage. My preferrence is for a standardised configuration rather than another if you use this feature, do this.
1 parent 5472237 commit 3efa1f7

File tree

8 files changed

+119
-3
lines changed

8 files changed

+119
-3
lines changed

doc/source/configuration/cephadm.rst

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ for Cinder, Cinder backup, Glance, and Nova in Kolla Ansible.
245245
- name: client.cinder
246246
caps:
247247
mon: "profile rbd"
248-
osd: "profile rbd pool=volumes, profile rbd pool=vms, profile rbd-read-only pool=images"
248+
osd: "profile rbd pool=volumes, profile rbd pool=vms, profile rbd pool=images"
249249
mgr: "profile rbd pool=volumes, profile rbd pool=vms"
250250
- name: client.cinder-backup
251251
caps:
@@ -552,3 +552,85 @@ committed to the configuration.
552552

553553
This configuration will be used during
554554
``kayobe overcloud service deploy``.
555+
556+
OpenStack integration
557+
=====================
558+
559+
Copy on write optimisations
560+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
561+
562+
Copy on write optimisations are currently disabled by default due to
563+
`security concerns <https://bugs.launchpad.net/kolla-ansible/+bug/1992153>`__.
564+
To enable them, set ``stackhpc_enable_ceph_cow_optimisations`` to ``true`` in
565+
``etc/kayobe/stackhpc.yml``. Setting this flag to ``true`` causes Kayobe to
566+
render a `glance.conf` file with the following content:
567+
568+
.. code:: ini
569+
570+
[DEFAULT]
571+
show_multiple_locations = true
572+
show_image_direct_url = true
573+
574+
[glance_store]
575+
rbd_thin_provisioning = true
576+
577+
.. warning::
578+
579+
Enabling ``show_image_direct_url`` allows Glance to return the RADOS location
580+
(pool and image name) for each image. Although this does not expose any Ceph
581+
credentials, it can be considered an information leak in some environments.
582+
There are plans in kolla-ansible to deploy a separate ``glance-api`` instance
583+
for the internal endpoint, which would allow this to be enabled for the
584+
internal endpoint only.
585+
586+
Verify that the Cinder user has read-write access to the images pool by running:
587+
588+
.. code:: console
589+
590+
ceph auth get client.cinder
591+
592+
If the output includes `profile rbd-read-only pool=images`, update the caps using:
593+
594+
.. code:: console
595+
596+
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'
597+
598+
Be sure to keep any existing capabilities and only change the capabilities on the
599+
images pool from `profile rbd-read-only pool=images` to
600+
`profile rbd pool=images`. Then re-run the verification command to confirm the
601+
change.
602+
603+
The Ceph keyrings under the Cinder and Nova configurations should also be
604+
updated to remove the read-only flag (e.g. remove `readonly` from the caps
605+
lines in `etc/kayobe/kolla/config/cinder/ceph.client.cinder.keyring` and
606+
`etc/kayobe/kolla/config/nova/ceph.client.cinder.keyring`).
607+
608+
Example (before / after):
609+
610+
.. code:: ini
611+
612+
[client.cinder]
613+
key = redacted
614+
caps mgr = "profile rbd pool=volumes, profile rbd pool=vms"
615+
caps mon = "profile rbd"
616+
caps osd = "profile rbd pool=volumes, profile rbd pool=vms, profile rbd-read-only pool=images"
617+
618+
.. code:: ini
619+
620+
[client.cinder]
621+
key = redacted
622+
caps mgr = "profile rbd pool=volumes, profile rbd pool=vms"
623+
caps mon = "profile rbd"
624+
caps osd = "profile rbd pool=volumes, profile rbd pool=vms, profile rbd pool=images"
625+
626+
If you had to change the keyrings, you will need to reconfigure glance, nova and cinder:
627+
628+
.. code:: console
629+
630+
kayobe overcloud service deploy -kt glance,nova,cinder
631+
632+
otherwise, just reconfigure glance:
633+
634+
.. code:: console
635+
636+
kayobe overcloud service deploy -kt glance

etc/kayobe/environments/aufn-ceph/cephadm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ cephadm_keys:
4646
- name: client.cinder
4747
caps:
4848
mon: "profile rbd"
49-
osd: "profile rbd pool=volumes, profile rbd pool=vms, profile rbd-read-only pool=images"
49+
osd: "profile rbd pool=volumes, profile rbd pool=vms, profile rbd pool=images"
5050
mgr: "profile rbd pool=volumes, profile rbd pool=vms"
5151
state: present
5252
- name: client.cinder-backup

etc/kayobe/environments/aufn-ceph/stackhpc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ pulp_password: 9e4bfa04-9d9d-493d-9473-ba92e4361dae
1313

1414
# Whether or not to download overcloud host images from Ark
1515
stackhpc_download_overcloud_host_images: true
16+
17+
###############################################################################
18+
# Feature flags
19+
20+
stackhpc_enable_ceph_glance_cow_optimisations: true

etc/kayobe/environments/ci-multinode/cephadm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ cephadm_keys:
4747
- name: client.cinder
4848
caps:
4949
mon: "profile rbd"
50-
osd: "profile rbd pool=volumes, profile rbd pool=vms, profile rbd-read-only pool=images"
50+
osd: "profile rbd pool=volumes, profile rbd pool=vms, profile rbd pool=images"
5151
mgr: "profile rbd pool=volumes, profile rbd pool=vms"
5252
state: present
5353
- name: client.cinder-backup
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
---
2+
###############################################################################
3+
# Feature flags
24

35
stackhpc_enable_cis_benchmark_hardening_hook: true
6+
stackhpc_enable_ceph_glance_cow_optimisations: true
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[DEFAULT]
2+
{% if stackhpc_enable_ceph_glance_cow_optimisations | bool %}
3+
show_image_direct_url = true
4+
show_multiple_locations = true
5+
{% endif %}
6+
7+
[glance_store]
8+
{% if stackhpc_enable_ceph_glance_cow_optimisations | bool %}
9+
rbd_thin_provisioning = true
10+
{% endif %}

etc/kayobe/stackhpc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,11 @@ stackhpc_docker_registry_password: "{{ pulp_stack_password if pulp_stack_passwor
229229
###############################################################################
230230
# Feature flags
231231

232+
# Whether to enable copy on write optimisations for Ceph in the Glance image
233+
# store. Defaults to false as there an information disclosure vulnerability
234+
# with the current kolla-ansible setup when enabling show_direct_url in glance.
235+
stackhpc_enable_ceph_glance_cow_optimisations: false
236+
232237
# Whether or not to run CIS benchmark hardening playbooks. Default is false.
233238
#stackhpc_enable_cis_benchmark_hardening_hook:
234239

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
features:
3+
- |
4+
Adds a ``stackhpc_enable_ceph_cow_optimisations`` feature flag to enable
5+
copy on write optimisations when using Ceph. Please see the ``Copy on write
6+
optimisations`` section under `Configuraton Guide` > `Cephadm and Kayobe`
7+
in the documentation.
8+
9+
The feature is currently opt-in. Note the documented permissions for the
10+
images pool for the Cinder user have been adjusted to make this easier to
11+
apply for future deployments.

0 commit comments

Comments
 (0)