mirror of
https://github.com/containers/podman.git
synced 2025-06-03 12:17:13 +08:00
Cirrus: Disable most periodic services/timers
For CI testing, it's important to remove as much variability from the overall system as possible. This permits focusing just on problems closely related to code-changes. To this end, and because VMs are very short-lived (2 hours at most), disable all systemd services and timers which perform periodic activities. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -350,6 +350,20 @@ remove_packaged_podman_files(){
|
||||
done
|
||||
}
|
||||
|
||||
systemd_banish(){
|
||||
echo "Disabling periodic services that could destabalize testing:"
|
||||
set +e # Not all of these exist on every platform
|
||||
for unit in cron atd apt-daily-upgrade apt-daily fstrim motd-news systemd-tmpfiles-clean
|
||||
do
|
||||
ooe.sh sudo systemctl stop $unit
|
||||
ooe.sh sudo systemctl disable $unit
|
||||
ooe.sh sudo systemctl disable $unit.timer
|
||||
ooe.sh sudo systemctl mask $unit
|
||||
ooe.sh sudo systemctl mask $unit.timer
|
||||
done
|
||||
set -e
|
||||
}
|
||||
|
||||
_finalize(){
|
||||
set +e # Don't fail at the very end
|
||||
set +e # make errors non-fatal
|
||||
|
@ -27,6 +27,9 @@ ooe.sh systemctl enable rngd
|
||||
echo "Setting cloud-init service to start after google-network-daemon.service"
|
||||
cp -v $GOSRC/$PACKER_BASE/cloud-init/fedora/cloud-init.service /etc/systemd/system/
|
||||
|
||||
# Ensure there are no disruptive periodic services enabled by default in image
|
||||
systemd_banish
|
||||
|
||||
rh_finalize
|
||||
|
||||
echo "SUCCESS!"
|
||||
|
@ -76,6 +76,9 @@ ooe.sh sudo dnf install -y \
|
||||
xz \
|
||||
zip
|
||||
|
||||
# Ensure there are no disruptive periodic services enabled by default in image
|
||||
systemd_banish
|
||||
|
||||
sudo /tmp/libpod/hack/install_catatonit.sh
|
||||
|
||||
rh_finalize
|
||||
|
@ -100,6 +100,9 @@ ooe.sh sudo update-grub
|
||||
sudo /tmp/libpod/hack/install_catatonit.sh
|
||||
ooe.sh sudo make -C /tmp/libpod install.libseccomp.sudo
|
||||
|
||||
# Ensure there are no disruptive periodic services enabled by default in image
|
||||
systemd_banish
|
||||
|
||||
ubuntu_finalize
|
||||
|
||||
echo "SUCCESS!"
|
||||
|
Reference in New Issue
Block a user