Skip to content

Commit 9859d54

Browse files
committed
make compute-init safe for rerunning ansible-init
1 parent 4f81b89 commit 9859d54

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ansible/roles/compute_init/files/compute-init.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,7 @@
153153
- name: Ensure node is resumed
154154
# TODO: consider if this is always safe for all job states?
155155
command: scontrol update state=resume nodename={{ ansible_hostname }}
156-
# TODO: make safe for repeated runs
156+
register: _scontrol_update
157+
failed_when:
158+
- _scontrol_update.rc > 0
159+
- "'slurm_update error: Invalid node state specified' not in _scontrol_update.stderr"

0 commit comments

Comments
 (0)