From eb0c83db5f723dcc708a9bc23cf0d7f7be571449 Mon Sep 17 00:00:00 2001 From: Gregory Meno Date: Thu, 20 Apr 2017 16:47:06 -0700 Subject: [PATCH] remove osd directory scenario Proof-of-concept clusters or actual production clusters will never want to use this. We also do not test it anywhere for this same reason. Signed-off-by: Gregory Meno --- group_vars/osds.yml.sample | 10 ------ roles/ceph-osd/README.md | 2 -- roles/ceph-osd/defaults/main.yml | 10 ------ roles/ceph-osd/tasks/check_devices.yml | 2 -- roles/ceph-osd/tasks/check_mandatory_vars.yml | 15 --------- roles/ceph-osd/tasks/main.yml | 7 ---- roles/ceph-osd/tasks/osd_fragment.yml | 13 +------- .../tasks/scenarios/osd_directory.yml | 33 ------------------- 8 files changed, 1 insertion(+), 91 deletions(-) delete mode 100644 roles/ceph-osd/tasks/scenarios/osd_directory.yml diff --git a/group_vars/osds.yml.sample b/group_vars/osds.yml.sample index 911103e1e..41f036775 100644 --- a/group_vars/osds.yml.sample +++ b/group_vars/osds.yml.sample @@ -142,16 +142,6 @@ dummy: #raw_journal_devices: [] -# III. Use directory instead of disk for OSDs -# Use 'true' to enable this scenario - -#osd_directory: false -#osd_directories: -# - /var/lib/ceph/osd/mydir1 -# - /var/lib/ceph/osd/mydir2 -#osd_directories: [] - - # IV. This will partition disks for BlueStore # Use 'true' to enable this scenario #bluestore: false diff --git a/roles/ceph-osd/README.md b/roles/ceph-osd/README.md index ae7ae6660..5d466bef8 100644 --- a/roles/ceph-osd/README.md +++ b/roles/ceph-osd/README.md @@ -17,13 +17,11 @@ Choose between the following scenario to configure your OSDs, **choose only one* * `journal_collocation` * `raw_multi_journal` -* `osd_directory` Then: * `devices` * `raw_journal_devices` (**only if** you activated `raw_multi_journal`) -* `osd_directories` (**only if** you activated `osd_directory`) # Dependencies diff --git a/roles/ceph-osd/defaults/main.yml b/roles/ceph-osd/defaults/main.yml index 6c55d9696..38cf3db63 100644 --- a/roles/ceph-osd/defaults/main.yml +++ b/roles/ceph-osd/defaults/main.yml @@ -134,16 +134,6 @@ raw_multi_journal: false raw_journal_devices: [] -# III. Use directory instead of disk for OSDs -# Use 'true' to enable this scenario - -osd_directory: false -#osd_directories: -# - /var/lib/ceph/osd/mydir1 -# - /var/lib/ceph/osd/mydir2 -osd_directories: [] - - # IV. This will partition disks for BlueStore # Use 'true' to enable this scenario bluestore: false diff --git a/roles/ceph-osd/tasks/check_devices.yml b/roles/ceph-osd/tasks/check_devices.yml index 127a9c5fd..bd43bf200 100644 --- a/roles/ceph-osd/tasks/check_devices.yml +++ b/roles/ceph-osd/tasks/check_devices.yml @@ -13,14 +13,12 @@ - include: ./check_devices_static.yml when: - not osd_auto_discovery - - not osd_directory # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent) static: False - include: ./check_devices_auto.yml when: - osd_auto_discovery - - not osd_directory # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent) static: False diff --git a/roles/ceph-osd/tasks/check_mandatory_vars.yml b/roles/ceph-osd/tasks/check_mandatory_vars.yml index 46b776478..5492c0f88 100644 --- a/roles/ceph-osd/tasks/check_mandatory_vars.yml +++ b/roles/ceph-osd/tasks/check_mandatory_vars.yml @@ -28,7 +28,6 @@ - not osd_containerized_deployment - not journal_collocation - not raw_multi_journal - - not osd_directory - not bluestore - not dmcrypt_journal_collocation - not dmcrypt_dedicated_journal @@ -41,18 +40,13 @@ - osd_group_name in group_names - not osd_containerized_deployment - (journal_collocation and raw_multi_journal) - or (journal_collocation and osd_directory) or (journal_collocation and bluestore) - or (raw_multi_journal and osd_directory) or (raw_multi_journal and bluestore) - or (osd_directory and bluestore) or (dmcrypt_journal_collocation and journal_collocation) or (dmcrypt_journal_collocation and raw_multi_journal) - or (dmcrypt_journal_collocation and osd_directory) or (dmcrypt_journal_collocation and bluestore) or (dmcrypt_dedicated_journal and journal_collocation) or (dmcrypt_dedicated_journal and raw_multi_journal) - or (dmcrypt_dedicated_journal and osd_directory) or (dmcrypt_dedicated_journal and bluestore) or (dmcrypt_dedicated_journal and dmcrypt_journal_collocation) @@ -77,12 +71,3 @@ - raw_journal_devices|length == 0 or devices|length == 0 -- name: verify directories have been provided - fail: - msg: "please provide directories to your osd scenario" - when: - - osd_group_name is defined - - osd_group_name in group_names - - not osd_containerized_deployment - - osd_directory - - osd_directories is not defined diff --git a/roles/ceph-osd/tasks/main.yml b/roles/ceph-osd/tasks/main.yml index d4f320961..963716a6c 100644 --- a/roles/ceph-osd/tasks/main.yml +++ b/roles/ceph-osd/tasks/main.yml @@ -20,13 +20,6 @@ # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent) static: False -- include: ./scenarios/osd_directory.yml - when: - - osd_directory - - not osd_containerized_deployment - # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent) - static: False - - include: ./scenarios/bluestore.yml when: - osd_objectstore == 'bluestore' diff --git a/roles/ceph-osd/tasks/osd_fragment.yml b/roles/ceph-osd/tasks/osd_fragment.yml index 5cd01fae4..324ad1b4e 100644 --- a/roles/ceph-osd/tasks/osd_fragment.yml +++ b/roles/ceph-osd/tasks/osd_fragment.yml @@ -6,7 +6,6 @@ failed_when: false always_run: true register: osd_path - when: not osd_directory - name: get osd id command: cat {{ item.stdout }}/whoami @@ -15,22 +14,12 @@ failed_when: false always_run: true register: osd_id_non_dir_scenario - when: not osd_directory - -- name: get osd id for directory scenario - command: cat {{ item.stdout }}/whoami - with_items: "{{ osd_directories }}" - changed_when: false - failed_when: false - always_run: true - register: osd_id_dir_scenario - when: osd_directory # NOTE (leseb): we must do this because of # https://github.com/ansible/ansible/issues/4297 - name: combine osd_path results set_fact: - combined_osd_id: "{{ osd_id_non_dir_scenario if not osd_directory else osd_id_dir_scenario }}" + combined_osd_id: "{{ osd_id_non_dir_scenario }}" - name: create a ceph fragment and assemble directory file: diff --git a/roles/ceph-osd/tasks/scenarios/osd_directory.yml b/roles/ceph-osd/tasks/scenarios/osd_directory.yml deleted file mode 100644 index 6778e54c3..000000000 --- a/roles/ceph-osd/tasks/scenarios/osd_directory.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -## SCENARIO 4: USE A DIRECTORY INSTEAD OF A DISK FOR OSD - -# NOTE (leseb): we do not check the filesystem underneath the directory -# so it is really up to you to configure this properly. -# Declaring more than one directory on the same filesystem will confuse Ceph. -- name: create osd directories - file: - path: "{{ item }}" - state: directory - owner: "ceph" - group: "ceph" - with_items: "{{ osd_directories }}" - -# NOTE (leseb): the prepare process must be parallelized somehow... -# if you have 64 disks with 4TB each, this will take a while -# since Ansible will sequential process the loop -- name: prepare osd directory disk(s) - command: "ceph-disk prepare --cluster {{ cluster }} {{ item }}" - with_items: "{{ osd_directories }}" - changed_when: false - when: osd_directory - -- name: activate osd(s) - command: "ceph-disk activate {{ item }}" - with_items: "{{ osd_directories }}" - changed_when: false - -- name: start and add osd target(s) to the systemd sequence - service: - name: ceph.target - state: started - enabled: yes -- 2.39.5