From 4dd993ebae302733fc58b67453da7024dba6d5ff Mon Sep 17 00:00:00 2001 From: crcceph Date: Tue, 15 Dec 2015 23:19:07 -0800 Subject: [PATCH 1/4] changed permissions under ceph user when running under the user ceph the rbd client directory should be owned by ceph --- roles/ceph-common/tasks/main.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/roles/ceph-common/tasks/main.yml b/roles/ceph-common/tasks/main.yml index 6b6b4dfea..ff7046593 100644 --- a/roles/ceph-common/tasks/main.yml +++ b/roles/ceph-common/tasks/main.yml @@ -100,13 +100,23 @@ - restart ceph rgws on red hat - restart ceph rgws with systemd -- name: create rbd client directory +- name: create rbd client directory (before infernalis) file: path: "{{ rbd_client_admin_socket_path }}" state: directory owner: root group: root mode: 0644 + when: not is_ceph_infernalis + +- name: create rbd client directory (for infernalis or after) + file: + path: "{{ rbd_client_admin_socket_path }}" + state: directory + owner: ceph + group: ceph + mode: 0770 + when: is_ceph_infernalis # NOTE (leseb): be careful with the following # somehow the YAML syntax using "is_ceph_infernalis: {{" From 6d91bdaf36bed1f7cb86dbb9abbe8775f88779b3 Mon Sep 17 00:00:00 2001 From: crcceph Date: Tue, 15 Dec 2015 23:23:37 -0800 Subject: [PATCH 2/4] added python-setuptools as dependency CentOS7 needs python-setuptools for /usr/bin/ceph-init-detect to work correctly --- roles/ceph-common/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index ec25057b5..405abdaf2 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -30,6 +30,7 @@ redhat_package_dependencies: - yum-plugin-priorities.noarch - epel-release - ntp + - python-setuptools ## Configure package origin # From 923cd6fc2c481a92a1e9ea4fc9125e8f65e53c29 Mon Sep 17 00:00:00 2001 From: crcceph Date: Wed, 16 Dec 2015 09:01:36 -0800 Subject: [PATCH 3/4] move set_fact above test moved the set_fact above where it is being tested --- roles/ceph-common/tasks/main.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/roles/ceph-common/tasks/main.yml b/roles/ceph-common/tasks/main.yml index ff7046593..30ecba5a2 100644 --- a/roles/ceph-common/tasks/main.yml +++ b/roles/ceph-common/tasks/main.yml @@ -100,6 +100,12 @@ - restart ceph rgws on red hat - restart ceph rgws with systemd +# NOTE (leseb): be careful with the following +# somehow the YAML syntax using "is_ceph_infernalis: {{" +# does NOT work, so we keep this syntax styling... +- set_fact: + is_ceph_infernalis={{ (ceph_stable and ceph_stable_release not in ceph_stable_releases) or (ceph_stable_rh_storage and (rh_storage_version.stdout | version_compare('0.94', '>'))) }} + - name: create rbd client directory (before infernalis) file: path: "{{ rbd_client_admin_socket_path }}" @@ -118,8 +124,3 @@ mode: 0770 when: is_ceph_infernalis -# NOTE (leseb): be careful with the following -# somehow the YAML syntax using "is_ceph_infernalis: {{" -# does NOT work, so we keep this syntax styling... -- set_fact: - is_ceph_infernalis={{ (ceph_stable and ceph_stable_release not in ceph_stable_releases) or (ceph_stable_rh_storage and (rh_storage_version.stdout | version_compare('0.94', '>'))) }} From d89ddb1cee998e4098374a73e26864d844f0c952 Mon Sep 17 00:00:00 2001 From: crcceph Date: Wed, 16 Dec 2015 11:01:39 -0800 Subject: [PATCH 4/4] moved set_fact higher in file moved set_fact for is_ceph_infernalis near top of file so that it can be used in other tests --- roles/ceph-common/tasks/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/ceph-common/tasks/main.yml b/roles/ceph-common/tasks/main.yml index 30ecba5a2..46752906c 100644 --- a/roles/ceph-common/tasks/main.yml +++ b/roles/ceph-common/tasks/main.yml @@ -37,6 +37,12 @@ radosgw_frontend == 'apache' and rgw_group_name in group_names +# NOTE (leseb): be careful with the following +# somehow the YAML syntax using "is_ceph_infernalis: {{" +# does NOT work, so we keep this syntax styling... +- set_fact: + is_ceph_infernalis={{ (ceph_stable and ceph_stable_release not in ceph_stable_releases) or (ceph_stable_rh_storage and (rh_storage_version.stdout | version_compare('0.94', '>'))) }} + - name: check for a ceph socket shell: "stat /var/run/ceph/*.asok > /dev/null 2>&1" changed_when: false @@ -100,12 +106,6 @@ - restart ceph rgws on red hat - restart ceph rgws with systemd -# NOTE (leseb): be careful with the following -# somehow the YAML syntax using "is_ceph_infernalis: {{" -# does NOT work, so we keep this syntax styling... -- set_fact: - is_ceph_infernalis={{ (ceph_stable and ceph_stable_release not in ceph_stable_releases) or (ceph_stable_rh_storage and (rh_storage_version.stdout | version_compare('0.94', '>'))) }} - - name: create rbd client directory (before infernalis) file: path: "{{ rbd_client_admin_socket_path }}"