-
Notifications
You must be signed in to change notification settings - Fork 34
Support compute node rebuild/reboot via Slurm RebootProgram #553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ed1bfa5
add rebuild role to appliance and modify groupvars
bertiethorpe 34e84fa
improve readability of group_vars
bertiethorpe 7492de7
Define login nodes using an opentofu module (#547)
sjpb f505c13
Change docs/ references from Terraform to OpenTofu (#544)
bertiethorpe fb255b2
Merge branch 'main' into feat/slurm-rebuild
bertiethorpe 00384ff
fix instance_id in compute inventory to be target image, not deployed…
sjpb 050af5e
review all roles for compute_init_enable
sjpb fd8ac10
fix permissions to /exports/cluster
bertiethorpe 6d53fbe
make openhpc_config more greppable
bertiethorpe 45e5d39
Set ResumeTimeout and ReturnToService overrides in group_vars
bertiethorpe fb324e6
Merge branch 'main' into feat/slurm-rebuild
bertiethorpe 47bb230
CI tests for reboot via slurm (without rebuild)
bertiethorpe 2a0f3b7
fpinrocky 8 pythoolsvenv version
bertiethorpe c392db0
Merge branch 'feat/slurm-rebuild' into docs/compute-init-roles-v2
bertiethorpe b6ba905
Merge pull request #554 from stackhpc/docs/compute-init-roles-v2
bertiethorpe 881ca95
refining comments and task names
bertiethorpe 2bdfc8a
rebuild role readme
bertiethorpe cf7cb67
Merge branch 'main' into feat/slurm-rebuild
bertiethorpe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,3 +80,5 @@ roles/* | |
!roles/slurm_stats/** | ||
!roles/pytools/ | ||
!roles/pytools/** | ||
!roles/rebuild/ | ||
!roles/rebuild/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Reboot compute nodes via slurm. Nodes will be rebuilt if `image_id` in inventory is different to the currently-provisioned image. | ||
# Example: | ||
# ansible-playbook -v ansible/adhoc/reboot_via_slurm.yml | ||
|
||
- hosts: login | ||
run_once: true | ||
become: yes | ||
gather_facts: no | ||
tasks: | ||
- name: Submit a Slurm job to reboot compute nodes | ||
ansible.builtin.shell: | | ||
set -e | ||
srun --reboot -N 2 uptime | ||
become_user: root | ||
register: slurm_result | ||
failed_when: slurm_result.rc != 0 | ||
|
||
- name: Fetch Slurm controller logs if reboot fails | ||
ansible.builtin.shell: | | ||
journalctl -u slurmctld --since "10 minutes ago" | tail -n 50 | ||
become_user: root | ||
register: slurm_logs | ||
when: slurm_result.rc != 0 | ||
delegate_to: "{{ groups['control'] | first }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
rebuild | ||
========= | ||
|
||
Enables reboot tool from https://github.com/stackhpc/slurm-openstack-tools.git to be run from control node. | ||
|
||
Requirements | ||
------------ | ||
|
||
clouds.yaml file | ||
|
||
Role Variables | ||
-------------- | ||
|
||
- `openhpc_rebuild_clouds`: Directory. Path to clouds.yaml file. | ||
|
||
|
||
Example Playbook | ||
---------------- | ||
|
||
- hosts: control | ||
become: yes | ||
tasks: | ||
- import_role: | ||
name: rebuild | ||
|
||
License | ||
------- | ||
|
||
Apache-2.0 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
openhpc_rebuild_clouds: ~/.config/openstack/clouds.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
|
||
- name: Create /etc/openstack | ||
file: | ||
path: /etc/openstack | ||
state: directory | ||
owner: slurm | ||
group: root | ||
mode: u=rX,g=rwX | ||
|
||
- name: Copy out clouds.yaml | ||
copy: | ||
src: "{{ openhpc_rebuild_clouds }}" | ||
dest: /etc/openstack/clouds.yaml | ||
owner: slurm | ||
group: root | ||
mode: u=r,g=rw | ||
|
||
- name: Setup slurm tools | ||
include_role: | ||
name: slurm_tools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
cluster_net = "stackhpc-ipv4-geneve" | ||
cluster_subnet = "stackhpc-ipv4-geneve-subnet" | ||
cluster_networks = [ | ||
{ | ||
network = "stackhpc-ipv4-geneve" | ||
subnet = "stackhpc-ipv4-geneve-subnet" | ||
} | ||
] | ||
control_node_flavor = "general.v1.small" | ||
other_node_flavor = "general.v1.small" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.