Skip to content

Commit a8e172b

Browse files
author
Kasturi Narra
committed
Add RHEL 10.0 support to bootc test scenarios
1 parent cce8a4f commit a8e172b

21 files changed

+993
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
start_image="rhel100-bootc-brew-${LATEST_RELEASE_TYPE}-with-optional"
6+
7+
# Currently, RHOAI is only available for x86_64
8+
check_platform() {
9+
local -r record_junit=${1:-false}
10+
11+
if [[ "${UNAME_M}" =~ aarch64 ]]; then
12+
if "${record_junit}"; then
13+
record_junit "setup" "scenario_create_vms" "SKIPPED"
14+
fi
15+
exit 0
16+
fi
17+
}
18+
19+
scenario_create_vms() {
20+
if ! does_image_exist "${start_image}"; then
21+
echo "Image '${start_image}' not found - skipping test"
22+
return 0
23+
fi
24+
25+
check_platform true
26+
27+
# Increased disk size because of the additional embedded images (especially OVMS which is ~3.5GiB)
28+
LVM_SYSROOT_SIZE=20480 prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}"
29+
launch_vm --boot_blueprint rhel100-bootc --vm_disksize 30
30+
}
31+
32+
scenario_remove_vms() {
33+
if ! does_image_exist "${start_image}"; then
34+
echo "Image '${start_image}' not found - skipping test"
35+
return 0
36+
fi
37+
38+
check_platform
39+
40+
remove_vm host1
41+
}
42+
43+
scenario_run_tests() {
44+
if ! does_image_exist "${start_image}"; then
45+
echo "Image '${start_image}' not found - skipping test"
46+
return 0
47+
fi
48+
49+
check_platform
50+
51+
run_tests host1 \
52+
suites/ai-model-serving/ai-model-serving-online.robot
53+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
start_image="rhel100-bootc-brew-${LATEST_RELEASE_TYPE}-with-optional"
6+
7+
scenario_create_vms() {
8+
if ! does_image_exist "${start_image}"; then
9+
echo "Image '${start_image}' not found - skipping test"
10+
return 0
11+
fi
12+
13+
prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}"
14+
launch_vm --boot_blueprint rhel100-bootc --network "${VM_DUAL_STACK_NETWORK}"
15+
}
16+
17+
scenario_remove_vms() {
18+
if ! does_image_exist "${start_image}"; then
19+
echo "Image '${start_image}' not found - skipping test"
20+
return 0
21+
fi
22+
23+
remove_vm host1
24+
}
25+
26+
scenario_run_tests() {
27+
if ! does_image_exist "${start_image}"; then
28+
echo "Image '${start_image}' not found - skipping test"
29+
return 0
30+
fi
31+
32+
local -r vmname=$(full_vm_name host1)
33+
# Valid IP addresses are the first two entries returned by manage-vm script.
34+
local -r vm_ip1=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | head -1)
35+
local -r vm_ip2=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | head -2 | tail -1)
36+
37+
run_tests host1 \
38+
--variable "USHIFT_HOST_IP1:${vm_ip1}" \
39+
--variable "USHIFT_HOST_IP2:${vm_ip2}" \
40+
suites/ipv6/dualstack.robot
41+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
start_image="rhel100-bootc-brew-${LATEST_RELEASE_TYPE}-with-optional"
6+
7+
scenario_create_vms() {
8+
if ! does_image_exist "${start_image}"; then
9+
echo "Image '${start_image}' not found - skipping test"
10+
return 0
11+
fi
12+
13+
prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}"
14+
launch_vm --boot_blueprint rhel100-bootc --vm_disksize 30
15+
}
16+
17+
scenario_remove_vms() {
18+
if ! does_image_exist "${start_image}"; then
19+
echo "Image '${start_image}' not found - skipping test"
20+
return 0
21+
fi
22+
23+
remove_vm host1
24+
}
25+
26+
scenario_run_tests() {
27+
if ! does_image_exist "${start_image}"; then
28+
echo "Image '${start_image}' not found - skipping test"
29+
return 0
30+
fi
31+
32+
run_ginkgo_tests host1 "~Disruptive"
33+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
# Redefine network-related settings to use the dedicated IPv6 network bridge
6+
# shellcheck disable=SC2034 # used elsewhere
7+
VM_BRIDGE_IP="$(get_vm_bridge_ip "${VM_IPV6_NETWORK}")"
8+
# shellcheck disable=SC2034 # used elsewhere
9+
WEB_SERVER_URL="http://[${VM_BRIDGE_IP}]:${WEB_SERVER_PORT}"
10+
11+
start_image="rhel100-bootc-brew-${LATEST_RELEASE_TYPE}-with-optional"
12+
13+
scenario_create_vms() {
14+
# Enable IPv6 single stack in kickstart
15+
if ! does_image_exist "${start_image}"; then
16+
echo "Image '${start_image}' not found - skipping test"
17+
return 0
18+
fi
19+
20+
# Using `hostname` here instead of a raw ip because skopeo only allows either
21+
# ipv4 or fqdn's, but not ipv6. Since the registry is hosted on the ipv6
22+
# network gateway in the host, we need to use a combination of the hostname
23+
# plus /etc/hosts resolution (which is taken care of by kickstart).
24+
# Save the original value and temporarily override for prepare_kickstart
25+
local original_mirror_registry_url="${MIRROR_REGISTRY_URL}"
26+
MIRROR_REGISTRY_URL="$(hostname):${MIRROR_REGISTRY_PORT}/microshift"
27+
prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}" false true
28+
MIRROR_REGISTRY_URL="${original_mirror_registry_url}"
29+
launch_vm --boot_blueprint rhel100-bootc --network "${VM_IPV6_NETWORK}"
30+
}
31+
32+
scenario_remove_vms() {
33+
if ! does_image_exist "${start_image}"; then
34+
echo "Image '${start_image}' not found - skipping test"
35+
return 0
36+
fi
37+
38+
remove_vm host1
39+
}
40+
41+
scenario_run_tests() {
42+
if ! does_image_exist "${start_image}"; then
43+
echo "Image '${start_image}' not found - skipping test"
44+
return 0
45+
fi
46+
47+
run_tests host1 suites/ipv6/singlestack.robot
48+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
3+
export SKIP_GREENBOOT=true
4+
export TEST_RANDOMIZATION=none
5+
6+
# Sourced from scenario.sh and uses functions defined there.
7+
8+
start_image="rhel100-bootc-brew-${LATEST_RELEASE_TYPE}-with-optional-tuned"
9+
10+
scenario_create_vms() {
11+
if ! does_image_exist "${start_image}"; then
12+
echo "Image '${start_image}' not found - skipping test"
13+
return 0
14+
fi
15+
16+
prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}" true
17+
launch_vm --boot_blueprint rhel100-bootc --vm_vcpus 6
18+
}
19+
20+
scenario_remove_vms() {
21+
if ! does_image_exist "${start_image}"; then
22+
echo "Image '${start_image}' not found - skipping test"
23+
return 0
24+
fi
25+
26+
remove_vm host1
27+
}
28+
29+
scenario_run_tests() {
30+
if ! does_image_exist "${start_image}"; then
31+
echo "Image '${start_image}' not found - skipping test"
32+
return 0
33+
fi
34+
# Should not be run immediately after creating VM because of
35+
# microshift-tuned rebooting the node to activate the profile.
36+
local -r start_time=$(date +%s)
37+
while true; do
38+
boot_num=$(run_command_on_vm host1 "sudo journalctl --list-boots --quiet | wc -l" || true)
39+
boot_num="${boot_num%$'\r'*}"
40+
if [[ "${boot_num}" -ge 2 ]]; then
41+
break
42+
fi
43+
if [ $(( $(date +%s) - start_time )) -gt 60 ]; then
44+
echo "Timed out waiting for VM having 2 boots"
45+
exit 1
46+
fi
47+
sleep 5
48+
done
49+
50+
# --exitonfailure because tests within suites are meant to be ordered,
51+
# so don't advance to next test if current failed.
52+
53+
run_tests host1 \
54+
--exitonfailure \
55+
suites/tuned/microshift-tuned.robot \
56+
suites/tuned/workload-partitioning.robot
57+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
start_image="rhel100-bootc-brew-${LATEST_RELEASE_TYPE}-with-optional"
6+
7+
scenario_create_vms() {
8+
if ! does_image_exist "${start_image}"; then
9+
echo "Image '${start_image}' not found - skipping test"
10+
return 0
11+
fi
12+
13+
prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}"
14+
# Using multus as secondary network to have 2 nics in different networks.
15+
launch_vm --boot_blueprint rhel100-bootc --network default,"${VM_MULTUS_NETWORK}"
16+
}
17+
18+
scenario_remove_vms() {
19+
if ! does_image_exist "${start_image}"; then
20+
echo "Image '${start_image}' not found - skipping test"
21+
return 0
22+
fi
23+
24+
remove_vm host1
25+
}
26+
27+
scenario_run_tests() {
28+
if ! does_image_exist "${start_image}"; then
29+
echo "Image '${start_image}' not found - skipping test"
30+
return 0
31+
fi
32+
33+
local -r vmname=$(full_vm_name host1)
34+
local -r vm_ip1=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | head -1)
35+
local -r vm_ip2=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | tail -1)
36+
37+
run_tests host1 \
38+
--variable "USHIFT_HOST_IP1:${vm_ip1}" \
39+
--variable "USHIFT_HOST_IP2:${vm_ip2}" \
40+
suites/network/multi-nic.robot
41+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
# Redefine network-related settings to use the dedicated network bridge
6+
VM_BRIDGE_IP="$(get_vm_bridge_ip "${VM_MULTUS_NETWORK}")"
7+
# shellcheck disable=SC2034 # used elsewhere
8+
WEB_SERVER_URL="http://${VM_BRIDGE_IP}:${WEB_SERVER_PORT}"
9+
10+
start_image="rhel100-bootc-brew-${LATEST_RELEASE_TYPE}-with-optional"
11+
12+
scenario_create_vms() {
13+
if ! does_image_exist "${start_image}"; then
14+
echo "Image '${start_image}' not found - skipping test"
15+
return 0
16+
fi
17+
18+
prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}"
19+
# Two nics - one for macvlan, another for ipvlan (they cannot enslave the same interface)
20+
launch_vm --boot_blueprint rhel100-bootc --network "${VM_MULTUS_NETWORK},${VM_MULTUS_NETWORK}"
21+
}
22+
23+
scenario_remove_vms() {
24+
if ! does_image_exist "${start_image}"; then
25+
echo "Image '${start_image}' not found - skipping test"
26+
return 0
27+
fi
28+
29+
remove_vm host1
30+
}
31+
32+
scenario_run_tests() {
33+
if ! does_image_exist "${start_image}"; then
34+
echo "Image '${start_image}' not found - skipping test"
35+
return 0
36+
fi
37+
38+
run_tests host1 \
39+
--variable "PROMETHEUS_HOST:$(hostname)" \
40+
--variable "PROMETHEUS_PORT:9092" \
41+
--variable "LOKI_HOST:$(hostname)" \
42+
--variable "LOKI_PORT:3200" \
43+
--variable "PROM_EXPORTER_PORT:8889" \
44+
suites/optional/
45+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
start_image="rhel100-bootc-brew-${LATEST_RELEASE_TYPE}-with-optional"
6+
7+
scenario_create_vms() {
8+
if ! does_image_exist "${start_image}"; then
9+
echo "Image '${start_image}' not found - skipping test"
10+
return 0
11+
fi
12+
13+
prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}"
14+
launch_vm --boot_blueprint rhel100-bootc
15+
}
16+
17+
scenario_remove_vms() {
18+
if ! does_image_exist "${start_image}"; then
19+
echo "Image '${start_image}' not found - skipping test"
20+
return 0
21+
fi
22+
23+
remove_vm host1
24+
}
25+
26+
scenario_run_tests() {
27+
if ! does_image_exist "${start_image}"; then
28+
echo "Image '${start_image}' not found - skipping test"
29+
return 0
30+
fi
31+
32+
run_tests host1 \
33+
suites/osconfig/clusterid.robot \
34+
suites/osconfig/systemd-resolved.robot
35+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
start_image="rhel100-bootc-brew-${LATEST_RELEASE_TYPE}-with-optional"
6+
7+
scenario_create_vms() {
8+
if ! does_image_exist "${start_image}"; then
9+
echo "Image '${start_image}' not found - skipping test"
10+
return 0
11+
fi
12+
13+
prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}"
14+
launch_vm --boot_blueprint rhel100-bootc
15+
}
16+
17+
scenario_remove_vms() {
18+
if ! does_image_exist "${start_image}"; then
19+
echo "Image '${start_image}' not found - skipping test"
20+
return 0
21+
fi
22+
23+
remove_vm host1
24+
}
25+
26+
scenario_run_tests() {
27+
if ! does_image_exist "${start_image}"; then
28+
echo "Image '${start_image}' not found - skipping test"
29+
return 0
30+
fi
31+
32+
run_tests host1 \
33+
suites/router
34+
}

0 commit comments

Comments
 (0)