Skip to content

Commit

Permalink
Fix the GH CI after systemd removal from setup scripts.
Browse files Browse the repository at this point in the history
Since more scripts have been changed those need to be mounted. We also
need to start postgresql and ssh as systemd services to emulate the second
container start of a real install.
  • Loading branch information
cbosdo committed Jan 23, 2025
1 parent 2024f09 commit 6fadc7c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testsuite/podman_runner/00_setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ -z "${UYUNI_VERSION}" ];then
fi

echo "Killing old containers"
containers="deblike_minion rhlike_minion sle_minion opensusessh server controller"
containers="auth_registry buildhost deblike_minion rhlike_minion sle_minion opensusessh server controller"
for i in ${containers};do
sudo -i podman kill ${i}
done
Expand All @@ -23,7 +23,7 @@ for i in ${containers};do
done

echo "Force remove containers"
containers="deblike_minion rhlike_minion sle_minion opensusessh server controller"
containers="auth_registry buildhost deblike_minion rhlike_minion sle_minion opensusessh server controller"
for i in ${containers};do
sudo -i podman rm ${i}
done
Expand Down
5 changes: 5 additions & 0 deletions testsuite/podman_runner/07_start_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
set -xe
src_dir=$(cd $(dirname "$0")/../.. && pwd -P)

setup_pm_path=`sudo -i podman run --rm -ti ghcr.io/$UYUNI_PROJECT/uyuni/ci-test-server-all-in-one-dev:$UYUNI_VERSION sh -c 'rpm -ql spacewalk-setup | grep Setup.pm' | tr -d '\r'`

sudo -i podman run --cap-add AUDIT_CONTROL --rm \
--tmpfs /run \
-v ${src_dir}/schema/spacewalk/spacewalk-schema-upgrade:/usr/bin/spacewalk-schema-upgrade \
Expand All @@ -18,6 +20,9 @@ sudo -i podman run --cap-add AUDIT_CONTROL --rm \
-v ${src_dir}/spacewalk/setup/share/tomcat_java_opts.conf:/etc/tomcat/conf.d/tomcat_java_opts.conf \
-v ${src_dir}/spacewalk/setup/share/tomcat_java_opts_suse.conf:/etc/tomcat/conf.d/tomcat_java_opts_suse.conf \
-v ${src_dir}/java/conf/default/rhn_taskomatic_daemon.conf:/usr/share/rhn/config-defaults/rhn_taskomatic_daemon.conf \
-v ${src_dir}/spacewalk/uyuni-setup-reportdb/bin/uyuni-setup-reportdb:/usr/bin/uyuni-setup-reportdb \
-v ${src_dir}/spacewalk/setup/bin/spacewalk-setup:/usr/bin/spacewalk-setup \
-v ${src_dir}/spacewalk/setup/lib/Spacewalk/Setup.pm:${setup_pm_path} \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
-v /tmp/testing:/tmp \
--cgroupns=host \
Expand Down
7 changes: 7 additions & 0 deletions testsuite/podman_runner/08_manager_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ for schema in "${available_schemas[@]}"; do
# Run the missing migrations and only those, to ensure no script is out of place
sudo -i podman exec server bash -c "/testsuite/podman_runner/run_db_migrations.sh ${schema_name} ${schema_version}"
done

sudo -i podman exec server su postgres -c "/usr/share/postgresql/postgresql-script stop"

# Start systemd services to emulate the second container start with systemd as PID1
sudo -i podman exec server systemctl start postgresql
sudo -i podman exec server systemctl start sshd
sudo -i podman exec server /usr/sbin/spacewalk-service restart

0 comments on commit 6fadc7c

Please sign in to comment.