Bug 2051575

Summary: Enable ipa-ccache-sweep.timer during server installation
Product: Red Hat Enterprise Linux 8 Reporter: Rob Crittenden <rcritten>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.6CC: frenaud, mvarun, rcritten, rjeffman, sumenon, tscherf
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: idm-DL1-8060020220210180711.92098735 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2051582 (view as bug list) Environment:
Last Closed: 2022-05-10 14:09:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2051582    

Description Rob Crittenden 2022-02-07 14:30:25 UTC
Cloned from upstream: https://pagure.io/freeipa/issue/9107

### Issue
Currently the ipa-ccache-sweep.timer is only enabled via the spec file when a server is already configured:
```
%posttrans server
# don't execute upgrade and restart of IPA when server is not installed
%{__python3} -c "import sys; from ipalib import facts; sys.exit(0 if facts.is_ipa_configured() else 1);" > /dev/null 2>&1

if [  $? -eq 0 ]; then
...
    /bin/systemctl is-enabled ipa-ccache-sweep.timer >/dev/null 2>&1
    if [  $? -eq 1 ]; then
        /bin/systemctl enable ipa-ccache-sweep.timer>/dev/null
    fi
fi
```
It should be explicitly enabled in the installer with: ```systemctl enable ipa-ccache-sweep.timer```

Noticed in 4.9.8 but this has been present since 4.9.0 when the feature was introduced.

Comment 1 Rob Crittenden 2022-02-07 14:38:46 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/9107

Comment 2 Rob Crittenden 2022-02-07 15:54:05 UTC
Upstream PR: https://github.com/freeipa/freeipa/pull/6168

Verification is, post-install on a fresh system:

/bin/systemctl is-enabled ipa-ccache-sweep.timer

Comment 10 Varun Mylaraiah 2022-02-23 18:09:49 UTC
Verified

ipa-server-4.9.8-6.module+el8.6.0+14224+4c38d4ea.x86_64

Passed	test_integration/test_installation.py::TestInstallMasterKRA::()::test_ipa_ccache_sweep_timer_enabled
------------------------------ Captured log call -------------------------------
transport.py               391 INFO     RUN ['systemctl', 'is-enabled', 'ipa-ccache-sweep.timer']
transport.py               513 DEBUG    RUN ['systemctl', 'is-enabled', 'ipa-ccache-sweep.timer']
transport.py               558 DEBUG    enabled
transport.py               217 DEBUG    Exit code: 0

test_integration/test_installation.py :: http://idm-artifacts.usersys.redhat.com/mvarun/trigger//3931/test-suite//report.html

Based on the test result, marking the bug VERIFIED.

Comment 12 errata-xmlrpc 2022-05-10 14:09:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (idm:client and idm:DL1 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:1884