]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Fixes rgw and mon startup on red hat 300/head
authorleseb <seb@redhat.com>
Tue, 30 Jun 2015 16:43:43 +0000 (18:43 +0200)
committerleseb <seb@redhat.com>
Tue, 30 Jun 2015 17:19:08 +0000 (19:19 +0200)
closes: #297, #264, #265 and #301

Signed-off-by: leseb <seb@redhat.com>
roles/ceph-mon/tasks/start_monitor.yml
roles/ceph-radosgw/tasks/start_radosgw.yml

index 52ee896d22edeab7bed16e30fc9a5c2fc4d1dc85..7c78680e6214749e95c560c1ee108cde0f55f738 100644 (file)
   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
     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
index f56dca901b5601efb74a45a28393cb620af64798..df39dbdf80a1e806ce54d31e6e21bec59058c2f7 100644 (file)
@@ -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
     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'