From: leseb Date: Tue, 30 Jun 2015 16:43:43 +0000 (+0200) Subject: Fixes rgw and mon startup on red hat X-Git-Tag: v1.0.0~191^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F300%2Fhead;p=ceph-ansible.git Fixes rgw and mon startup on red hat closes: #297, #264, #265 and #301 Signed-off-by: leseb --- diff --git a/roles/ceph-mon/tasks/start_monitor.yml b/roles/ceph-mon/tasks/start_monitor.yml index 52ee896d2..7c78680e6 100644 --- a/roles/ceph-mon/tasks/start_monitor.yml +++ b/roles/ceph-mon/tasks/start_monitor.yml @@ -12,18 +12,6 @@ when: ansible_distribution == "Ubuntu" changed_when: false -- name: activate monitor with sysvinit - file: > - path=/var/lib/ceph/mon/ceph-{{ ansible_hostname }}/{{ item }} - state=touch - owner=root - group=root - mode=0600 - with_items: - - done - - sysvinit - when: ansible_distribution != "Ubuntu" - - name: start and add that the monitor service to the init sequence (Ubuntu) service: > name=ceph-mon @@ -32,14 +20,18 @@ args="id={{ ansible_hostname }}" when: ansible_distribution == "Ubuntu" +# NOTE (leseb): somehow the service ansible module is messing things up +# as a safety measure we run the raw command - name: start and add that the monitor service to the init sequence - service: > - name=ceph - state=started - enabled=yes - args=mon + command: service ceph start mon when: ansible_distribution != "Ubuntu" +- name: collect admin and bootstrap keys + command: ceph-create-keys --id {{ ansible_hostname }} + changed_when: false + failed_when: false + when: ansible_os_family == 'RedHat' + - name: get Ceph monitor version shell: ceph daemon mon."{{ ansible_hostname }}" version | cut -d '"' -f 4 | cut -f 1,2 -d '.' changed_when: false diff --git a/roles/ceph-radosgw/tasks/start_radosgw.yml b/roles/ceph-radosgw/tasks/start_radosgw.yml index f56dca901..df39dbdf8 100644 --- a/roles/ceph-radosgw/tasks/start_radosgw.yml +++ b/roles/ceph-radosgw/tasks/start_radosgw.yml @@ -1,10 +1,8 @@ --- -# NOTE (leseb): if we don't perform this check Ansible will start multiple instance of radosgw - name: check if RGW is started command: /etc/init.d/radosgw status - changed_when: false - ignore_errors: true register: rgwstatus + ignore_errors: true - name: start RGW command: /etc/init.d/radosgw start @@ -14,13 +12,9 @@ ansible_os_family != 'RedHat' - name: start RGW - service: > - name=radosgw-all - state=started + service: name=radosgw-all state=started when: ansible_distribution == "Ubuntu" - name: start RGW - service: > - name=ceph-radosgw - state=started + service: name=ceph-radosgw state=started when: ansible_os_family == 'RedHat'