Skip to content

Commit 464eced

Browse files
authored
Fix broken DNS in arcus CI (#202)
* use image without resolv.conf in arcus * add ssh reset after user changes for robustness * move ci image build to separate from direct deployment * use image without resolv.conf in arcus packer build too * update arcus image to use openhpc-220808-1510.qcow2 built in slurm_image_builder:main
1 parent 7bcacb0 commit 464eced

File tree

6 files changed

+21
-46
lines changed

6 files changed

+21
-46
lines changed

.github/workflows/stackhpc.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
TF_VAR_cluster_name: ci${{ github.run_id }}
8888
if: ${{ always() && steps.provision.outcome == 'failure' && contains('not enough hosts available', steps.provision_failure.messages) }}
8989

90-
- name: Directly configure cluster and build compute, login and control images
90+
- name: Directly configure cluster and build compute
9191
# see pre-hook for the image build
9292
run: |
9393
. venv/bin/activate
@@ -131,9 +131,20 @@ jobs:
131131
(echo $statuscode | grep "200 OK") || (echo $statuscode && exit 1)
132132
env:
133133
TEST_USER_PASSWORD: ${{ secrets.TEST_USER_PASSWORD }}
134-
135-
- name: Test reimage of login and compute nodes
136-
# TODO: test control node reimage
134+
135+
- name: Build packer images
136+
run: |
137+
. venv/bin/activate
138+
. environments/${{ matrix.cloud }}/activate
139+
echo test_user_password: "$TEST_USER_PASSWORD" > $APPLIANCES_ENVIRONMENT_ROOT/inventory/group_vars/basic_users/defaults.yml
140+
cd packer/
141+
PACKER_LOG=1 packer build -on-error=ask -var-file=$PKR_VAR_environment_root/builder.pkrvars.hcl openstack.pkr.hcl
142+
env:
143+
OS_CLOUD: openstack
144+
ANSIBLE_FORCE_COLOR: True
145+
TEST_USER_PASSWORD: ${{ secrets.TEST_USER_PASSWORD }}
146+
147+
- name: Test reimage of nodes
137148
run: |
138149
. venv/bin/activate
139150
. environments/${{ matrix.cloud }}/activate

ansible/bootstrap.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
# Need to change working directory otherwise we try to switch back to non-existent directory.
2424
become_flags: '-i'
2525
become: true
26+
- name: Reset ssh connection to allow user changes to affect ansible_user
27+
meta: reset_connection
2628

2729
- hosts: selinux
2830
gather_facts: false

environments/arcus/builder.pkrvars.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
flavor = "vm.alaska.cpu.general.small"
22
networks = ["a262aabd-e6bf-4440-a155-13dbc1b5db0e"] # WCDC-iLab-60
3-
source_image_name = "openhpc-220526-1354.qcow2"
3+
source_image_name = "openhpc-220808-1510.qcow2"
44
ssh_keypair_name = "slurm-app-ci"
55
security_groups = ["default", "SSH"]
66
ssh_bastion_host = "128.232.222.183"

environments/arcus/hooks/pre.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
- hosts: localhost
2-
become: false
3-
tags: build
4-
tasks:
5-
- name: Ensure secrets generated
6-
include_role:
7-
name: passwords
8-
9-
- name: Build packer images
10-
shell:
11-
cmd: |
12-
cd packer
13-
PACKER_LOG=1 packer build -on-error=ask -var-file=$PKR_VAR_environment_root/builder.pkrvars.hcl openstack.pkr.hcl
14-
chdir: "{{ lookup('env', 'APPLIANCES_REPO_ROOT') }}"
15-
when: "'builder' not in group_names" # avoid recursion!
16-
register: packer_run
17-
async: 2700 # 45 minutes
18-
poll: 0
19-
201
- hosts: all
212
become: true
223
tags: etc_hosts

environments/arcus/terraform/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ module "cluster" {
1818
key_pair = "slurm-app-ci"
1919
control_node = {
2020
flavor: "vm.alaska.cpu.general.small"
21-
image: "openhpc-220526-1354.qcow2"
21+
image: "openhpc-220808-1510.qcow2"
2222
}
2323
login_nodes = {
2424
login-0: {
2525
flavor: "vm.alaska.cpu.general.small"
26-
image: "openhpc-220526-1354.qcow2"
26+
image: "openhpc-220808-1510.qcow2"
2727
}
2828
}
2929
compute_types = {
3030
small: {
3131
flavor: "vm.alaska.cpu.general.small"
32-
image: "openhpc-220526-1354.qcow2"
32+
image: "openhpc-220808-1510.qcow2"
3333
}
3434
}
3535
compute_nodes = {

environments/smslabs/hooks/pre.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
- hosts: localhost
2-
become: false
3-
tags: build
4-
tasks:
5-
- name: Ensure secrets generated
6-
include_role:
7-
name: passwords
8-
9-
- name: Build packer images
10-
shell:
11-
cmd: |
12-
cd packer
13-
PACKER_LOG=1 packer build -on-error=ask -var-file=$PKR_VAR_environment_root/builder.pkrvars.hcl openstack.pkr.hcl
14-
chdir: "{{ lookup('env', 'APPLIANCES_REPO_ROOT') }}"
15-
when: "'builder' not in group_names" # avoid recursion!
16-
register: packer_run
17-
async: 2700 # 45 minutes
18-
poll: 0
19-
201
- hosts: all
212
become: true
223
tags: etc_hosts

0 commit comments

Comments
 (0)