Skip to content

Commit 5822d34

Browse files
authored
Merge pull request #99 from stackhpc/fix/munge_key
Fix specification of munge key
2 parents b3b4f44 + eeb1ab7 commit 5822d34

File tree

21 files changed

+72
-31
lines changed

21 files changed

+72
-31
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ package in the image.
3333

3434
`openhpc_slurm_configless`: Optional, default false. If true then slurm's ["configless" mode](https://slurm.schedmd.com/configless_slurm.html) is used. **NB: Requires Centos8/OpenHPC v2.**
3535

36-
`openhpc_munge_key_path`: Optional, default ''. Define a path for a local file containing a munge key to use, otherwise one will be generated on the slurm control node.
36+
`openhpc_munge_key`: Optional. Define a munge key to use. If not provided then one is generated but the `openhpc_slurm_control_host` must be in the play.
3737

3838
`openhpc_login_only_nodes`: Optional. If using "configless" mode specify the name of an ansible group containing nodes which are login-only nodes (i.e. not also control nodes), if required. These nodes will run `slurmd` to contact the control node for config.
3939

defaults/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ openhpc_drain_timeout: 86400
1111
openhpc_resume_timeout: 300
1212
openhpc_retry_delay: 10
1313
openhpc_job_maxtime: 24:00:00
14-
openhpc_munge_key_path: ''
1514

1615
# Accounting
1716
openhpc_slurm_accounting_storage_host: "{{ openhpc_slurmdbd_host }}"
@@ -49,7 +48,7 @@ ohpc_release_repos:
4948
"7": "https://github.com/openhpc/ohpc/releases/download/v1.3.GA/ohpc-release-1.3-1.el7.x86_64.rpm" # ohpc v1.3 for Centos 7
5049
"8": "http://repos.openhpc.community/OpenHPC/2/CentOS_8/x86_64/ohpc-release-2-1.el8.x86_64.rpm" # ohpc v2 for Centos 8
5150
openhpc_slurm_configless: false
52-
openhpc_munge_key: ''
51+
openhpc_munge_key:
5352
openhpc_login_only_nodes: ''
5453
openhpc_module_system_install: true
5554

molecule/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test3 | 1 | Y | -
1414
test4 | 1 | N | 2x compute node, accounting enabled
1515
test5 | 1 | N | As for #1 but configless
1616
test6 | 1 | N | 0x compute nodes, configless
17-
test7 | 1 | N | 1x compute node, no login node, configless (checks image build should work)
17+
test7 | 1 | N | 1x compute node, no login node so specified munge key, configless (checks image build should work)
1818
test8 | 1 | N | 2x compute node, 2x login-only nodes, configless
1919
test9 | 1 | N | As test8 but uses `--limit=testohpc-control,testohpc-compute-0` and checks login nodes still end up in slurm.conf
2020
test10 | 1 | N | As for #5 but then tries to add an additional node
@@ -28,6 +28,8 @@ Local installation on a CentOS 8 machine looks like:
2828
sudo yum install -y yum-utils
2929
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
3030
sudo yum install -y docker-ce docker-ce-cli containerd.io
31+
sudo yum install -y iptables
32+
3133
python3 -m venv venv
3234
. venv/bin/activate
3335
pip install -U pip
@@ -48,6 +50,12 @@ Then to run all tests:
4850
MOLECULE_IMAGE=centos:7 molecule test --all
4951
MOLECULE_IMAGE=centos:8.2.2004 molecule test --all
5052

51-
Note that to see some debugging information you may want to prepend:
53+
During development you may want to:
54+
55+
- See some debugging information by prepending:
56+
57+
MOLECULE_NO_LOG="false" ...
58+
59+
- Prevent destroying insstances using:
5260

53-
MOLECULE_NO_LOG="false" ...
61+
molecule test --destroy never

molecule/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pip
22
setuptools
33
molecule[docker,lint,ansible]
4+
ansible>=2.9.0

molecule/test1/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
tasks:
55
- name: "Include ansible-role-openhpc"
66
include_role:
7-
name: "ansible-role-openhpc/"
7+
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
88
vars:
99
openhpc_enable:
1010
control: "{{ inventory_hostname in groups['testohpc_login'] }}"

molecule/test10/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
tasks:
55
- name: "Include ansible-role-openhpc"
66
include_role:
7-
name: "ansible-role-openhpc/"
7+
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
88
vars:
99
openhpc_enable:
1010
control: "{{ inventory_hostname in groups['testohpc_login'] }}"

molecule/test10/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
run_once: true
2323
- name: "Include ansible-role-openhpc"
2424
include_role:
25-
name: "ansible-role-openhpc/"
25+
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
2626
vars:
2727
openhpc_enable:
2828
control: "{{ inventory_hostname in groups['testohpc_login'] }}"

molecule/test11/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
tasks:
55
- name: "Include ansible-role-openhpc"
66
include_role:
7-
name: "ansible-role-openhpc/"
7+
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
88
vars:
99
openhpc_enable:
1010
control: "{{ inventory_hostname in groups['testohpc_login'] }}"

molecule/test11/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
tasks:
2020
- name: "Include ansible-role-openhpc"
2121
include_role:
22-
name: "ansible-role-openhpc/"
22+
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
2323
vars:
2424
openhpc_enable:
2525
control: "{{ inventory_hostname in groups['testohpc_login'] }}"

molecule/test1b/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
tasks:
55
- name: "Include ansible-role-openhpc"
66
include_role:
7-
name: "ansible-role-openhpc/"
7+
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
88
vars:
99
openhpc_enable:
1010
control: "{{ inventory_hostname in groups['testohpc_login'] }}"

0 commit comments

Comments
 (0)