From: Guillaume Abrioux Date: Mon, 26 Nov 2018 13:54:02 +0000 (+0100) Subject: remove kv store support X-Git-Tag: v4.0.0beta1~157 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=fead0813b4808294db5e1ee25a4179f4e6a86f55;p=ceph-ansible.git remove kv store support the next stable release will drop this feature. Signed-off-by: Guillaume Abrioux --- diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 66d307711..e4d59daa8 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -546,15 +546,6 @@ dummy: #container_binary: -############ -# KV store # -############ -#containerized_deployment_with_kv: false -#mon_containerized_default_ceph_conf_with_kv: false -#kv_type: etcd -#kv_endpoint: 127.0.0.1 -#kv_port: 2379 - # this is only here for usage with the rolling_update.yml playbook # do not ever change this here diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index dda71ce94..989696a79 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -546,15 +546,6 @@ ceph_docker_registry: "registry.access.redhat.com/rhceph/" #container_binary: -############ -# KV store # -############ -#containerized_deployment_with_kv: false -#mon_containerized_default_ceph_conf_with_kv: false -#kv_type: etcd -#kv_endpoint: 127.0.0.1 -#kv_port: 2379 - # this is only here for usage with the rolling_update.yml playbook # do not ever change this here diff --git a/roles/ceph-config/tasks/main.yml b/roles/ceph-config/tasks/main.yml index e6b7c101d..3b87f4415 100644 --- a/roles/ceph-config/tasks/main.yml +++ b/roles/ceph-config/tasks/main.yml @@ -119,11 +119,6 @@ when: - not containerized_deployment|bool -# ceph-container-common -# only create fetch directory when: -# we are not populating kv_store with default ceph.conf AND host is a mon -# OR -# we are not population kv_store with default ceph.conf AND there at least 1 nfs in nfs group AND host is the first nfs - block: - name: create a local fetch directory if it does not exist file: @@ -135,11 +130,8 @@ run_once: true when: - (cephx or generate_fsid) - - (not mon_containerized_default_ceph_conf_with_kv and - (inventory_hostname in groups.get(mon_group_name, []))) or - (not mon_containerized_default_ceph_conf_with_kv and - ((groups.get(nfs_group_name, []) | length > 0) - and (inventory_hostname == groups.get(nfs_group_name, [])[0]))) + - ((inventory_hostname in groups.get(mon_group_name, [])) or + (groups.get(nfs_group_name, []) | length > 0) and inventory_hostname == groups.get(nfs_group_name, [])[0]) - name: generate cluster uuid shell: python -c 'import uuid; print(str(uuid.uuid4()))' | tee {{ fetch_directory }}/ceph_cluster_uuid.conf diff --git a/roles/ceph-container-common/tasks/main.yml b/roles/ceph-container-common/tasks/main.yml index d7faa28c2..e2e688294 100644 --- a/roles/ceph-container-common/tasks/main.yml +++ b/roles/ceph-container-common/tasks/main.yml @@ -21,10 +21,9 @@ - name: include checks.yml include_tasks: checks.yml when: - - (not containerized_deployment_with_kv and - ((inventory_hostname in groups.get(mon_group_name, [])) or - (inventory_hostname in groups.get(nfs_group_name, [])) or - (inventory_hostname in groups.get(osd_group_name, [])))) + - (inventory_hostname in groups.get(mon_group_name, []) or + inventory_hostname in groups.get(nfs_group_name, []) or + inventory_hostname in groups.get(osd_group_name, [])) - not ceph_current_status.get('rc', 1) == 0 - not rolling_update | default(false) diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index 188f6116a..d1b4ef2f7 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -538,15 +538,6 @@ containerized_deployment: False container_binary: -############ -# KV store # -############ -containerized_deployment_with_kv: false -mon_containerized_default_ceph_conf_with_kv: false -kv_type: etcd -kv_endpoint: 127.0.0.1 -kv_port: 2379 - # this is only here for usage with the rolling_update.yml playbook # do not ever change this here diff --git a/roles/ceph-mds/templates/ceph-mds.service.j2 b/roles/ceph-mds/templates/ceph-mds.service.j2 index a81097ec8..38c4b1691 100644 --- a/roles/ceph-mds/templates/ceph-mds.service.j2 +++ b/roles/ceph-mds/templates/ceph-mds.service.j2 @@ -13,15 +13,9 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \ {% else -%} --cpu-quota={{ ceph_mds_docker_cpu_limit * 100000 }} \ {% endif -%} - {% if not containerized_deployment_with_kv -%} -v /var/lib/ceph:/var/lib/ceph:z \ -v /etc/ceph:/etc/ceph:z \ -v /var/run/ceph:/var/run/ceph:z \ - {% else -%} - -e KV_TYPE={{kv_type}} \ - -e KV_IP={{kv_endpoint}} \ - -e KV_PORT={{kv_port}} \ - {% endif -%} -v /etc/localtime:/etc/localtime:ro \ -e CLUSTER={{ cluster }} \ -e CEPH_DAEMON=MDS \ diff --git a/roles/ceph-mgr/templates/ceph-mgr.service.j2 b/roles/ceph-mgr/templates/ceph-mgr.service.j2 index e47162086..889862051 100644 --- a/roles/ceph-mgr/templates/ceph-mgr.service.j2 +++ b/roles/ceph-mgr/templates/ceph-mgr.service.j2 @@ -13,15 +13,9 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \ {% else -%} --cpu-quota={{ ceph_mgr_docker_cpu_limit * 100000 }} \ {% endif -%} - {% if not containerized_deployment_with_kv -%} -v /var/lib/ceph:/var/lib/ceph:z \ -v /etc/ceph:/etc/ceph:z \ -v /var/run/ceph:/var/run/ceph:z \ - {% else -%} - -e KV_TYPE={{kv_type}} \ - -e KV_IP={{kv_endpoint}} \ - -e KV_PORT={{kv_port}} \ - {% endif -%} -v /etc/localtime:/etc/localtime:ro \ -e CLUSTER={{ cluster }} \ -e CEPH_DAEMON=MGR \ diff --git a/roles/ceph-mon/tasks/ceph_keys.yml b/roles/ceph-mon/tasks/ceph_keys.yml index 186d385f6..30661b432 100644 --- a/roles/ceph-mon/tasks/ceph_keys.yml +++ b/roles/ceph-mon/tasks/ceph_keys.yml @@ -48,24 +48,6 @@ - cephx - ansible_version.major == 2 and ansible_version.minor < 4 -- name: test if initial mon keyring is in mon kv store - command: ceph --cluster {{ cluster }} config-key get initial_mon_keyring - changed_when: false - ignore_errors: true - check_mode: no - run_once: true - failed_when: false - register: is_initial_mon_keyring_in_kv - -- name: put initial mon keyring in mon kv store - command: ceph --cluster {{ cluster }} config-key put initial_mon_keyring {{ monitor_keyring.stdout }} - changed_when: false - check_mode: no - run_once: true - when: - - is_initial_mon_keyring_in_kv.rc != 0 - - cephx - - name: create ceph mgr keyring(s) when mon is not containerized ceph_key: name: "mgr.{{ hostvars[item]['ansible_hostname'] }}" diff --git a/roles/ceph-mon/tasks/docker/main.yml b/roles/ceph-mon/tasks/docker/main.yml index abe6323ed..28092966f 100644 --- a/roles/ceph-mon/tasks/docker/main.yml +++ b/roles/ceph-mon/tasks/docker/main.yml @@ -1,7 +1,6 @@ --- - name: include copy_configs.yml include_tasks: copy_configs.yml - when: not containerized_deployment_with_kv - name: include start_docker_monitor.yml include_tasks: start_docker_monitor.yml @@ -21,13 +20,10 @@ command: "{{ docker_exec_cmd }} ceph --admin-daemon /var/run/ceph/{{ cluster }}-mon.{{ monitor_name }}.asok add_bootstrap_peer_hint {{ _current_monitor_address }}" changed_when: false failed_when: false - when: - - not containerized_deployment_with_kv - name: include fetch_configs.yml include_tasks: fetch_configs.yml run_once: true - when: not containerized_deployment_with_kv - block: - name: create ceph mgr keyring(s) when mon is containerized @@ -39,7 +35,6 @@ - cephx - containerized_deployment - groups.get(mgr_group_name, []) | length > 0 - - not containerized_deployment_with_kv with_items: "{{ groups.get(mgr_group_name, []) }}" - name: fetch ceph mgr key(s) diff --git a/roles/ceph-mon/tasks/docker/start_docker_monitor.yml b/roles/ceph-mon/tasks/docker/start_docker_monitor.yml index 3645d1057..9719ed1f1 100644 --- a/roles/ceph-mon/tasks/docker/start_docker_monitor.yml +++ b/roles/ceph-mon/tasks/docker/start_docker_monitor.yml @@ -1,45 +1,4 @@ --- -- name: populate kv_store with default ceph.conf - docker_container: - name: populate-kv-store - image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" - command: populate_kvstore - network: host - env: - KV_TYPE: "{{kv_type}}" - KV_IP: "{{kv_endpoint}}" - KV_PORT: "{{kv_port}}" - run_once: true - when: - - inventory_hostname == groups[mon_group_name][0] - - containerized_deployment_with_kv - - mon_containerized_default_ceph_conf_with_kv - -- name: populate kv_store with custom ceph.conf - docker_container: - name: populate-kv-store - image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" - command: populate_kvstore - network: host - env: - KV_TYPE: "{{kv_type}}" - KV_IP: "{{kv_endpoint}}" - KV_PORT: "{{kv_port}}" - volumes: - - /etc/ceph/"{{ cluster }}".conf:/etc/ceph/ceph.defaults - run_once: true - when: - - inventory_hostname == groups[mon_group_name][0] - - containerized_deployment_with_kv - - not mon_containerized_default_ceph_conf_with_kv - -- name: delete populate-kv-store docker - docker_container: - name: populate-kv-store - state: absent - image: "{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" - when: containerized_deployment_with_kv - - name: generate systemd unit file become: true template: diff --git a/roles/ceph-mon/templates/ceph-mon.service.j2 b/roles/ceph-mon/templates/ceph-mon.service.j2 index ddd4203a6..92e4e55cc 100644 --- a/roles/ceph-mon/templates/ceph-mon.service.j2 +++ b/roles/ceph-mon/templates/ceph-mon.service.j2 @@ -13,15 +13,9 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \ {% else -%} --cpu-quota={{ ceph_mon_docker_cpu_limit * 100000 }} \ {% endif -%} -{% if not containerized_deployment_with_kv -%} -v /var/lib/ceph:/var/lib/ceph:z \ -v /etc/ceph:/etc/ceph:z \ -v /var/run/ceph:/var/run/ceph:z \ -{% else -%} - -e KV_TYPE={{kv_type}} \ - -e KV_IP={{kv_endpoint}}\ - -e KV_PORT={{kv_port}} \ -{% endif -%} -v /etc/localtime:/etc/localtime:ro \ {% if mon_docker_privileged -%} --privileged \ diff --git a/roles/ceph-nfs/templates/ceph-nfs.service.j2 b/roles/ceph-nfs/templates/ceph-nfs.service.j2 index b77ab4710..82cc61759 100644 --- a/roles/ceph-nfs/templates/ceph-nfs.service.j2 +++ b/roles/ceph-nfs/templates/ceph-nfs.service.j2 @@ -8,7 +8,6 @@ EnvironmentFile=-/etc/environment ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-nfs-%i ExecStartPre=/usr/bin/mkdir -p /etc/ceph /etc/ganesha /var/lib/nfs/ganesha ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \ - {% if not containerized_deployment_with_kv -%} -v /var/lib/ceph:/var/lib/ceph:z \ -v /etc/ceph:/etc/ceph:z \ -v /var/lib/nfs/ganesha:/var/lib/nfs/ganesha:z \ @@ -18,11 +17,6 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \ --privileged \ -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \ {% endif -%} - {% else -%} - -e KV_TYPE={{kv_type}} \ - -e KV_IP={{kv_endpoint}}\ - -e KV_PORT={{kv_port}} \ - {% endif -%} -v /etc/localtime:/etc/localtime:ro \ -e CLUSTER={{ cluster }} \ -e CEPH_DAEMON=NFS \ diff --git a/roles/ceph-osd/tasks/ceph_disk_cli_options_facts.yml b/roles/ceph-osd/tasks/ceph_disk_cli_options_facts.yml index d29a034eb..5c77a58bf 100644 --- a/roles/ceph-osd/tasks/ceph_disk_cli_options_facts.yml +++ b/roles/ceph-osd/tasks/ceph_disk_cli_options_facts.yml @@ -31,12 +31,6 @@ - dmcrypt - not containerized_deployment -- name: set_fact docker_env_args '-e KV_TYPE={{ kv_type }} -e KV_IP={{ kv_endpoint }} -e KV_PORT={{ kv_port }}' - set_fact: - docker_env_args: -e KV_TYPE={{ kv_type }} -e KV_IP={{ kv_endpoint }} -e KV_PORT={{ kv_port }} - when: - - containerized_deployment_with_kv - - name: set_fact docker_env_args '-e OSD_BLUESTORE=0 -e OSD_FILESTORE=1 -e OSD_DMCRYPT=0' set_fact: docker_env_args: -e OSD_BLUESTORE=0 -e OSD_FILESTORE=1 -e OSD_DMCRYPT=0 diff --git a/roles/ceph-osd/templates/ceph-osd-run.sh.j2 b/roles/ceph-osd/templates/ceph-osd-run.sh.j2 index e123f3805..9f3f6ac46 100644 --- a/roles/ceph-osd/templates/ceph-osd-run.sh.j2 +++ b/roles/ceph-osd/templates/ceph-osd-run.sh.j2 @@ -87,11 +87,6 @@ expose_partitions "$1" {% if ansible_distribution == 'Ubuntu' -%} --security-opt apparmor:unconfined \ {% endif -%} - {% if containerized_deployment_with_kv -%} - -e KV_TYPE={{ kv_type }} \ - -e KV_IP={{ kv_endpoint }} \ - -e KV_PORT={{ kv_port }} \ - {% endif -%} {% if osd_objectstore == 'filestore' and not dmcrypt -%} -e OSD_FILESTORE=1 \ -e OSD_DMCRYPT=0 \ diff --git a/roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2 b/roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2 index a5d3af767..a25633c0a 100644 --- a/roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2 +++ b/roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2 @@ -13,15 +13,9 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \ {% else -%} --cpu-quota={{ ceph_rbd_mirror_docker_cpu_limit * 100000 }} \ {% endif -%} - {% if not containerized_deployment_with_kv -%} -v /var/lib/ceph:/var/lib/ceph:z \ -v /etc/ceph:/etc/ceph:z \ -v /var/run/ceph:/var/run/ceph:z \ - {% else -%} - -e KV_TYPE={{kv_type}} \ - -e KV_IP={{kv_endpoint}} \ - -e KV_PORT={{kv_port}} \ - {% endif -%} -v /etc/localtime:/etc/localtime:ro \ -e CLUSTER={{ cluster }} \ -e CEPH_DAEMON=RBD_MIRROR \ diff --git a/roles/ceph-rgw/templates/ceph-radosgw.service.j2 b/roles/ceph-rgw/templates/ceph-radosgw.service.j2 index 89efcb730..0d7944c1e 100644 --- a/roles/ceph-rgw/templates/ceph-radosgw.service.j2 +++ b/roles/ceph-rgw/templates/ceph-radosgw.service.j2 @@ -13,15 +13,9 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \ {% else -%} --cpu-quota={{ ceph_rgw_docker_cpu_limit * 100000 }} \ {% endif -%} - {% if not containerized_deployment_with_kv -%} -v /var/lib/ceph:/var/lib/ceph:z \ -v /etc/ceph:/etc/ceph:z \ -v /var/run/ceph:/var/run/ceph:z \ - {% else -%} - -e KV_TYPE={{ kv_type }} \ - -e KV_IP={{ kv_endpoint }} \ - -e KV_PORT={{ kv_port }} \ - {% endif -%} -v /etc/localtime:/etc/localtime:ro \ -e CEPH_DAEMON=RGW \ -e CLUSTER={{ cluster }} \