From: jtudelag Date: Thu, 31 May 2018 15:01:44 +0000 (+0200) Subject: rgws: renames create_pools variable with rgw_create_pools. X-Git-Tag: v3.0.37~18 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6072838421006da9c73a9fbb037c3411997f67bb;p=ceph-ansible.git rgws: renames create_pools variable with rgw_create_pools. Renamed to be consistent with the role (rgw) and have a meaningful name. Signed-off-by: Jorge Tudela (cherry picked from commit 600e1e2c2680e8102f4ef17855d4bcd89d6ef733) Signed-off-by: Sébastien Han --- diff --git a/group_vars/rgws.yml.sample b/group_vars/rgws.yml.sample index b756756e3..a983c5011 100644 --- a/group_vars/rgws.yml.sample +++ b/group_vars/rgws.yml.sample @@ -41,8 +41,8 @@ dummy: # This is important because they would be created with the default # of 8. # New pools and their corresponding pg_nums can be created -# by adding to the create_pools dictionary (see foo). -#create_pools: +# by adding to the rgw_create_pools dictionary (see foo). +#rgw_create_pools: # defaults.rgw.buckets.data: # pg_num: 16 # defaults.rgw.buckets.index: diff --git a/roles/ceph-rgw/defaults/main.yml b/roles/ceph-rgw/defaults/main.yml index 75f9cc49f..617a49773 100644 --- a/roles/ceph-rgw/defaults/main.yml +++ b/roles/ceph-rgw/defaults/main.yml @@ -33,8 +33,8 @@ rgw_pull_proto: "http" # This is important because they would be created with the default # of 8. # New pools and their corresponding pg_nums can be created -# by adding to the create_pools dictionary (see foo). -#create_pools: +# by adding to the rgw_create_pools dictionary (see foo). +#rgw_create_pools: # defaults.rgw.buckets.data: # pg_num: 16 # defaults.rgw.buckets.index: diff --git a/roles/ceph-rgw/tasks/docker/main.yml b/roles/ceph-rgw/tasks/docker/main.yml index df26503b8..1496a42d4 100644 --- a/roles/ceph-rgw/tasks/docker/main.yml +++ b/roles/ceph-rgw/tasks/docker/main.yml @@ -13,4 +13,4 @@ - name: include rgw_pool_pgs.yml include: rgw_pool_pgs.yml when: - - create_pools is defined + - rgw_create_pools is defined diff --git a/roles/ceph-rgw/tasks/docker/rgw_pool_pgs.yml b/roles/ceph-rgw/tasks/docker/rgw_pool_pgs.yml index ba781bb76..d2e8feed0 100644 --- a/roles/ceph-rgw/tasks/docker/rgw_pool_pgs.yml +++ b/roles/ceph-rgw/tasks/docker/rgw_pool_pgs.yml @@ -1,10 +1,10 @@ --- # If admin key has been copied to the RGWs, we can run the command from them. -- name: create rgw pools if create_pools is defined +- name: create rgw pools if rgw_create_pools is defined command: "{{ docker_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool create {{ item.key }} {{ item.value.pg_num }}" changed_when: false run_once: true - with_dict: "{{ create_pools }}" + with_dict: "{{ rgw_create_pools }}" when: - copy_admin_key @@ -16,11 +16,11 @@ - not copy_admin_key # If no admin key has been copied to the RGWs, we have to run the command from the first monitor. -- name: create rgw pools if create_pools is defined, delegated to first monitor +- name: create rgw pools if rgw_create_pools is defined, delegated to first monitor command: "{{ docker_exec_mon_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool create {{ item.key }} {{ item.value.pg_num }}" changed_when: false run_once: true delegate_to: "{{ groups[mon_group_name][0] }}" - with_dict: "{{ create_pools }}" + with_dict: "{{ rgw_create_pools }}" when: - not copy_admin_key diff --git a/roles/ceph-rgw/tasks/main.yml b/roles/ceph-rgw/tasks/main.yml index dbbf7f72a..7eb05ac09 100644 --- a/roles/ceph-rgw/tasks/main.yml +++ b/roles/ceph-rgw/tasks/main.yml @@ -29,7 +29,7 @@ - name: include rgw_pool_pgs.yml include: rgw_pool_pgs.yml when: - - create_pools is defined + - rgw_create_pools is defined - not containerized_deployment static: False @@ -48,9 +48,3 @@ - containerized_deployment # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent) static: False - -- name: include rgw_pool_pgs.yml - include: rgw_pool_pgs.yml - when: - - create_pools is defined - static: False diff --git a/roles/ceph-rgw/tasks/rgw_pool_pgs.yml b/roles/ceph-rgw/tasks/rgw_pool_pgs.yml index 3675475b3..41074b67f 100644 --- a/roles/ceph-rgw/tasks/rgw_pool_pgs.yml +++ b/roles/ceph-rgw/tasks/rgw_pool_pgs.yml @@ -1,9 +1,9 @@ --- -- name: create rgw pools if create_pools is defined +- name: create rgw pools if rgw_create_pools is defined command: ceph --connect-timeout 5 --cluster {{ cluster }} osd pool create {{ item.key }} {{ item.value.pg_num }} changed_when: false run_once: true - with_dict: "{{ create_pools }}" + with_dict: "{{ rgw_create_pools }}" when: - not containerized_deployment @@ -14,11 +14,11 @@ when: - containerized_deployment -- name: create rgw pools if create_pools is defined +- name: create rgw pools if rgw_create_pools is defined command: "{{ docker_exec_rgw_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool create {{ item.key }} {{ item.value.pg_num }}" changed_when: false run_once: true - with_dict: "{{ create_pools }}" + with_dict: "{{ rgw_create_pools }}" delegate_to: "{{ groups[mon_group_name][0] }}" when: - containerized_deployment diff --git a/tests/functional/centos/7/bs-osds-container/group_vars/rgws.yml b/tests/functional/centos/7/bs-osds-container/group_vars/rgws.yml index 6aab772a0..a88254314 100644 --- a/tests/functional/centos/7/bs-osds-container/group_vars/rgws.yml +++ b/tests/functional/centos/7/bs-osds-container/group_vars/rgws.yml @@ -1,5 +1,5 @@ copy_admin_key: true -create_pools: +rgw_create_pools: foo: pg_num: 17 bar: diff --git a/tests/functional/centos/7/bs-osds-non-container/group_vars/rgws.yml b/tests/functional/centos/7/bs-osds-non-container/group_vars/rgws.yml index 6aab772a0..a88254314 100644 --- a/tests/functional/centos/7/bs-osds-non-container/group_vars/rgws.yml +++ b/tests/functional/centos/7/bs-osds-non-container/group_vars/rgws.yml @@ -1,5 +1,5 @@ copy_admin_key: true -create_pools: +rgw_create_pools: foo: pg_num: 17 bar: diff --git a/tests/functional/centos/7/cluster/group_vars/rgws b/tests/functional/centos/7/cluster/group_vars/rgws index 6aab772a0..a88254314 100644 --- a/tests/functional/centos/7/cluster/group_vars/rgws +++ b/tests/functional/centos/7/cluster/group_vars/rgws @@ -1,5 +1,5 @@ copy_admin_key: true -create_pools: +rgw_create_pools: foo: pg_num: 17 bar: diff --git a/tests/functional/centos/7/docker-collocation/group_vars/rgws b/tests/functional/centos/7/docker-collocation/group_vars/rgws index 75c89230f..53dd034b1 100644 --- a/tests/functional/centos/7/docker-collocation/group_vars/rgws +++ b/tests/functional/centos/7/docker-collocation/group_vars/rgws @@ -1,5 +1,5 @@ --- -create_pools: +rgw_create_pools: foo: pg_num: 17 bar: diff --git a/tests/functional/centos/7/docker/group_vars/rgws b/tests/functional/centos/7/docker/group_vars/rgws index 65f9b2311..8f2a9a368 100644 --- a/tests/functional/centos/7/docker/group_vars/rgws +++ b/tests/functional/centos/7/docker/group_vars/rgws @@ -1,6 +1,6 @@ --- copy_admin_key: True -create_pools: +rgw_create_pools: foo: pg_num: 17 bar: diff --git a/tests/functional/centos/7/fs-osds-container/group_vars/rgws.yml b/tests/functional/centos/7/fs-osds-container/group_vars/rgws.yml index 6aab772a0..a88254314 100644 --- a/tests/functional/centos/7/fs-osds-container/group_vars/rgws.yml +++ b/tests/functional/centos/7/fs-osds-container/group_vars/rgws.yml @@ -1,5 +1,5 @@ copy_admin_key: true -create_pools: +rgw_create_pools: foo: pg_num: 17 bar: diff --git a/tests/functional/centos/7/fs-osds-non-container/group_vars/rgws.yml b/tests/functional/centos/7/fs-osds-non-container/group_vars/rgws.yml index 6aab772a0..a88254314 100644 --- a/tests/functional/centos/7/fs-osds-non-container/group_vars/rgws.yml +++ b/tests/functional/centos/7/fs-osds-non-container/group_vars/rgws.yml @@ -1,5 +1,5 @@ copy_admin_key: true -create_pools: +rgw_create_pools: foo: pg_num: 17 bar: diff --git a/tests/functional/tests/rgw/test_rgw_tuning.py b/tests/functional/tests/rgw/test_rgw_tuning.py index 2b3d75c25..7ef561e91 100644 --- a/tests/functional/tests/rgw/test_rgw_tuning.py +++ b/tests/functional/tests/rgw/test_rgw_tuning.py @@ -21,7 +21,7 @@ class TestRGWs(object): def test_rgw_tuning_pools_are_set(self, node, host): cmd = "sudo ceph --cluster={} --connect-timeout 5 osd dump".format(node["cluster_name"]) output = host.check_output(cmd) - pools = node["vars"]["create_pools"] + pools = node["vars"]["rgw_create_pools"] for pool_name, pg_num in pools.items(): assert pool_name in output pg_num_str = "pg_num {pg_num}".format(pg_num=pg_num["pg_num"]) @@ -36,7 +36,7 @@ class TestRGWs(object): cluster=cluster ) output = host.check_output(cmd) - pools = node["vars"]["create_pools"] + pools = node["vars"]["rgw_create_pools"] for pool_name, pg_num in pools.items(): assert pool_name in output pg_num_str = "pg_num {pg_num}".format(pg_num=pg_num["pg_num"]) diff --git a/tests/functional/ubuntu/16.04/cluster/group_vars/rgws b/tests/functional/ubuntu/16.04/cluster/group_vars/rgws index 6aab772a0..a88254314 100644 --- a/tests/functional/ubuntu/16.04/cluster/group_vars/rgws +++ b/tests/functional/ubuntu/16.04/cluster/group_vars/rgws @@ -1,5 +1,5 @@ copy_admin_key: true -create_pools: +rgw_create_pools: foo: pg_num: 17 bar: