Skip to content

Adding c10s repo #837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 28 additions & 21 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,18 @@ jobs:
tf_extra_params:
environments:
- artifacts:
- &bluechi_copr_repo
type: repository-file
id: https://copr.fedorainfracloud.org/coprs/g/centos-automotive-sig/bluechi-snapshot/repo/centos-stream-9
- &bluechi_copr_repo_fedora
type: repository-file
id: https://copr.fedorainfracloud.org/coprs/g/centos-automotive-sig/bluechi-snapshot/repo/fedora
- &bluechi_copr_repo_c9s
type: repository-file
id: https://copr.fedorainfracloud.org/coprs/g/centos-automotive-sig/bluechi-snapshot/repo/centos-stream-9
- &bluechi_copr_repo_c10s
type: repository-file
id: https://copr.fedorainfracloud.org/coprs/g/centos-automotive-sig/bluechi-snapshot/repo/centos-stream-10
- &bluechi_copr_repo_fedora
type: repository-file
id: https://copr.fedorainfracloud.org/coprs/g/centos-automotive-sig/bluechi-snapshot/repo/fedora
hardware:
disk:
- size: ">= 20 GB"
- size: ">= 20 GB"


- job: tests
Expand All @@ -78,49 +81,53 @@ jobs:
tmt_plan: /plans/e2e/ffi
targets:
- epel-9-x86_64
- epel-10-x86_64
tf_extra_params:
environments:
- artifacts:
- *bluechi_copr_repo
- *bluechi_copr_repo_c9s
- *bluechi_copr_repo_c10s
tmt:
context:
scenario : "ffi"
scenario: "ffi"
hardware:
disk:
- size: ">= 20 GB"
- size: ">= 20 GB"
- size: ">= 20 GB"
- size: ">= 20 GB"

- job: tests
trigger: pull_request
identifier: qm-tier-0
tmt_plan: /plans/e2e/tier-0
targets:
- epel-9-x86_64
- epel-10-x86_64
tf_extra_params:
environments:
- artifacts:
- *bluechi_copr_repo
- *bluechi_copr_repo_c9s
- *bluechi_copr_repo_c10s
hardware:
disk:
- size: ">= 20 GB"
- size: ">= 20 GB"

- job: tests
trigger: pull_request
identifier: kvm-tier-0
tmt_plan: /plans/e2e/kvm-tier-0
targets:
# TBF: fedora-latest -eq 42 no published to public-tf
- fedora-41
- fedora-42
- epel-9-x86_64
tf_extra_params:
environments:
- artifacts:
- *bluechi_copr_repo_fedora
- *bluechi_copr_repo_c9s
- *bluechi_copr_repo_fedora
hardware:
disk:
- size: ">= 20 GB"
- size: ">= 20 GB"
virtualization:
is-supported: true
is-supported: true

- job: tests
trigger: pull_request
Expand All @@ -130,9 +137,9 @@ jobs:
- epel-9-x86_64
tf_extra_params:
environments:
hardware:
disk:
- size: ">= 20 GB"
hardware:
disk:
- size: ">= 20 GB"


- job: propose_downstream
Expand Down
7 changes: 5 additions & 2 deletions plans/e2e/ffi.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ provision:
how: local

adjust:
- when: distro == centos-stream-9, fedora
- when: distro == centos-stream, fedora
environment+:
FFI_SETUP_OPTIONS: --set-qm-disk-part=yes
- when: distro == centos-stream-10
environment+:
LOCK_DISK_SPACE: 8G

- when: scenario == ffi
prepare+:
Expand All @@ -30,7 +33,7 @@ adjust:
cp tests/ffi/common/ffi-qm.container /etc/qm/containers/systemd/

execute:
how: tmt
how: tmt

report:
how: junit
2 changes: 1 addition & 1 deletion plans/e2e/multi-bluechi-agents.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ provision:
how: local

adjust:
- when: distro == centos-stream-9 or distro == fedora
- when: distro == centos-stream or distro == fedora
prepare+:
- name: Prepare Repos
how: shell
Expand Down
2 changes: 1 addition & 1 deletion plans/e2e/tier-1.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ adjust:
podman run --replace -d --name autosd \
--privileged \
quay.io/centos-sig-automotive/autosd:latest
when: distro == centos-stream-9 or distro == fedora
when: distro == centos-stream ,fedora

