Skip to content

Commit fbed333

Browse files
authored
Merge pull request #45 from openhpc/2025-10-29-34
Update testing infrastructure for OpenHPC 3.4 compatibility
2 parents bbcc392 + 708bff6 commit fbed333

File tree

13 files changed

+73
-36
lines changed

13 files changed

+73
-36
lines changed

ansible/roles/obs/ohpc-lenovo-c3.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
- name: Import ohpc-lenovo-common.yml
2727
ansible.builtin.import_tasks: ../test/ohpc-lenovo-common.yml
2828

29-
- name: Create OBS directories
29+
- name: Create OBS directories before mounting
3030
ansible.builtin.file:
3131
dest: "{{ item }}"
3232
mode: "0755"
@@ -52,7 +52,7 @@
5252
- /etc/systemd/system/obsworker-podman.service.d
5353
- /etc/systemd/system/[email protected]
5454

55-
- name: Install packages
55+
- name: Install packages (first epel-release)
5656
ansible.builtin.package:
5757
state: present
5858
name:

ansible/roles/obs/ohpc-lenovo-repo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
- /etc/systemd/system/obsworker-podman.service.d
3535
- /etc/systemd/system/[email protected]
3636

37-
- name: Install packages
37+
- name: Install packages (epel-release first)
3838
ansible.builtin.package:
3939
state: present
4040
name:

ansible/roles/repos/repos-aarch64.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
ansible.builtin.user:
4343
name: rhel
4444

45-
- name: Create directories
45+
- name: Create directories before mounting
4646
ansible.builtin.file:
4747
dest: "{{ item }}"
4848
mode: "0755"
@@ -95,7 +95,7 @@
9595
state: mounted
9696
fstype: none
9797

98-
- name: Create directories
98+
- name: Create directories after mounting
9999
ansible.builtin.file:
100100
dest: "/data{{ item }}"
101101
mode: "0755"
@@ -184,19 +184,19 @@
184184
setype: httpd_sys_content_t
185185
state: present
186186

187-
- name: Allow apache to modify files in /stats
187+
- name: Allow apache to modify files in /results
188188
community.general.sefcontext:
189189
target: '/results(/.*)?'
190190
setype: httpd_sys_content_t
191191
state: present
192192

193-
- name: Allow apache to modify files in /stats
193+
- name: Allow apache to modify files in /repos
194194
community.general.sefcontext:
195195
target: '/repos(/.*)?'
196196
setype: public_content_t
197197
state: present
198198

199-
- name: Allow apache to modify files in /stats
199+
- name: Allow apache to modify files in /repos/repositories
200200
community.general.sefcontext:
201201
target: '/rhel/repositories(/.*)?'
202202
setype: httpd_sys_content_t

ansible/roles/test/files/huawei_launch_sms.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,14 @@ ssh "${BOOT_SERVER}" systemctl start kea-dhcp4
5757
echo -n "----> Switching boot device to PXE: "
5858
export IPMI_PASSWORD=${SMS_IPMI_PASSWORD}
5959
/usr/bin/ipmitool -C 3 -E -I lanplus -H "${BMC}" -U root chassis bootdev pxe
60-
echo -n "----> Rebooting ${TARGET}: "
61-
/usr/bin/ipmitool -C 3 -E -I lanplus -H "${BMC}" -U root chassis power reset
60+
echo -n "----> Power Off ${TARGET}: "
61+
/usr/bin/ipmitool -C 3 -E -I lanplus -H "${BMC}" -U root chassis power off
62+
for i in $(seq 5 -1 1); do
63+
echo "-----> ${i}"
64+
sleep 1
65+
done
66+
echo -n "----> Power On ${TARGET}: "
67+
/usr/bin/ipmitool -C 3 -E -I lanplus -H "${BMC}" -U root chassis power on
6268
echo "----> done"
6369

6470
echo "--> Waiting for ${TARGET} to finish installation"

