From 3b422604ea8a434ee4481458dac63721939108e7 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Sat, 11 Apr 2020 23:03:33 +0800 Subject: [PATCH 01/12] tty: true --- molecule/default/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 143e673..52c97a4 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -24,7 +24,7 @@ platforms: - "/sys/fs/cgroup:/sys/fs/cgroup:rw" entrypoint: init command: "bash -c 'sleep infinity'" - tty: True + tty: true env: container: docker lint: | From 976768d8160566c0da1b8bb4ccaebc76613280d3 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Sun, 12 Apr 2020 13:31:32 +0800 Subject: [PATCH 02/12] FROM ubuntu:20.04 --- molecule/default/Dockerfile.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2 index 94016e5..e6bafa0 100644 --- a/molecule/default/Dockerfile.j2 +++ b/molecule/default/Dockerfile.j2 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ubuntu:18.04 +FROM ubuntu:20.04 ENV LANG "en_US.utf8" ENV LC_ALL "en_US.utf8" From 5b2606ffad27030980ad13319e7ea4c43dcf6366 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Thu, 16 Apr 2020 10:57:04 +0800 Subject: [PATCH 03/12] https://github.com/lavabit/robox/pull/141 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 05e0149..82376d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,6 @@ env: jobs: allow_failures: - - env: MOLECULE_SCENARIO_NAME="ubuntu-20.04" - env: MOLECULE_SCENARIO_NAME="ubuntu-19.10" - env: MOLECULE_SCENARIO_NAME="centos-8" - env: MOLECULE_SCENARIO_NAME="centos-7" From ba3cbbcd34fa3115fea48b64a9940abf532b5204 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Thu, 16 Apr 2020 11:12:20 +0800 Subject: [PATCH 04/12] https://github.com/lavabit/robox/pull/141 --- molecule/ubuntu-20.04/molecule.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/ubuntu-20.04/molecule.yml b/molecule/ubuntu-20.04/molecule.yml index 2745bc3..3451d70 100644 --- a/molecule/ubuntu-20.04/molecule.yml +++ b/molecule/ubuntu-20.04/molecule.yml @@ -20,7 +20,7 @@ driver: name: libvirt platforms: - name: ${MOLECULE_INSTANCE_NAME}-1 - box: generic/ubuntu2004 + box: abi/ubuntu2004 cpu: 2 memory: 2048 interfaces: @@ -37,7 +37,7 @@ platforms: - ceph_mgr - ceph_osd - name: ${MOLECULE_INSTANCE_NAME}-2 - box: generic/ubuntu2004 + box: abi/ubuntu2004 cpu: 2 memory: 2048 interfaces: From 8bcb3bc413630f8f74a210e34780a287ecba34fe Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Fri, 17 Apr 2020 12:11:44 +0800 Subject: [PATCH 05/12] deb https://download.ceph.com/debian-nautilus buster main --- vars/ubuntu-19.10.yml | 3 ++- vars/ubuntu-20.04.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/vars/ubuntu-19.10.yml b/vars/ubuntu-19.10.yml index 19456ef..9d6a8ea 100644 --- a/vars/ubuntu-19.10.yml +++ b/vars/ubuntu-19.10.yml @@ -15,6 +15,7 @@ # limitations under the License. _apt: - "15.2": [] + "15.2": + - { state: "latest", name: "radosgw" } "14.2": - { state: "latest", name: "radosgw" } diff --git a/vars/ubuntu-20.04.yml b/vars/ubuntu-20.04.yml index 709e1bf..9d6a8ea 100644 --- a/vars/ubuntu-20.04.yml +++ b/vars/ubuntu-20.04.yml @@ -17,4 +17,5 @@ _apt: "15.2": - { state: "latest", name: "radosgw" } - "14.2": [] + "14.2": + - { state: "latest", name: "radosgw" } From 8af58f1a35dd04d4f01c565ec9de15fe5a8bcb29 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Fri, 17 Apr 2020 13:37:17 +0800 Subject: [PATCH 06/12] ceph_release: "15.2" --- defaults/main.yml | 2 +- vars/centos-8.yml | 3 +-- vars/redhat-8.yml | 3 +-- vars/ubuntu-20.04.yml | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 948065c..ba9eac0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -15,7 +15,7 @@ # limitations under the License. # Ceph version. -ceph_release: "14.2" +ceph_release: "15.2" # Ceph rgw configs. ceph_rgw_config: diff --git a/vars/centos-8.yml b/vars/centos-8.yml index eacd458..d8b0980 100644 --- a/vars/centos-8.yml +++ b/vars/centos-8.yml @@ -17,5 +17,4 @@ _yum: "15.2": - { state: "latest", name: "ceph-radosgw" } - "14.2": - - { state: "latest", name: "ceph-radosgw" } + "14.2": [] diff --git a/vars/redhat-8.yml b/vars/redhat-8.yml index eacd458..d8b0980 100644 --- a/vars/redhat-8.yml +++ b/vars/redhat-8.yml @@ -17,5 +17,4 @@ _yum: "15.2": - { state: "latest", name: "ceph-radosgw" } - "14.2": - - { state: "latest", name: "ceph-radosgw" } + "14.2": [] diff --git a/vars/ubuntu-20.04.yml b/vars/ubuntu-20.04.yml index 9d6a8ea..709e1bf 100644 --- a/vars/ubuntu-20.04.yml +++ b/vars/ubuntu-20.04.yml @@ -17,5 +17,4 @@ _apt: "15.2": - { state: "latest", name: "radosgw" } - "14.2": - - { state: "latest", name: "radosgw" } + "14.2": [] From b6ed9dd721ca8e74e56a3da1f8cc9c30351b6260 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Fri, 17 Apr 2020 21:05:55 +0800 Subject: [PATCH 07/12] name: ceph_rgw | systemctl restart ceph-radosgw.target --- handlers/main.yml | 2 +- tasks/debian.yml | 2 +- tasks/main.yml | 10 +++++----- tasks/redhat.yml | 2 +- tasks/suse.yml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 4f6766c..63791ad 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -20,7 +20,7 @@ changed_when: false ignore_errors: true -- name: ceph_rgw | systemctl restart +- name: ceph_rgw | systemctl restart ceph-radosgw.target service: name: "ceph-radosgw.target" state: "restarted" diff --git a/tasks/debian.yml b/tasks/debian.yml index 720146e..13f5862 100644 --- a/tasks/debian.yml +++ b/tasks/debian.yml @@ -23,5 +23,5 @@ register: result until: result is succeeded notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw diff --git a/tasks/main.yml b/tasks/main.yml index 5d6aed4..271d84e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -82,7 +82,7 @@ state: "{{ item.state | default('present') }}" loop: "{{ ceph_rgw_config }}" notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw - name: prepare files @@ -95,7 +95,7 @@ loop: - { dest: "/etc/ceph/ceph.conf", owner: "ceph", group: "ceph" } notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw - name: create manager keyring @@ -114,7 +114,7 @@ register: result changed_when: result is not succeeded notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw - name: copy templates @@ -128,7 +128,7 @@ - { dest: "/lib/systemd/system/ceph-radosgw@.service" } notify: - ceph_rgw | systemctl daemon-reload - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw - name: prepare files @@ -142,7 +142,7 @@ - { dest: "/lib/systemd/system/ceph-radosgw@.service" } - { dest: "/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring", owner: "ceph", group: "ceph", mode: "0600" } notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw - name: flush handlers diff --git a/tasks/redhat.yml b/tasks/redhat.yml index 3b9ffd3..c115d77 100644 --- a/tasks/redhat.yml +++ b/tasks/redhat.yml @@ -22,5 +22,5 @@ register: result until: result is succeeded notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw diff --git a/tasks/suse.yml b/tasks/suse.yml index f91f1f0..4e4729b 100644 --- a/tasks/suse.yml +++ b/tasks/suse.yml @@ -24,5 +24,5 @@ register: result until: result is succeeded notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw From 57f9b68f8d2e03b4e13d5917ca2e7857acde482b Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Sat, 18 Apr 2020 12:46:15 +0800 Subject: [PATCH 08/12] fix repo --- vars/centos-8.yml | 3 ++- vars/redhat-8.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/vars/centos-8.yml b/vars/centos-8.yml index d8b0980..eacd458 100644 --- a/vars/centos-8.yml +++ b/vars/centos-8.yml @@ -17,4 +17,5 @@ _yum: "15.2": - { state: "latest", name: "ceph-radosgw" } - "14.2": [] + "14.2": + - { state: "latest", name: "ceph-radosgw" } diff --git a/vars/redhat-8.yml b/vars/redhat-8.yml index d8b0980..eacd458 100644 --- a/vars/redhat-8.yml +++ b/vars/redhat-8.yml @@ -17,4 +17,5 @@ _yum: "15.2": - { state: "latest", name: "ceph-radosgw" } - "14.2": [] + "14.2": + - { state: "latest", name: "ceph-radosgw" } From 287cafb72632f4b88e9c006a21d7cab84c189f07 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Sat, 18 Apr 2020 15:36:46 +0800 Subject: [PATCH 09/12] systemctl enable ceph-radosgw.target --- tasks/main.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 271d84e..00f6a92 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -151,12 +151,9 @@ - name: start services service: - name: "{{ item.name }}" + name: "ceph-radosgw.target" state: "started" enabled: true - loop: - - { name: "ceph-radosgw.target" } - - { name: "ceph-radosgw@rgw.{{ ansible_hostname }}" } changed_when: false ignore_errors: true tags: ceph_rgw From df359a1a5967e1a386ffec0a915e1f6ebc63ed00 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Sat, 18 Apr 2020 17:03:29 +0800 Subject: [PATCH 10/12] systemctl start ceph-radosgw@rgw.{{ ansible_hostname }} --- tasks/main.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 00f6a92..e8c0bfb 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -149,7 +149,16 @@ meta: flush_handlers tags: ceph_rgw -- name: start services +- name: "systemctl start ceph-radosgw@rgw.{{ ansible_hostname }}" + service: + name: "ceph-radosgw@rgw.{{ ansible_hostname }}" + state: "started" + enabled: true + changed_when: false + ignore_errors: true + tags: ceph_rgw + +- name: systemctl start ceph-radosgw.target service: name: "ceph-radosgw.target" state: "started" From ab132a63166b7262acde159f6cfb5176ac7102e9 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Sat, 18 Apr 2020 19:22:31 +0800 Subject: [PATCH 11/12] https://docs.ceph.com/docs/master/rados/operations/placement-groups/#autoscaling-placement-groups --- molecule/default/verify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml index bed2384..ce68a4a 100644 --- a/molecule/default/verify.yml +++ b/molecule/default/verify.yml @@ -58,7 +58,7 @@ - name: ceph osd pool create rbd shell: | set -o pipefail - ceph osd pool create rbd 8 8 + ceph osd pool create rbd ceph osd pool set rbd size 1 ceph osd pool set rbd min_size 1 ceph osd pool application enable rbd rbd @@ -80,7 +80,7 @@ - name: ceph osd pool create cephfs_metadata shell: | set -o pipefail - ceph osd pool create cephfs_metadata 32 32 + ceph osd pool create cephfs_metadata ceph osd pool set cephfs_metadata size 1 ceph osd pool set cephfs_metadata min_size 1 args: @@ -92,7 +92,7 @@ - name: ceph osd pool create cephfs_data shell: | set -o pipefail - ceph osd pool create cephfs_data 128 128 + ceph osd pool create cephfs_data ceph osd pool set cephfs_data size 1 ceph osd pool set cephfs_data min_size 1 args: From f7429dd6a9aebdc078d6c761da6606c791d02303 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Mon, 20 Apr 2020 12:20:34 +0800 Subject: [PATCH 12/12] reorder flush handlers --- tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index e8c0bfb..4719003 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -145,10 +145,6 @@ - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw -- name: flush handlers - meta: flush_handlers - tags: ceph_rgw - - name: "systemctl start ceph-radosgw@rgw.{{ ansible_hostname }}" service: name: "ceph-radosgw@rgw.{{ ansible_hostname }}" @@ -166,3 +162,7 @@ changed_when: false ignore_errors: true tags: ceph_rgw + +- name: flush handlers + meta: flush_handlers + tags: ceph_rgw