Merge "Stop "dnf makecache" in the amphora images"
This commit is contained in:
commit
157ad64c66
@ -444,6 +444,11 @@ if [ "$AMP_ENABLE_FULL_MAC_SECURITY" -ne 1 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disable the dnf makecache timer
|
||||
if [ "${AMP_BASEOS}" = "centos-minimal" ] || [ "${AMP_BASEOS}" = "fedora" ] || [ "${AMP_BASEOS}" = "rhel" ]; then
|
||||
AMP_element_sequence="$AMP_element_sequence disable-makecache"
|
||||
fi
|
||||
|
||||
if [ "${AMP_BASEOS}" = "centos-minimal" ]; then
|
||||
export DIB_YUM_MINIMAL_CREATE_INTERFACES=0
|
||||
fi
|
||||
|
6
elements/disable-makecache/README.rst
Normal file
6
elements/disable-makecache/README.rst
Normal file
@ -0,0 +1,6 @@
|
||||
This element disables the dnf makecache hourly timer.
|
||||
|
||||
The amphora typically do not have internet access nor access to DNS servers.
|
||||
We want to disable this makecache timer to stop the amphora from attempting
|
||||
to update/download the dnf cache every hour. Without this element it will
|
||||
run and log a failure every hour.
|
18
elements/disable-makecache/post-install.d/80-disable-makecache
Executable file
18
elements/disable-makecache/post-install.d/80-disable-makecache
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
case $DISTRO_NAME in
|
||||
fedora | centos* | rhel* )
|
||||
systemctl disable dnf-makecache.timer || true
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: Unsupported distribution $DISTRO_NAME"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
2
elements/disable-makecache/svc-map
Normal file
2
elements/disable-makecache/svc-map
Normal file
@ -0,0 +1,2 @@
|
||||
disable-makecache:
|
||||
default: disable-makecache
|
Loading…
x
Reference in New Issue
Block a user