Skip to content

Commit

Permalink
Failhard on any failed replacement operation
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Schmid <[email protected]>
(cherry picked from commit fbe85ff)
Signed-off-by: Alexander Graul <[email protected]>
  • Loading branch information
Joshua Schmid authored and agraul committed Aug 27, 2018
1 parent a69c6f6 commit 68652da
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
10 changes: 8 additions & 2 deletions srv/salt/ceph/functests/1node/replace/delay.sls
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,34 @@ Update Destroyed:
Disengage {{ label }}:
salt.runner:
- name: disengage.safety
- failhard: True

keyword arguments:
salt.runner:
- name: replace.osd
- arg:
- 0
- delay: 1
- timeout: 1
- kwarg:
delay: 1
timeout: 1
- failhard: True

Check OSDs {{ label }}:
salt.state:
- tgt: {{ salt['pillar.get']('master_minion') }}
- sls: ceph.tests.replace.check_0
- failhard: True

Restore OSDs {{ label }}:
salt.state:
- tgt: I@roles:storage
- sls: ceph.tests.replace.restore_osds
- tgt_type: compound
- failhard: True

Wait for Ceph {{ label }}:
salt.state:
- tgt: {{ salt['pillar.get']('master_minion') }}
- sls: ceph.wait.until.OK
- failhard: True

8 changes: 7 additions & 1 deletion srv/salt/ceph/functests/1node/replace/force.sls
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,33 @@ Update Destroyed {{ label }}:
Disengage {{ label }}:
salt.runner:
- name: disengage.safety
- failhard: True

forced removal:
salt.runner:
- name: replace.osd
- arg:
- 0
- force: True
- kwarg:
force: True
- failhard: True

Check OSDs {{ label }}:
salt.state:
- tgt: {{ salt['pillar.get']('master_minion') }}
- sls: ceph.tests.replace.check_0
- failhard: True

Restore OSDs {{ label }}:
salt.state:
- tgt: I@roles:storage
- sls: ceph.tests.replace.restore_osds
- tgt_type: compound
- failhard: True

Wait for Ceph {{ label }}:
salt.state:
- tgt: {{ salt['pillar.get']('master_minion') }}
- sls: ceph.wait.until.OK
- failhard: True

5 changes: 5 additions & 0 deletions srv/salt/ceph/functests/1node/replace/multiple.sls
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,32 @@ Update Destroyed for 1:
Disengage {{ label }}:
salt.runner:
- name: disengage.safety
- failhard: True

Multiple arguments:
salt.runner:
- name: replace.osd
- arg:
- 0
- 1
- failhard: True

Check OSDs {{ label }}:
salt.state:
- tgt: {{ salt['pillar.get']('master_minion') }}
- sls: ceph.tests.replace.check_absent
- failhard: True

Restore OSDs {{ label }}:
salt.state:
- tgt: 'I@roles:storage'
- sls: ceph.tests.replace.restore_osds
- tgt_type: compound
- failhard: True

Wait for Ceph {{ label }}:
salt.state:
- tgt: {{ salt['pillar.get']('master_minion') }}
- sls: ceph.wait.until.OK
- failhard: True

0 comments on commit 68652da

Please sign in to comment.