File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 20
20
_openhpc_slurmdbd_check.rc > 1 or
21
21
'Slurm Database is somehow higher than expected' in _openhpc_slurmdbd_check.stdout
22
22
# from https://github.com/SchedMD/slurm/blob/master/src/plugins/accounting_storage/mysql/as_mysql_convert.c
23
- when : _openhpc_slurmdb_tables.query_result != [[]] # i.e. when db is initialised
23
+ when : _openhpc_slurmdb_tables.query_result | flatten | length > 0 # i.e. when db is initialised
24
24
25
25
- name : Set fact for slurm database upgrade
26
- # If -u option doesn't exist it can't be a major upgrade due to existing
27
- # appliance version
28
- # Otherwise from manpage, rc 0 = no conversion, 1 = conversion required
29
- # Default skips upgrade steps if skipped check because db is not initialised
26
+ # Explanation of ifs below:
27
+ # - `slurmdbd -u` rc == 0 then no conversion required (from manpage)
28
+ # - default of 0 on rc skips upgrade steps if check was skipped because
29
+ # db is not initialised
30
+ # - Usage message (and rc == 1) if -u option doesn't exist, in which case
31
+ # it can't be a major upgrade due to existing openhpc versions
30
32
set_fact :
31
33
_openhpc_slurmdb_upgrade : >-
32
34
{{ false
52
54
cmd : " {{ openhpc_slurm_accounting_storage_backup_cmd }}"
53
55
delegate_to : " {{ openhpc_slurm_accounting_storage_backup_host }}"
54
56
become : " {{ openhpc_slurm_accounting_storage_backup_become }}"
55
- changed_when : true # limt no-changed-when
57
+ changed_when : true
56
58
run_once : true
57
59
when :
58
60
- _openhpc_slurmdb_upgrade
You can’t perform that action at this time.
0 commit comments