Bug 1852659
Summary: | sssd service is starting even though it is disabled state [rhel-7.9.z] | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Divya Mittal <dmittal> |
Component: | sssd | Assignee: | Alexey Tikhonov <atikhono> |
Status: | CLOSED ERRATA | QA Contact: | shridhar <sgadekar> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 7.8 | CC: | atikhono, ddas, dlavu, grajaiya, jhrozek, jreznik, lslebodn, mzidek, pbrezina, sbose, sgoveas, spanjikk, thalman, tscherf |
Target Milestone: | rc | Keywords: | Triaged, ZStream |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | sync-to-jira qetodo | ||
Fixed In Version: | sssd-1.16.5-10.el7_9.6 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-12-15 11:22:17 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Divya Mittal
2020-07-01 03:16:51 UTC
Hi, the file '/var/tmp/sssd_is_running' is created during update in %pre and is removed in %posttrans. But if there are some issues during an update, maybe not even caused by an SSSD package, %posttrans might not be executed. A later update will see this file and will try to start SSSD in %posttrans even if it was not running before. To avoid such confusion the file '/var/tmp/sssd_is_running' should be removed in %pre before the check if it should be created or not. bye, Sumit (In reply to Sumit Bose from comment #2) > Hi, > > the file '/var/tmp/sssd_is_running' is created during update in %pre and is > removed in %posttrans. But if there are some issues during an update, maybe > not even caused by an SSSD package, %posttrans might not be executed. A > later update will see this file and will try to start SSSD in %posttrans > even if it was not running before. > > To avoid such confusion the file '/var/tmp/sssd_is_running' should be > removed in %pre before the check if it should be created or not. Something like this? ``` diff --git a/sssd.spec b/sssd.spec index 50e2eb2..e954eea 100644 --- a/sssd.spec +++ b/sssd.spec @@ -1130,6 +1130,7 @@ getent passwd sssd >/dev/null || useradd -r -g sssd -d / -s /sbin/nologin -c "Us %pre common getent group sssd >/dev/null || groupadd -r sssd getent passwd sssd >/dev/null || useradd -r -g sssd -d / -s /sbin/nologin -c "User for sssd" sssd +rm -f /var/tmp/sssd_is_running /bin/systemctl is-active --quiet sssd.service && touch /var/tmp/sssd_is_running || : %post common ``` Sumit, do you know why the code that works with `/var/tmp/sssd_is_running` was removed in RHEL8 sssd.spec? In RHEL8 it's just: ``` %posttrans common %systemd_postun_with_restart sssd.service ``` (In reply to Alexey Tikhonov from comment #3) > (In reply to Sumit Bose from comment #2) > > Hi, > > > > the file '/var/tmp/sssd_is_running' is created during update in %pre and is > > removed in %posttrans. But if there are some issues during an update, maybe > > not even caused by an SSSD package, %posttrans might not be executed. A > > later update will see this file and will try to start SSSD in %posttrans > > even if it was not running before. > > > > To avoid such confusion the file '/var/tmp/sssd_is_running' should be > > removed in %pre before the check if it should be created or not. > > Something like this? > ``` > diff --git a/sssd.spec b/sssd.spec > index 50e2eb2..e954eea 100644 > --- a/sssd.spec > +++ b/sssd.spec > @@ -1130,6 +1130,7 @@ getent passwd sssd >/dev/null || useradd -r -g sssd -d > / -s /sbin/nologin -c "Us > %pre common > getent group sssd >/dev/null || groupadd -r sssd > getent passwd sssd >/dev/null || useradd -r -g sssd -d / -s /sbin/nologin > -c "User for sssd" sssd > +rm -f /var/tmp/sssd_is_running > /bin/systemctl is-active --quiet sssd.service && touch > /var/tmp/sssd_is_running || : > > %post common > ``` Yes, exactly. > > Sumit, do you know why the code that works with `/var/tmp/sssd_is_running` > was removed in RHEL8 sssd.spec? > In RHEL8 it's just: > ``` > %posttrans common > %systemd_postun_with_restart sssd.service > ``` iirc it was added to handle an issue with updates from a version where the restart was in %postun. Since there is no such version in RHEL-8 it is not needed anymore. HTH bye, Sumit 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 (sssd 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/RHBA-2020:5459 |