Skip to content

Commit

Permalink
cephadm-adopt: bindmount /var/lib/ceph with 'ro'
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
guits committed Dec 2, 2021
1 parent f2eab35 commit 8f26939
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion infrastructure-playbooks/cephadm-adopt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@

- 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"
Expand Down
4 changes: 0 additions & 4 deletions library/ceph_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@
'''


<<<<<<< HEAD
def fatal(message, module):
'''
Report a fatal error and exit
Expand All @@ -198,10 +197,7 @@ def fatal(message, module):
raise(Exception(message))


def container_exec(binary, container_image):
=======
def container_exec(binary, container_image, mounts=None):
>>>>>>> b02d71c30 (ceph_volume: support overriding bind-mounts)
'''
Build the docker CLI to run a command inside a container
'''
Expand Down

0 comments on commit 8f26939

Please sign in to comment.