Skip to content

Commit

Permalink
Add a fix in setup
Browse files Browse the repository at this point in the history
Signed-off-by: Yariv Rachmani <[email protected]>
  • Loading branch information
Yarboa committed Dec 20, 2023
1 parent 3201261 commit 1db9131
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
5 changes: 4 additions & 1 deletion plans/e2e/ffi.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ provision:
how: local

adjust:
- when: run == manual
environment+:
USE_QM_COPR: yes
- when: scenario == ffi and distro == centos-stream-9, fedora
prepare+:
- name: Install rpms
how: install
Expand All @@ -23,7 +27,6 @@ adjust:
script: |
cd tests/e2e
./set-ffi-env-e2e --set-qm-disk-part=yes
when: scenario == ffi and distro == centos-stream-9, fedora

execute:
how: tmt
Expand Down
6 changes: 4 additions & 2 deletions plans/e2e/tier-0.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ provision:
how: local

adjust:
- when: scenario == manual
- when: run == manual
environment+:
USE_QM_COPR: yes
prepare+:
- name: Prepare Repos
- name: Prepare QM Repos
how: shell
order: 10
script: |
Expand Down
18 changes: 11 additions & 7 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ INSTALLDIR="/usr/share/qm"
ROOTFS="/usr/lib/qm/rootfs"
RWETCFS="/etc/qm"
RWVARFS="/var/qm"
TMP_QM_IMG_DIR="tmp-img-dir"
TMP_QM_IMG_DIR="tmp.images"
AGENT_HOSTNAME="$(hostname)"
AGENTCONF="/etc/bluechi/agent.conf.d/agent.conf"
QM_CONTAINER_IDS=1000000000:1500000000
Expand Down Expand Up @@ -98,12 +98,16 @@ storage() {
touch "${ROOTFS}/var/lib/shared/overlay-images/images.lock" \
"${ROOTFS}/var/lib/shared/overlay-layers/layers.lock"

sed -e '/additionalimage.*/a "/var/lib/shared",' \
-e 's|^#.*transient_store.*|transient_store=true|g' \
"${ROOTFS}/usr/share/containers/storage.conf" \
> "${ROOTFS}/etc/containers/storage.conf"
sed -i "s|^#env = \[\]|env = \[\"TMPDIR=/var/${TMP_QM_IMG_DIR}\"\]|" \
"${ROOTFS}/usr/share/containers/containers.conf"
sed -e '/additionalimage.*/,/]/s/^#//g' \
-e '/additionalimages.*/{n;s/.*/\"\/var\/lib\/shared\",/;}' \
-e 's|^#.*transient_store.*|transient_store=true|g' \
/"${ROOTFS}/usr/share/containers/storage.conf" \
> "${ROOTFS}/etc/containers/storage.conf"

if ! grep -q "env" "${ROOTFS}/etc/containers/containers.conf"; then
echo "env = [\"TMPDIR=/var/${TMP_QM_IMG_DIR}\"]" \
>> "${ROOTFS}/etc/containers/containers.conf"
fi
fi
}

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/lib/container
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ setup_node() {
# copy control as template to node${number}
cp ./lib/ContainerFile.template ContainerFile.node"${nodeID}"
if_error_exit "failed to copy ContainerFile control template to node!"
if [ -n ${use_qm-copr} ]; then
if [ -n ${use_qm_copr} ]; then
sed -e 's/crb/&\nRUN dnf -y copr enable rhcontainerbot\/qm centos-stream-9/' -i ContainerFile.node"${nodeID}"
if_error_exit "failed to sed ContainerFile node template!"
fi
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/run-test-e2e
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
# along with this program; If not, see <http://www.gnu.org/licenses/>.
#
# Capture the start time
set -vx

START_TIME=$(date +%s)
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
Expand Down

0 comments on commit 1db9131

Please sign in to comment.