1
0
Fork 0

beakerlib: fix systemd rate limiting for variables-support-in-profiles

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2022-03-15 00:31:00 +01:00
parent dc8808cb39
commit e0deb1bdaf
No known key found for this signature in database
GPG key ID: D8E1C00E076E840B

View file

@ -22,12 +22,14 @@ PACKAGE="tuned"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlFileBackup --clean /etc/systemd/system.conf.d
rlRun "mkdir -p /etc/systemd/system.conf.d"
rlRun "echo -e '[Manager]\nDefaultStartLimitInterval=0' > /etc/systemd/system.conf.d/tuned.conf" 0 "Disable systemd rate limiting"
rlRun "systemctl daemon-reload"
rlImport "tuned/basic"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
sleep 2
rlServiceStart "tuned"
sleep 2
tunedProfileBackup
rlFileBackup "/usr/lib/tuned/balanced/tuned.conf"
@ -56,8 +58,8 @@ vm.swappiness = \${SWAPPINESS2}
rlRun "sysctl vm.swappiness=$OLD_SWAPPINESS"
rlFileRestore
tunedProfileRestore
sleep 2
rlServiceRestore "tuned"
rlRun "systemctl daemon-reload"
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd