Stop using ceph/daemon entrypoint
Due to the recent Ceph 6 (Quincy) container image refactoring, the old entrypoint is no longer available. However, the ceph-nfs systemd unit should support both Pacific and Quincy releases. This patch introduces a task that is able to detect the version provided by the ceph container in the Heat stack and renders the systemd unit accordingly. Change-Id: I34537db460ff5aaba93da7e104262e26e64cbb1a
This commit is contained in:
parent
6e1681ec70
commit
a23795e83b
|
@ -77,3 +77,4 @@ tripleo_cephadm_nfs_ingress_frontend_port: 2049
|
||||||
tripleo_cephadm_nfs_ingress_monitor_port: 8999
|
tripleo_cephadm_nfs_ingress_monitor_port: 8999
|
||||||
tripleo_cephadm_ceph_vips: {}
|
tripleo_cephadm_ceph_vips: {}
|
||||||
tripleo_cephadm_extra_args: ""
|
tripleo_cephadm_extra_args: ""
|
||||||
|
tripleo_cephadm_pacific_filter: "16.*"
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
- "/var/log/ceph"
|
- "/var/log/ceph"
|
||||||
- "/var/run/ceph"
|
- "/var/run/ceph"
|
||||||
- "/var/lib/ceph/bootstrap-rgw"
|
- "/var/lib/ceph/bootstrap-rgw"
|
||||||
|
- "/var/lib/nfs/rpc_pipefs/nfs"
|
||||||
- "/var/lib/ceph/radosgw/ceph-rgw.{{ tripleo_cephadm_ceph_nfs_ceph_user }}"
|
- "/var/lib/ceph/radosgw/ceph-rgw.{{ tripleo_cephadm_ceph_nfs_ceph_user }}"
|
||||||
- "/var/lib/ceph/radosgw/{{ tripleo_cephadm_cluster }}-rgw.{{ nfs_node }}"
|
- "/var/lib/ceph/radosgw/{{ tripleo_cephadm_cluster }}-rgw.{{ nfs_node }}"
|
||||||
|
|
||||||
|
|
|
@ -94,11 +94,18 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
delegate_to: "{{ groups['ceph_nfs'][0] }}"
|
delegate_to: "{{ groups['ceph_nfs'][0] }}"
|
||||||
|
|
||||||
|
- name: Get Ceph version
|
||||||
|
command: "{{ tripleo_cephadm_container_cli }} run --rm --entrypoint=ceph {{ ceph_container }} -v"
|
||||||
|
register: ceph_version
|
||||||
|
vars:
|
||||||
|
ceph_container: "{{ tripleo_cephadm_container_ns }}/{{ tripleo_cephadm_container_image }}:{{ tripleo_cephadm_container_tag }}"
|
||||||
|
|
||||||
- name: Render Ganesha templates and files
|
- name: Render Ganesha templates and files
|
||||||
include_tasks: ganesha/start_nfs.yaml
|
include_tasks: ganesha/start_nfs.yaml
|
||||||
vars:
|
vars:
|
||||||
nfs_node: "{{ node }}"
|
nfs_node: "{{ node }}"
|
||||||
dbus_ganesha_file: "{{ _dbus_ganesha }}"
|
dbus_ganesha_file: "{{ _dbus_ganesha }}"
|
||||||
|
tripleo_cephadm_ceph_version: "{{ ceph_version.stdout.split(' ')[2] }}"
|
||||||
loop: "{{ groups['ceph_nfs'] }}"
|
loop: "{{ groups['ceph_nfs'] }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: node
|
loop_var: node
|
||||||
|
|
|
@ -22,16 +22,25 @@ ExecStart=/usr/bin/{{ container_cli }} run --rm --net=host \
|
||||||
-v /var/run/ceph:/var/run/ceph:z \
|
-v /var/run/ceph:/var/run/ceph:z \
|
||||||
-v /var/log/ceph:/var/log/ceph:z \
|
-v /var/log/ceph:/var/log/ceph:z \
|
||||||
-v /var/log/ganesha:/var/log/ganesha:z \
|
-v /var/log/ganesha:/var/log/ganesha:z \
|
||||||
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
|
-v /var/lib/nfs/rpc_pipefs/nfs:/var/lib/nfs/rpc_pipefs/nfs \
|
||||||
|
--name=ceph-nfs-{{ tripleo_cephadm_ceph_nfs_service_suffix | default(ansible_facts['hostname']) }} \
|
||||||
{% if tripleo_cephadm_ceph_nfs_dynamic_exports | bool %}
|
{% if tripleo_cephadm_ceph_nfs_dynamic_exports | bool %}
|
||||||
--privileged \
|
--privileged \
|
||||||
-v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \
|
-v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
{# Ceph Pacific is defined in the form "v16.x.y": filtering "16.*" is enough #}
|
||||||
|
{% if (tripleo_cephadm_ceph_version is defined) and
|
||||||
|
(tripleo_cephadm_ceph_version is match(tripleo_cephadm_pacific_filter)) %}
|
||||||
-e CLUSTER={{ tripleo_cephadm_cluster }} \
|
-e CLUSTER={{ tripleo_cephadm_cluster }} \
|
||||||
-e CEPH_DAEMON=NFS \
|
-e CEPH_DAEMON=NFS \
|
||||||
-e CONTAINER_IMAGE={{ tripleo_cephadm_container_ns }}/{{ tripleo_cephadm_container_image }}:{{ tripleo_cephadm_container_tag }} \
|
-e CONTAINER_IMAGE={{ tripleo_cephadm_container_ns }}/{{ tripleo_cephadm_container_image }}:{{ tripleo_cephadm_container_tag }} \
|
||||||
--name=ceph-nfs-{{ tripleo_cephadm_ceph_nfs_service_suffix | default(ansible_facts['hostname']) }} \
|
|
||||||
{{ tripleo_cephadm_container_ns }}/{{ tripleo_cephadm_container_image }}:{{ tripleo_cephadm_container_tag }}
|
{{ tripleo_cephadm_container_ns }}/{{ tripleo_cephadm_container_image }}:{{ tripleo_cephadm_container_tag }}
|
||||||
|
{% else %}
|
||||||
|
--entrypoint=/bin/sh \
|
||||||
|
{{ tripleo_cephadm_container_ns }}/{{ tripleo_cephadm_container_image }}:{{ tripleo_cephadm_container_tag }} \
|
||||||
|
-c 'rpcbind && rpc.statd -L && rpc.idmapd && /usr/bin/ganesha.nfsd -F -L STDOUT'
|
||||||
|
{% endif -%}
|
||||||
ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_cli }} rm -f `cat /%t/%n-cid`"
|
ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_cli }} rm -f `cat /%t/%n-cid`"
|
||||||
KillMode=none
|
KillMode=none
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
Loading…
Reference in New Issue