ansible/roles/test/files/lenovo_launch_sms.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,14 @@ ssh "${BOOT_SERVER}" systemctl start kea-dhcp4
5555
echo -n "----> Switching boot device to PXE: "
5656
export IPMI_PASSWORD=${SMS_IPMI_PASSWORD}
5757
/usr/bin/ipmitool -E -I lanplus -H "${BMC}" -U "${SMS_IPMI_USER}" chassis bootdev pxe options=efiboot
58-
echo -n "----> Rebooting ${TARGET}: "
59-
/usr/bin/ipmitool -E -I lanplus -H "${BMC}" -U "${SMS_IPMI_USER}" chassis power reset
58+
echo -n "----> Power Off ${TARGET}: "
59+
/usr/bin/ipmitool -C 3 -E -I lanplus -H "${BMC}" -U root chassis power off
60+
for i in $(seq 5 -1 1); do
61+
echo "-----> ${i}"
62+
sleep 1
63+
done
64+
echo -n "----> Power On ${TARGET}: "
65+
/usr/bin/ipmitool -C 3 -E -I lanplus -H "${BMC}" -U root chassis power on
6066
echo "----> done"
6167

6268
echo "--> Waiting for ${TARGET} to finish installation"

ansible/roles/test/files/run-ci.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ if [[ "${SMS}" == "ohpc-huawei-sms" ]]; then
209209
((TIMEOUT += 100))
210210
GATEWAY="175.200.16.14"
211211
SMS_INTERNAL="${SMS}"
212-
SMS_ETH_INTERNAL="enp189s0f0"
212+
if [[ "${DISTRIBUTION}" == "leap"* ]]; then
213+
SMS_ETH_INTERNAL="eth0"
214+
else
215+
SMS_ETH_INTERNAL="enp189s0f0"
216+
fi
213217
else
214218
TEST_ARCH=$(uname -m)
215219
CI_CLUSTER=lenovo
@@ -349,6 +353,10 @@ if [[ "${CI_CLUSTER}" == "huawei" ]]; then
349353
USER_TEST_OPTIONS="${USER_TEST_OPTIONS} --disable-spack --disable-easybuild"
350354
fi
351355

356+
if [[ "${CI_CLUSTER}" == "huawei" ]] && [[ "${DISTRIBUTION}" == "openEuler_22.03" ]] && [[ "${RMS}" == "openpbs" ]]; then
357+
USER_TEST_OPTIONS="${USER_TEST_OPTIONS} --disable-hypre"
358+
fi
359+
352360
print_overview
353361

354362
# Save old history
@@ -407,10 +415,10 @@ if [[ "${PROVISIONER}" == "confluent" ]]; then
407415
} >>"${VARS}"
408416

409417
if [[ "${DISTRIBUTION}" == "rocky"* ]]; then
410-
echo "export iso_path=/root/Rocky-9.4-x86_64-dvd.iso" >>"${VARS}"
418+
echo "export iso_path=/root/Rocky-9-latest-x86_64-dvd.iso" >>"${VARS}"
411419
fi
412420
if [[ "${DISTRIBUTION}" == "almalinux"* ]]; then
413-
echo "export iso_path=/root/AlmaLinux-9.5-x86_64-dvd.iso" >>"${VARS}"
421+
echo "export iso_path=/root/AlmaLinux-9-latest-x86_64-dvd.iso" >>"${VARS}"
414422
fi
415423
if [[ "${DISTRIBUTION}" == "almalinux10" ]]; then
416424
echo "export iso_path=/root/AlmaLinux-10.0-x86_64-dvd.iso" >>"${VARS}"

