]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Prevent failure from race creating fetch directory 391/head
authorgit-harry <git-harry@live.co.uk>
Wed, 26 Aug 2015 09:49:22 +0000 (10:49 +0100)
committergit-harry <git-harry@live.co.uk>
Wed, 26 Aug 2015 09:49:22 +0000 (10:49 +0100)
When multiple monitor hosts attempt to create the fetch directory there
is the potential for the task to fail with:

  "OSError: [Errno 17] File exists: 'fetch'"

This appear to be an issue with the file module trying to create the
same directory at the same time when the tasks has been delegated to a
single host.

This commit enables run_once on the affected task which should address
the issue.

roles/ceph-common/tasks/main.yml

index 3d46fa3378f1fd73567df00ad38ee55373f432c6..a3a85fb72ab56bcd59b5dbc06131f6e337949670 100644 (file)
@@ -53,6 +53,7 @@
   local_action: file path=fetch state=directory
   changed_when: false
   sudo: false
+  run_once: true
 
 - name: generate cluster uuid
   local_action: shell uuidgen | tee fetch/ceph_cluster_uuid.conf