From ba4278d6cd3e9f5d7797491e332bcb50494d73d9 Mon Sep 17 00:00:00 2001 From: Yariv Rachmani Date: Thu, 11 Jan 2024 08:46:51 +0200 Subject: [PATCH] Updating setup for debug Going back to check epel build here Signed-off-by: Yariv Rachmani --- .packit.yaml | 11 ++++++----- rpm/qm.spec | 11 +++++++++++ setup | 5 ++++- tests/e2e/set-ffi-env-e2e | 2 +- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index d2228f7a..b2e029a6 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -65,8 +65,7 @@ jobs: identifier: e2e-tiers tmt_plan: /plans/e2e/tier-0 targets: - epel-9-x86_64: - distros: [centos-stream-9] + - epel-9-x86_64 tf_extra_params: environments: - hardware: @@ -79,11 +78,13 @@ jobs: identifier: e2e-ffi tmt_plan: /plans/e2e/ffi targets: - epel-9-x86_64: - distros: [centos-stream-9] + - epel-9-x86_64 tf_extra_params: environments: - - tmt: + - artifacts: + - type: repository-file + id: https://copr.fedorainfracloud.org/coprs/g/centos-automotive-sig/bluechi-snapshot/repo/centos-stream-$releasever-x86_64/ + tmt: context: scenario : "ffi" hardware: diff --git a/rpm/qm.spec b/rpm/qm.spec index ce3ef356..5ec64d9a 100644 --- a/rpm/qm.spec +++ b/rpm/qm.spec @@ -105,6 +105,17 @@ sed -i 's/^install: man all/install:/' Makefile %_format MODULES %{_datadir}/selinux/packages/$x.pp.bz2 %selinux_modules_install -s %{selinuxtype} $MODULES +# Set AllowedCPUs in quadlet file +NPROC=$(nproc) +if [[ $NPROC == 1 ]]; then + ALLOWED_CPUS=0 +elif [[ $NPROC == 2 ]]; then + ALLOWED_CPUS=1 +else + ALLOWED_CPUS=$(expr $NPROC / 2)"-"$(expr $NPROC - 1) +fi +sed "s/^AllowedCPUs=.*/AllowedCPUs=$ALLOWED_CPUS/" %{_datadir}/containers/systemd/%{name}.container > %{_sysconfdir}/containers/systemd/%{name}.container + %postun if [ $1 -eq 0 ]; then %selinux_modules_uninstall -s %{selinuxtype} %{modulenames} diff --git a/setup b/setup index 3c97fe2b..a87c2892 100755 --- a/setup +++ b/setup @@ -1,4 +1,4 @@ -#! /bin/bash -e +#! /bin/bash # # This setup script will install an OS environment by default into # /usr/lib/qm/rootfs and create a Podman quadlet containerized environment @@ -262,6 +262,9 @@ case "$1" in if [ "$SYSTEMCTL_SKIP" == "N" ]; then systemctl daemon-reload systemctl start qm.service + journalctl -xeu qm.service + ls -laZ /var/lib/containers/ + grep -E -v '\#|^$' /etc/containers/storage.conf else /usr/libexec/podman/quadlet /run/systemd/generator/ fi diff --git a/tests/e2e/set-ffi-env-e2e b/tests/e2e/set-ffi-env-e2e index ca2e01db..707b6229 100755 --- a/tests/e2e/set-ffi-env-e2e +++ b/tests/e2e/set-ffi-env-e2e @@ -190,7 +190,7 @@ install_qm_rpms() { else dnf copr enable -y "${USE_QM_COPR}" centos-stream-9 fi - dnf install -y bluechi-ctl bluechi-agent bluechi qm podman hostname + dnf install -y bluechi-ctl bluechi-agent podman hostname qm } setup_qm_services() {