Skip to content

Commit 1f18d5f

Browse files
committed
Add UBI 10 support for CRIU tests
- Add UBI 10 playlist.xml test cases for all pingPerf scenarios - Fix pingPerf.sh to handle UBI 10 package incompatibilities - Handle empty docker_image_source_job_name when building image path - Enable ubi10 test in Jenkins openjdk_tests pipeline related: https://github.ibm.com/runtimes/automation/issues/858 Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
1 parent 55fce5e commit 1f18d5f

File tree

3 files changed

+172
-16
lines changed

3 files changed

+172
-16
lines changed

buildenv/jenkins/openjdk_tests

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -186,41 +186,50 @@ timestamps{
186186
'x86-64_linux' : [
187187
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22&&hw.arch.x86.broadwell"],
188188
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22&&hw.arch.x86.amd"],
189-
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.x86.broadwell"],
190-
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.x86.amd"],
191-
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.x86.skylake"],
189+
// rhel.8 excluded from upload: ubi10 tar permission bug on rhel.8 (runtimes_backlog_issues_879)
190+
// ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.x86.broadwell"],
191+
// ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.x86.amd"],
192+
// ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.x86.skylake"],
192193
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.x86.amd"],
193194
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.x86.broadwell"]
194195
],
195196
'aarch64_linux' : [
196197
// no machine available ['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.20"],
197198
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22&&hw.arch.aarch64.armv8"],
198-
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.aarch64.armv8"],
199+
// rhel.8 excluded from upload: ubi10 tar permission bug on rhel.8 (runtimes_backlog_issues_879)
200+
// ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.aarch64.armv8"],
199201
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.aarch64.armv8"]
200202
],
201203
's390x_linux' : [
202204
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22&&hw.arch.s390x.z13"],
203205
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22&&hw.arch.s390x.z14"],
204206
// no machine available ['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22&&hw.arch.s390x.z15"],
205207
// no machine available ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.s390x.z13"],
206-
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.s390x.z14"],
208+
// rhel.8 excluded from upload: ubi10 tar permission bug on rhel.8 (runtimes_backlog_issues_879)
209+
// ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.s390x.z14"],
207210
// no machine available ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.s390x.z15"],
208-
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.s390x.z14"]
211+
// rhel.9 s390x excluded from upload: sudo requires password on all available nodes (runtimes_backlog_issues_879)
212+
// ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.s390x.z14"]
209213
// no machine available ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.s390x.z15"]
210214
],
211215
'ppc64le_linux' : [
212216
// no machine available ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.ppc64le.p9"],
213-
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.ppc64le.p10"],
217+
// rhel.8 excluded from upload: ubi10 tar permission bug on rhel.8 (runtimes_backlog_issues_879)
218+
// ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.ppc64le.p10"],
214219
// no machine available ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.ppc64le.p8"],
215220
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.ppc64le.p9"],
216221
// no machine available ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.98&&hw.arch.ppc64le.p10"],
217222
]
218223
]
219224
imagePullMap = [
220225
'x86-64_linux' : [
221-
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22"],
222-
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8"],
223-
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9"]
226+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22&&hw.arch.x86.broadwell"],
227+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22&&hw.arch.x86.amd"],
228+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.x86.broadwell"],
229+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.x86.amd"],
230+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.x86.skylake"],
231+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.x86.amd"],
232+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.x86.broadwell"]
224233
],
225234
'aarch64_linux' : [
226235
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22"],
@@ -238,7 +247,7 @@ timestamps{
238247
['LABEL_ADDITION' : "${commonLabel}&&hw.arch.ppc64le.p9&&!sw.os.ubuntu.24"]
239248
]
240249
]
241-
target = "testList TESTLIST=disabled.criu_pingPerf_testCreateRestoreImageAndPushToRegistry_ubi8,disabled.criu_pingPerf_testCreateRestoreImageAndPushToRegistry_ubi9,disabled.criu-portable-checkpoint_test,disabled.criu-ubi-portable-checkpoint_test"
250+
target = "testList TESTLIST=disabled.criu_pingPerf_testCreateRestoreImageAndPushToRegistry_ubi8,disabled.criu_pingPerf_testCreateRestoreImageAndPushToRegistry_ubi9,disabled.criu_pingPerf_testCreateRestoreImageAndPushToRegistry_ubi10,disabled.criu-portable-checkpoint_test,disabled.criu-ubi-portable-checkpoint_test"
242251

243252
if (params.PLATFORM == "ppc64le_linux") {
244253
// exclude criu-portable-checkpoint_test on plinux due to github_ibm/runtimes/backlog/issues/1099
@@ -329,7 +338,7 @@ timestamps{
329338
dockerAgents = PLATFORM_MAP[params.PLATFORM]["DockerAgents"] ? PLATFORM_MAP[params.PLATFORM]["DockerAgents"] : []
330339
}
331340
@Field String dockerAgentLabel = ''
332-
@Field String LABEL = ''
341+
@Field String LABEL = ''
333342
if (params.LABEL) {
334343
LABEL = params.LABEL
335344
} else {
@@ -783,8 +792,8 @@ def getEBCNode() {
783792
parameters: [
784793
string(name: 'PLATFORM', value: params.PLATFORM),
785794
string(name: 'NODE_TYPE', value: 'testmachine'),
786-
string(name: 'TIME_LIMIT', value: expectedNodeLifespan.toString()),
787-
string(name: 'GROUP_LABEL', value: UUID.randomUUID().toString()),
795+
string(name: 'TIME_LIMIT', value: expectedNodeLifespan.toString()),
796+
string(name: 'GROUP_LABEL', value: UUID.randomUUID().toString()),
788797
booleanParam(name: 'WAIT', value: wait),
789798
]
790799
return result.buildVariables.group_label

external/criu/pingPerf.sh

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ getSemeruDockerfile() {
5353
if [[ $jdkVersion -lt 21 ]]; then
5454
findCommandAndReplace '\/opt\/java\/openjdk\/legal\/java.base\/LICENSE \/licenses;' "\/opt\/java\/openjdk\/legal\/java.base\/LICENSE \/licenses\/;" $semeruDockerfile true
5555
fi
56+
# UBI 10 specific fixes: remove iptables and other packages that don't exist
57+
if [[ $docker_os_version == "10" ]]; then
58+
# Remove iptables from the package list as it doesn't exist in UBI 10
59+
findCommandAndReplace 'iptables-libs iptables jansson libibverbs libmnl libnet libnftnl libpcap nftables protobuf-c' 'jansson libibverbs libnet libnftnl libpcap nftables protobuf-c' $semeruDockerfile false
60+
# Add --no-same-permissions to tar to avoid permission errors in rootless podman builds
61+
findCommandAndReplace 'tar -xzf criu.tar.gz --strip-components=1;' 'tar -xzf criu.tar.gz --strip-components=1 --no-same-permissions;' $semeruDockerfile false
62+
fi
63+
# Remove specific version constraints for libexpat1 packages to avoid 404 errors when versions are superseded
64+
findCommandAndReplace 'libexpat1-dev=[^ ]*' 'libexpat1-dev' $semeruDockerfile false
65+
findCommandAndReplace 'libexpat1=[^ ]*' 'libexpat1' $semeruDockerfile false
5666
else # docker_os is ubuntu
5767
echo "curl -OLJSks ${semeruDockerfileUrlBase}/${semeruDockerfile}"
5868
curl -OLJSks ${semeruDockerfileUrlBase}/${semeruDockerfile}
@@ -147,7 +157,7 @@ findCommandAndReplace() {
147157

148158
buildImage() {
149159
echo "build image at $(pwd)..."
150-
sudo podman build -t local-ibm-semeru-runtimes:latest -f Dockerfile.open.releases.full . --build-arg DOCKER_REGISTRY_CREDENTIALS_USR=$DOCKER_REGISTRY_CREDENTIALS_USR --build-arg DOCKER_REGISTRY_CREDENTIALS_PSW=$DOCKER_REGISTRY_CREDENTIALS_PSW 2>&1 | tee build_semeru_image.log
160+
sudo podman build -t local-ibm-semeru-runtimes:latest -f Dockerfile.open.releases.full . --build-arg DOCKER_REGISTRY_CREDENTIALS_USR=$DOCKER_REGISTRY_CREDENTIALS_USR --build-arg DOCKER_REGISTRY_CREDENTIALS_PSW=$DOCKER_REGISTRY_CREDENTIALS_PSW 2>&1 | tee build_semeru_image.log
151161
# Temporarily OpenLiberty ubi dockerfile only supports openjdk 17, not 11, need to add jdkVersion for ubuntu support later
152162
sudo podman build -t icr.io/appcafe/open-liberty:beta-instanton -f ci.docker/releases/latest/full/Dockerfile.${docker_os}.openjdk17 ci.docker/releases/latest/beta
153163
sudo podman build -t ol-instanton-test-pingperf:latest -f Dockerfile.pingperf .
@@ -241,7 +251,12 @@ pushImage() {
241251
dockerRegistryLogin
242252
echo "Pushing docker image..."
243253

244-
restore_ready_checkpoint_image_folder="${DOCKER_REGISTRY_URL}/${docker_image_source_job_name}/pingperf_${JDK_VERSION}-${JDK_IMPL}-${docker_os}-${docker_os_version}-${PLATFORM}-${node_label_current_os}-${node_label_micro_architecture}"
254+
# Build the image path, handling empty docker_image_source_job_name
255+
if [ -z "${docker_image_source_job_name}" ]; then
256+
restore_ready_checkpoint_image_folder="${DOCKER_REGISTRY_URL}/pingperf_${JDK_VERSION}-${JDK_IMPL}-${docker_os}-${docker_os_version}-${PLATFORM}-${node_label_current_os}-${node_label_micro_architecture}"
257+
else
258+
restore_ready_checkpoint_image_folder="${DOCKER_REGISTRY_URL}/${docker_image_source_job_name}/pingperf_${JDK_VERSION}-${JDK_IMPL}-${docker_os}-${docker_os_version}-${PLATFORM}-${node_label_current_os}-${node_label_micro_architecture}"
259+
fi
245260
tagged_restore_ready_checkpoint_image_num="${restore_ready_checkpoint_image_folder}:${build_number}"
246261

247262
# Push a docker image with build_num for records
@@ -292,36 +307,67 @@ pullImageUnprivilegedRestore() {
292307
dockerRegistryLogin
293308
getImageNameList
294309
echo "The host machine micro-architecture is ${node_label_micro_architecture}"
310+
tested=0
295311
for restore_docker_image_name in ${restore_docker_image_name_list[@]}
296312
do
297313
echo "Pulling image $restore_docker_image_name"
314+
315+
# Pre-flight check: verify image exists before attempting pull
316+
echo "Checking if image exists in registry..."
317+
if ! skopeo inspect --creds "${DOCKER_REGISTRY_CREDENTIALS_USR}:${DOCKER_REGISTRY_CREDENTIALS_PSW}" \
318+
docker://$restore_docker_image_name &>/dev/null; then
319+
echo "SKIP: Image $restore_docker_image_name not available in registry"
320+
continue
321+
fi
322+
298323
sudo podman pull $restore_docker_image_name
299324
getCriuseccompproFile
300325

301326
# restore
302327
restoreImage=$restore_docker_image_name
303328
testUnprivilegedRestoreOnly
304329
clean
330+
tested=$((tested + 1))
305331
done
306332

333+
if [ $tested -eq 0 ]; then
334+
echo "ERROR: No images were successfully tested."
335+
exit 1
336+
fi
337+
307338
dockerRegistryLogout
308339
}
309340

310341
pullImagePrivilegedRestore() {
311342
dockerRegistryLogin
312343
getImageNameList
313344
echo "The host machine micro-architecture is ${node_label_micro_architecture}"
345+
tested=0
314346
for restore_docker_image_name in ${restore_docker_image_name_list[@]}
315347
do
316348
echo "Pulling image $restore_docker_image_name"
349+
350+
# Pre-flight check: verify image exists before attempting pull
351+
echo "Checking if image exists in registry..."
352+
if ! skopeo inspect --creds "${DOCKER_REGISTRY_CREDENTIALS_USR}:${DOCKER_REGISTRY_CREDENTIALS_PSW}" \
353+
docker://$restore_docker_image_name &>/dev/null; then
354+
echo "SKIP: Image $restore_docker_image_name not available in registry"
355+
continue
356+
fi
357+
317358
sudo podman pull $restore_docker_image_name
318359

319360
# restore
320361
restoreImage=$restore_docker_image_name
321362
testPrivilegedRestoreOnly
322363
clean
364+
tested=$((tested + 1))
323365
done
324366

367+
if [ $tested -eq 0 ]; then
368+
echo "ERROR: No images were successfully tested."
369+
exit 1
370+
fi
325371
dockerRegistryLogout
326372
}
327373

external/criu/playlist.xml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,22 @@
4646
<group>external</group>
4747
</groups>
4848
</test>
49+
<test>
50+
<testCaseName>criu_pingPerf_testCreateImageAndUnprivilegedRestore_ubi10</testCaseName>
51+
<command>$(TEST_ROOT)/external/criu/pingPerf.sh testCreateImageAndUnprivilegedRestore $(TEST_ROOT)/external/criu/upload/PingperfFiles.zip $(TEST_ROOT)/external/criu/upload/ubi.repo $(TEST_JDK_HOME) ${JDK_VERSION} "ubi" "10"; \
52+
$(TEST_STATUS); \
53+
$(TEST_ROOT)/external/criu/pingPerf.sh clean
54+
</command>
55+
<features>
56+
<feature>CRIU:required</feature>
57+
</features>
58+
<levels>
59+
<level>dev</level>
60+
</levels>
61+
<groups>
62+
<group>external</group>
63+
</groups>
64+
</test>
4965
<test>
5066
<testCaseName>criu_pingPerf_testCreateImageAndPrivilegedRestore_ubi8</testCaseName>
5167
<command>$(TEST_ROOT)/external/criu/pingPerf.sh testCreateImageAndPrivilegedRestore $(TEST_ROOT)/external/criu/upload/PingperfFiles.zip $(TEST_ROOT)/external/criu/upload/ubi.repo $(TEST_JDK_HOME) ${JDK_VERSION} "ubi" "8"; \
@@ -78,6 +94,22 @@
7894
<group>external</group>
7995
</groups>
8096
</test>
97+
<test>
98+
<testCaseName>criu_pingPerf_testCreateImageAndPrivilegedRestore_ubi10</testCaseName>
99+
<command>$(TEST_ROOT)/external/criu/pingPerf.sh testCreateImageAndPrivilegedRestore $(TEST_ROOT)/external/criu/upload/PingperfFiles.zip $(TEST_ROOT)/external/criu/upload/ubi.repo $(TEST_JDK_HOME) ${JDK_VERSION} "ubi" "10"; \
100+
$(TEST_STATUS); \
101+
$(TEST_ROOT)/external/criu/pingPerf.sh clean
102+
</command>
103+
<features>
104+
<feature>CRIU:required</feature>
105+
</features>
106+
<levels>
107+
<level>dev</level>
108+
</levels>
109+
<groups>
110+
<group>external</group>
111+
</groups>
112+
</test>
81113
<test>
82114
<testCaseName>criu_pingPerf_testCreateRestoreImageAndPushToRegistry_ubi8</testCaseName>
83115
<disables>
@@ -120,6 +152,43 @@
120152
<group>external</group>
121153
</groups>
122154
</test>
155+
<test>
156+
<testCaseName>criu_pingPerf_testCreateRestoreImageAndPushToRegistry_ubi10</testCaseName>
157+
<disables>
158+
<disable>
159+
<comment>runtimes_backlog_issues_879</comment>
160+
</disable>
161+
</disables>
162+
<command>$(TEST_ROOT)/external/criu/pingPerf.sh testCreateRestoreImageAndPushToRegistry $(TEST_ROOT)/external/criu/upload/PingperfFiles.zip $(TEST_ROOT)/external/criu/upload/ubi.repo $(TEST_JDK_HOME) ${JDK_VERSION} "ubi" "10" "$(DOCKER_REGISTRY_DIR)"; \
163+
$(TEST_STATUS); \
164+
$(TEST_ROOT)/external/criu/pingPerf.sh clean
165+
</command>
166+
<features>
167+
<feature>CRIU:required</feature>
168+
</features>
169+
<levels>
170+
<level>dev</level>
171+
</levels>
172+
<groups>
173+
<group>external</group>
174+
</groups>
175+
</test>
176+
<test>
177+
<testCaseName>criu_pingPerf_testCreateRestoreImageAndPushToRegistry_ubi10</testCaseName>
178+
<command>$(TEST_ROOT)/external/criu/pingPerf.sh testCreateRestoreImageAndPushToRegistry $(TEST_ROOT)/external/criu/upload/PingperfFiles.zip $(TEST_ROOT)/external/criu/upload/ubi.repo $(TEST_JDK_HOME) ${JDK_VERSION} "ubi" "10" "$(DOCKER_REGISTRY_DIR)"; \
179+
$(TEST_STATUS); \
180+
$(TEST_ROOT)/external/criu/pingPerf.sh clean
181+
</command>
182+
<features>
183+
<feature>CRIU:required</feature>
184+
</features>
185+
<levels>
186+
<level>dev</level>
187+
</levels>
188+
<groups>
189+
<group>external</group>
190+
</groups>
191+
</test>
123192
<test>
124193
<testCaseName>criu_pingPerf_pullImageUnprivilegedRestore_ubi8</testCaseName>
125194
<command>$(TEST_ROOT)/external/criu/pingPerf.sh pullImageUnprivilegedRestore "ubi" "8" "$(DOCKER_REGISTRY_DIR)"; \
@@ -152,6 +221,22 @@
152221
<group>external</group>
153222
</groups>
154223
</test>
224+
<test>
225+
<testCaseName>criu_pingPerf_pullImageUnprivilegedRestore_ubi10</testCaseName>
226+
<command>$(TEST_ROOT)/external/criu/pingPerf.sh pullImageUnprivilegedRestore "ubi" "10" "$(DOCKER_REGISTRY_DIR)"; \
227+
$(TEST_STATUS); \
228+
$(TEST_ROOT)/external/criu/pingPerf.sh clean
229+
</command>
230+
<features>
231+
<feature>CRIU:required</feature>
232+
</features>
233+
<levels>
234+
<level>dev</level>
235+
</levels>
236+
<groups>
237+
<group>external</group>
238+
</groups>
239+
</test>
155240
<test>
156241
<testCaseName>criu_pingPerf_pullImagePrivilegedRestore_ubi8</testCaseName>
157242
<command>$(TEST_ROOT)/external/criu/pingPerf.sh pullImagePrivilegedRestore "ubi" "8" "$(DOCKER_REGISTRY_DIR)"; \
@@ -184,4 +269,20 @@
184269
<group>external</group>
185270
</groups>
186271
</test>
272+
<test>
273+
<testCaseName>criu_pingPerf_pullImagePrivilegedRestore_ubi10</testCaseName>
274+
<command>$(TEST_ROOT)/external/criu/pingPerf.sh pullImagePrivilegedRestore "ubi" "10" "$(DOCKER_REGISTRY_DIR)"; \
275+
$(TEST_STATUS); \
276+
$(TEST_ROOT)/external/criu/pingPerf.sh clean
277+
</command>
278+
<features>
279+
<feature>CRIU:required</feature>
280+
</features>
281+
<levels>
282+
<level>dev</level>
283+
</levels>
284+
<groups>
285+
<group>external</group>
286+
</groups>
287+
</test>
187288
</playlist>

0 commit comments

Comments
 (0)