ansible/roles/test/files/support_functions.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ run_root_level_tests() {
151151
fi
152152
fi
153153

154-
if [ "x${USER_TEST_OPTIONS}" != "x" ]; then
154+
if [ "${USER_TEST_OPTIONS}" != "" ]; then
155155
echo " "
156156
echo "adding ${USER_TEST_OPTIONS} to root tests"
157157
echo " "
@@ -193,7 +193,7 @@ run_user_level_tests() {
193193
config_opts="$config_opts --with-compiler-families='gnu12 arm1'"
194194
fi
195195

196-
if [ "x${USER_TEST_OPTIONS}" != "x" ]; then
196+
if [ "${USER_TEST_OPTIONS}" != "" ]; then
197197
echo " "
198198
echo "adding ${USER_TEST_OPTIONS} to user tests"
199199
echo " "
@@ -294,7 +294,12 @@ install_openHPC_cluster() {
294294
if [ "${Provisioner}" == "warewulf" ]; then
295295
echo "CI Customization: console=tty0 breaks the compute nodes"
296296
sed '/dnf -y install ohpc-warewulf/a sed -e "s,# \\(database chunk size\\),\\1,g" -i /etc/warewulf/database.conf' -i "${recipeFile}"
297-
sed '/dnf -y install ohpc-warewulf/a sed -e "s,console=tty0,,g" -i /usr/share/perl5/vendor_perl/Warewulf/Provision/Pxe.pm' -i "${recipeFile}"
297+
if [[ "${DISTRIBUTION}" == "leap"* ]]; then
298+
sed '/dnf -y install ohpc-warewulf/a sed -e "s,console=tty0,,g" -i /usr/lib/perl5/vendor_perl/*/Warewulf/Provision/Pxe.pm' -i "${recipeFile}"
299+
else
300+
sed '/dnf -y install ohpc-warewulf/a sed -e "s,console=tty0,,g" -i /usr/share/perl5/vendor_perl/Warewulf/Provision/Pxe.pm' -i "${recipeFile}"
301+
fi
302+
298303
fi
299304
if [ "${Provisioner}" == "warewulf4" ]; then
300305
echo "CI Customization: Switch to http in repository definition"
@@ -666,6 +671,7 @@ wait_for_computes() {
666671
ipmitool -E -I lanplus -H "${c_bmc[$j]}" -U "${bmc_username}" -P "${bmc_password}" chassis bootdev pxe options=efiboot
667672
fi
668673
ipmitool -E -I lanplus -H "${c_bmc[$j]}" -U "${bmc_username}" -P "${bmc_password}" power off
674+
local_sleep 5
669675
ipmitool -E -I lanplus -H "${c_bmc[$j]}" -U "${bmc_username}" -P "${bmc_password}" power on
670676
done
671677
fi
@@ -730,11 +736,7 @@ enable_repo() {
730736
if [[ "${VERSION_MAJOR}" == "2" ]]; then
731737
OBS_KEY="https://obs.openhpc.community/projects/OpenHPC/public_key"
732738
else
733-
if [[ "${VERSION_MINOR}" != "0" ]]; then
734-
OBS_KEY="https://obs.openhpc.community/projects/OpenHPC${VERSION_MAJOR}/public_key"
735-
else
736-
OBS_KEY="http://obs.openhpc.community:82/OpenHPC${VERSION_MAJOR}:/${VERSION_MAJOR}.0:/Factory/${os_repo}/repodata/repomd.xml.key"
737-
fi
739+
OBS_KEY="http://obs.openhpc.community:82/OpenHPC${VERSION_MAJOR}:/${VERSION_MAJOR}.0:/Factory/${os_repo}/repodata/repomd.xml.key"
738740
fi
739741
STAGING_REPO_KEY="${STAGING_REPO}/${os_repo}/repodata/repomd.xml.key"
740742
RELEASE_REPO_KEY="${RELEASE_REPO}/${os_repo}/repodata/repomd.xml.key"

ansible/roles/test/ohpc-common-repo.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
dest: "{{ item }}"
66
state: directory
77
with_items:
8-
- "/var/www/html/openSUSE-Leap-15.3-DVD-{{ arch }}-Media"
9-
- "/var/www/html/openSUSE-Leap-15.5-DVD-{{ arch }}-Media"
8+
- "/var/www/html/openSUSE-Leap-15.3-DVD-{{ arch }}-Current"
9+
- "/var/www/html/openSUSE-Leap-15.5-DVD-{{ arch }}-Current"
1010
- /var/www/html/openEuler-22.03-LTS-SP3-everything
1111
- /var/www/html/openEuler-24.03-LTS-SP2-everything
1212
- /var/www/html/AlmaLinux-10-latest
@@ -101,7 +101,6 @@
101101
opts: defaults,ro
102102
state: mounted
103103
fstype: iso9660
104-
when: inventory_hostname_short.startswith('ohpc-lenovo-repo')
105104

106105
- name: Setup tftp booting
107106
ansible.builtin.copy:
@@ -163,8 +162,8 @@
163162
dest: /var/lib/tftpboot/
164163
mode: "0644"
165164
with_items:
166-
- "/var/www/html/openSUSE-Leap-15.5-DVD-{{ arch }}-Current/boot/{{ arch }}/loader/initrd"
167-
- "/var/www/html/openSUSE-Leap-15.5-DVD-{{ arch }}-Current/boot/{{ arch }}/loader/linux"
165+
- "/var/www/html/openSUSE-Leap-15.5-DVD-{{ arch }}-Current/boot/{{ arch }}/{%- if arch == 'x86_64' -%}loader/{%- endif -%}initrd"
166+
- "/var/www/html/openSUSE-Leap-15.5-DVD-{{ arch }}-Current/boot/{{ arch }}/{%- if arch == 'x86_64' -%}loader/{%- endif -%}linux"
168167
when: distro == "leap15.5"
169168

170169
- name: Setup tftp booting for leap15.3
@@ -187,7 +186,7 @@
187186

188187
- name: Copy autoyast for "{{ distro }}"
189188
ansible.builtin.template:
190-
src: "{{ distro }}-autoyast.{{ cluster }}"
189+
src: "{{ distro }}-autoyast"
191190
dest: "/var/www/html/{{ distro }}-autoyast"
192191
mode: "0644"
193192
when: distro.startswith("leap15")

ansible/roles/test/templates/el-kickstart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,12 @@ services --enabled="chronyd"
129129

130130
rootpw --iscrypted {{ root_password_crypted }}
131131

132+
{% if type == 'openeuler' and inventory_hostname_short.startswith('ohpc-lenovo-repo') %}
133+
# the network card firmware requires a real reboot
134+
reboot
135+
{% else %}
132136
reboot --kexec
137+
{% endif %}
133138

134139
%post
135140
set -x
@@ -153,6 +158,10 @@ export http_proxy=http://{{ proxy }}
153158
{% endif %}
154159
/usr/bin/crb enable
155160
{% elif type == 'openeuler' %}
161+
# the openeuler 22.03 kernel cannot handle zstd compressed firmware, but openeuler ships it that way
162+
zstd -d /usr/lib/firmware/qed/qed_init_values_zipped-8.42.2.0.bin.zst || true
163+
dracut --force --kver $(rpm -q --queryformat '%{version}-%{release}.%{arch}' kernel)
164+
156165
echo "gpgcheck=0" >> /etc/yum.repos.d/DVD.repo
157166
echo "gpgcheck=0" >> /etc/yum.repos.d/everythingMirror.repo
158167
echo "gpgcheck=0" >> /etc/yum.repos.d/updateMirror.repo

ansible/roles/test/templates/huawei.mapping

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ internal_network=175.200.0.0
2828
{% if distro.startswith('rocky') or distro.startswith('almalinux') %}
2929
eth_provision=enp189s0f0
3030
{% elif distro.startswith('openEuler') %}
31-
eth_provision=eth2
31+
eth_provision=eth0
3232
{% elif distro.startswith('leap') %}
33-
eth_provision=eth2
33+
eth_provision=eth0
3434
{% endif %}
3535

3636

0 commit comments

Comments
 (0)