Skip to content

Commit 8f26939

Browse files
committed
cephadm-adopt: bindmount /var/lib/ceph with 'ro'
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> (cherry picked from commit c4fdf95)
1 parent f2eab35 commit 8f26939

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

infrastructure-playbooks/cephadm-adopt.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176

177177
- name: set_fact ceph_cmd
178178
set_fact:
179-
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 }}"
179+
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 }}"
180180

181181
- name: get current fsid
182182
command: "{{ ceph_cmd }} fsid"

library/ceph_volume.py

-4
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@
186186
'''
187187

188188

189-
<<<<<<< HEAD
190189
def fatal(message, module):
191190
'''
192191
Report a fatal error and exit
@@ -198,10 +197,7 @@ def fatal(message, module):
198197
raise(Exception(message))
199198

200199

201-
def container_exec(binary, container_image):
202-
=======
203200
def container_exec(binary, container_image, mounts=None):
204-
>>>>>>> b02d71c30 (ceph_volume: support overriding bind-mounts)
205201
'''
206202
Build the docker CLI to run a command inside a container
207203
'''

0 commit comments

Comments
 (0)