execute:
how: tmt
Expand Down
2 changes: 1 addition & 1 deletion plans/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ adjust:
# Sample code to use manual packit repo
PACKIT_COPR_PROJECT: packit/containers-qm-291

- when: distro == centos-stream-9, fedora
- when: distro == centos-stream,fedora
environment+:
CS_DISTRO: $@distro
3 changes: 2 additions & 1 deletion setup
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,11 @@ install() {
fi
# check if "${ROOTFS}"/etc/yum.repos.d/autosd.repo
if test ! -f "${ROOTFS}"/etc/yum.repos.d/autosd.repo; then
VERSION_ID=$(grep -oP '(?<=^VERSION_ID=)\w+' <<< "$(tr -d '"' < /etc/os-release)")
cat > "${ROOTFS}"/etc/yum.repos.d/autosd.repo << EOF
[autosd]
name=Automotive-Sig \$releasever
baseurl=https://autosd.sig.centos.org/AutoSD-9/nightly/repos/AutoSD/compose/AutoSD/\$basearch/os
baseurl=https://autosd.sig.centos.org/AutoSD-$VERSION_ID/nightly/repos/AutoSD/compose/AutoSD/\$basearch/os
enabled=1
gpgcheck=0
EOF
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/lib/repoutils
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ install_autosd_repo() {
# Arguments: #
# None #
###########################################################################

VERSION_ID=$(grep -oP '(?<=^VERSION_ID=)\w+' <<< "$(tr -d '"' < /etc/os-release)")
touch /etc/yum.repos.d/autosd.repo
cat > "/etc/yum.repos.d/autosd.repo" << EOF
[autosd]
name=Automotive-Sig \$releasever
baseurl=https://autosd.sig.centos.org/AutoSD-9/nightly/repos/AutoSD/compose/AutoSD/\$basearch/os
baseurl=https://autosd.sig.centos.org/AutoSD-$VERSION_ID/nightly/repos/AutoSD/compose/AutoSD/\$basearch/os
enabled=1
gpgcheck=0
EOF
Expand Down
9 changes: 6 additions & 3 deletions tests/ffi/agent-flood/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,12 @@ else
exit 1
fi

#Stop QM bluechi-agent
exec_cmd "podman exec -it qm /bin/bash -c \
\"systemctl stop bluechi-agent\""
#Stop QM bluechi-agent once bluechi-agent is up
qm_node=$(bluechictl status | grep qm | cut -d'|' -f1)
if timeout 30 sh -c "until bluechictl status $qm_node bluechi-agent.service >/dev/null; do sleep 5; done"; then
info_message "PASS: bluechi-agent.service is online on $qm_node.";
exec_cmd 'podman exec -it qm sh -c "systemctl stop bluechi-agent"'
fi

#Prepare quadlet files for testing containers
setup_test_containers_in_qm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ check_run_systemd_journal_socket_inode_number(){

# Get inode number of /run/systemd/journal/socket inside and outside of the QM partition.
inode_number_in_host=$(stat --printf='%i' /run/systemd/journal/socket)
inode_number_in_qm=$(podman exec qm stat --printf='%i' /run/systemd/journal/socket)
inode_number_in_qm=$(podman exec qm sh -c "stat --printf='%i' /run/systemd/journal/socket")

# Check if the inode numbers inside and outside of the QM partition are different.
if [ "$inode_number_in_host" -eq "$inode_number_in_qm" ]; then
Expand All @@ -28,4 +28,4 @@ inode number inside and outside of the QM partition."
fi
}

check_run_systemd_journal_socket_inode_number
check_run_systemd_journal_socket_inode_number
3 changes: 2 additions & 1 deletion tests/ffi/disk/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ EOF
reload_config

running_container_in_qm
LOCK_DISK_SPACE=${LOCK_DISK_SPACE:-2G}
exec_cmd "podman exec -it qm /bin/bash -c \
'podman exec -it ffi-qm ./QM/file-allocate'"

if ! eval "fallocate -l 2G /root/file.lock" ; then
if ! eval "fallocate -l ${LOCK_DISK_SPACE} /root/file.lock" ; then
info_message "FAIL: No space left on device."
podman exec -it qm /bin/bash -c 'podman rmi -i -f --all; echo $?'
exit 1
Expand Down
Loading