mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #1641 from fullerdj/wip-djf-key-timeout
mon/ceph_keys: Add timeout flag to ceph-create-keyspull/1962/head v3.0.0rc12
commit
0010979412
|
@ -1,18 +1,42 @@
|
||||||
---
|
---
|
||||||
- name: collect admin and bootstrap keys
|
- name: collect admin and bootstrap keys
|
||||||
command: ceph-create-keys --cluster {{ cluster }} -i {{ monitor_name }}
|
command: ceph-create-keys --cluster {{ cluster }} -i {{ monitor_name }} -t 30
|
||||||
failed_when: false
|
args:
|
||||||
|
creates: /etc/ceph/{{ cluster }}.client.admin.keyring
|
||||||
changed_when: false
|
changed_when: false
|
||||||
always_run: true
|
always_run: true
|
||||||
when:
|
when:
|
||||||
- cephx
|
- cephx
|
||||||
|
- ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous
|
||||||
|
|
||||||
|
- name: collect admin and bootstrap keys
|
||||||
|
command: ceph-create-keys --cluster {{ cluster }} -i {{ monitor_name }}
|
||||||
|
changed_when: false
|
||||||
|
always_run: true
|
||||||
|
when:
|
||||||
|
- cephx
|
||||||
|
- ceph_release_num.{{ ceph_release }} < ceph_release_num.luminous
|
||||||
|
|
||||||
# NOTE (leseb): wait for mon discovery and quorum resolution
|
# NOTE (leseb): wait for mon discovery and quorum resolution
|
||||||
# the admin key is not instantaneously created so we have to wait a bit
|
# the admin key is not instantaneously created so we have to wait a bit
|
||||||
|
# msg: is only supported as of Ansible 2.4.
|
||||||
- name: "wait for {{ cluster }}.client.admin.keyring exists"
|
- name: "wait for {{ cluster }}.client.admin.keyring exists"
|
||||||
wait_for:
|
wait_for:
|
||||||
path: /etc/ceph/{{ cluster }}.client.admin.keyring
|
path: /etc/ceph/{{ cluster }}.client.admin.keyring
|
||||||
when: cephx
|
timeout: 30
|
||||||
|
msg: "Timed out while waiting for keyring creation. Check network settings on mon nodes."
|
||||||
|
when:
|
||||||
|
- cephx
|
||||||
|
- (ansible_version.major == 2 and ansible_version.minor >= 4) or
|
||||||
|
ansible_version.major > 2
|
||||||
|
|
||||||
|
- name: "wait for {{ cluster }}.client.admin.keyring exists"
|
||||||
|
wait_for:
|
||||||
|
path: /etc/ceph/{{ cluster }}.client.admin.keyring
|
||||||
|
timeout: 30
|
||||||
|
when:
|
||||||
|
- cephx
|
||||||
|
- ansible_version.major == 2 and ansible_version.minor < 4
|
||||||
|
|
||||||
- name: test if initial mon keyring is in mon kv store
|
- name: test if initial mon keyring is in mon kv store
|
||||||
command: ceph --cluster {{ cluster }} config-key get initial_mon_keyring
|
command: ceph --cluster {{ cluster }} config-key get initial_mon_keyring
|
||||||
|
|
Loading…
Reference in New Issue