Skip to content

Commit

Permalink
Fix test partition command
Browse files Browse the repository at this point in the history
  • Loading branch information
tom91136 committed Sep 29, 2024
1 parent c21a7bc commit 8bdf02a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions playbook-task-sync-nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
state: restarted
enabled: true

- name: Reset all node states
ansible.builtin.shell: scontrol update NodeName=ALL State=IDLE

- name: Setup warewulf node config
template:
src: nodes.conf.j2
Expand Down
1 change: 0 additions & 1 deletion staging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ def self.write_inventory(pve_ip:, storage_pool:, extra_hosts:, host_common_hash:

common_vars = common_vars(storage_pool)
extra_inventory = {
"root_sshkeys": ssh_pub_keys,
"ungrouped": {
"hosts":
extra_hosts.merge(
Expand Down
5 changes: 3 additions & 2 deletions tasks/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
- df.rc != 0 or 'mgmt.{{domain}}:/mnt/rds1/home' not in df.stdout

- name: Get srun node hostnames
ansible.builtin.shell: srun --nodelist={{node}} hostname
ansible.builtin.shell: srun --partition={{nodes[node].partition}} --nodelist={{node}} hostname
register: srun
until: srun.rc == 0
retries: 30 # 3 minutes
delay: 1
loop: "{{nodes.keys()}}"
loop_control: { loop_var: node }

- ansible.builtin.fail:
- name: Assert srun result is correct
ansible.builtin.fail:
msg: "Bad srun outcome"
when: result.rc != 0 or result.stdout.strip() != result.node
loop: "{{srun.results}}"
Expand Down

0 comments on commit 8bdf02a

Please sign in to comment.