]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
cephadm-adopt: bindmount /var/lib/ceph with 'ro'
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 30 Nov 2021 09:00:20 +0000 (10:00 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 30 Nov 2021 17:39:31 +0000 (18:39 +0100)
When collocating osds with iscsigw daemons, cephadm bindmounts the
following:

```
-v /var/lib/ceph/6126c064-6a9e-4092-8a64-977930df0843/iscsi.rbd.ceph-ameenasuhani-4fs3bq-node5.vomtqb/configfs:/sys/kernel/config
```

this prevents cephadm-adopt playbook from running container and bindmounting `/var/lib/ceph:/var/lib/ceph:z`

since 'ro' is enough in this playbook, let's replace the ':z' option on
this bindmount with ':ro'

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2027411
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/cephadm-adopt.yml

index 7b4adc5d821359de7c3472b39ac0aed79716930a..60707daf0ba46cb5d5d573306ceaa60c3dd53df3 100644 (file)
 
     - name: set_fact ceph_cmd
       set_fact:
-        ceph_cmd: "{{ container_binary + ' run --rm --net=host -v /etc/ceph:/etc/ceph:z -v /var/lib/ceph:/var/lib/ceph:z -v /var/run/ceph:/var/run/ceph:z --entrypoint=ceph ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else 'ceph' }} --cluster {{ cluster }}"
+        ceph_cmd: "{{ container_binary + ' run --rm --net=host -v /etc/ceph:/etc/ceph:z -v /var/lib/ceph:/var/lib/ceph:ro -v /var/run/ceph:/var/run/ceph:z --entrypoint=ceph ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else 'ceph' }} --cluster {{ cluster }}"
 
     - name: get current fsid
       command: "{{ ceph_cmd }} fsid"