RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1672516 - [RFE] sosreport shouldn't execute sssctl if sssd isn't running
Summary: [RFE] sosreport shouldn't execute sssctl if sssd isn't running
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos
Version: 7.6
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Pavel Moravec
QA Contact: Miroslav Hradílek
URL:
Whiteboard:
Depends On:
Blocks: 1122832 1784466
TreeView+ depends on / blocked
 
Reported: 2019-02-05 08:23 UTC by Oliver Falk
Modified: 2023-12-15 16:19 UTC (History)
11 users (show)

Fixed In Version: sos-3.9-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 20:55:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sosreport sos pull 1932 0 None closed [sssd] call sssctl commands only when sssd service is running 2020-06-30 12:08:35 UTC
Red Hat Product Errata RHEA-2020:4034 0 None None None 2020-09-29 20:55:50 UTC

Description Oliver Falk 2019-02-05 08:23:14 UTC
Description of problem:
sosreport plugin sssd is running into a timeout, if sssd isn't running:

    [plugin:sssd] command 'sssctl domain-list' timed out after 300s

Version-Release number of selected component (if applicable): 3.6


How reproducible: Always


Steps to Reproduce:
1. Install sssd-tools
2. Stop sssd (if running)
3. Run sosreport

Actual results:
sosreport plugin sssd times out if sssd isn't running.


Expected results:
sosreport plugin sssd shouldn't run sssctl if sssd isn't running. While it's safe, it takes 5 minutes longer (300 second timeout) and it prints out an error (see description).

The reason is, that sssctl checks if sssd is running or not and awaits input on stdin (yes/no). Either check upfront if sssd is running and if not, do not execute sssctl or simply run it with echo "no" | sssctl.

Additional info:
Customer case will be linked in a hurry.

Link to the line in question: https://github.com/sosreport/sos/blob/d579fb745de0130132beea214edf85e597ffc54d/sos/plugins/sssd.py#L33

Comment 3 Bryn M. Reeves 2019-02-05 10:22:04 UTC
> do not execute sssctl or simply run it with echo "no" | sssctl.

Ugh, really? It doesn't provide any command line argument or environment setting to override this?

Comment 4 Oliver Falk 2019-02-05 10:25:48 UTC
Bryn,
 thanks for getting back to me on this case.

There is only one option, namely to _start_ it:

    # sssctl domain-list --help
    Usage: sssctl domain-list [OPTIONS...]

    Command options:
      -s, --start       Start SSSD if it is not running
      -v, --verbose     Show domain list including primary or trusted domain type

    Help options:
      -?, --help        Show this help message
      --usage           Display brief usage message

But I don't think we want to automatically start sssd upon running sosreport.

Yes, I know, echo-ing something is ugly, but I don't see any better option ATM.

Oliver

Comment 5 Bryn M. Reeves 2019-02-05 11:58:24 UTC
I've spoken to one of the SSSD developers, and they would be happy to look at a request to add a --nostart option or similar. I'll open a bug.

Comment 6 Oliver Falk 2019-02-05 12:18:18 UTC
Hi Bryn!

Thanks for the update and _many_ thanks for reaching out to the SSSD developers. Since SSSD is a critical part of the system, I'm pretty sure we'll have to wait quite a while until we get this down into our product(s). While I highly appreciate adding this option as a middle-term goal, I'd prefer to get a workaround into sos sooner. Do you think that is feasible? 

Oliver

Comment 7 Bryn M. Reeves 2019-02-05 12:25:24 UTC
I'd rather not start adding hacks until we at least know what sort of schedule we are talking about. Once we add them it is very hard to ever remove them, and this is a pretty clear deficiency in another component. Once we have had a proper discussion with the SSSD folks and agree a solution then we can consider whether to do anything else here.

Comment 8 Oliver Falk 2019-02-05 12:37:04 UTC
Ack Bryn. I understand.
Please keep me posted on this issue!

Oliver

Comment 9 Pavel Moravec 2019-02-18 21:23:16 UTC
(In reply to Bryn M. Reeves from comment #5)
> I've spoken to one of the SSSD developers, and they would be happy to look
> at a request to add a --nostart option or similar. I'll open a bug.

Hi Bryn,
is there a BZ for that? Or potential ETA of sssd fix known?

Comment 10 Pavel Moravec 2019-03-29 11:33:37 UTC
Scope of 7.7 closed, rescheduling for potential inclusion in 7.8.

Comment 11 Pavel Moravec 2019-08-08 07:48:24 UTC
(In reply to Pavel Moravec from comment #9)
> (In reply to Bryn M. Reeves from comment #5)
> > I've spoken to one of the SSSD developers, and they would be happy to look
> > at a request to add a --nostart option or similar. I'll open a bug.
> 
> Hi Bryn,
> is there a BZ for that? Or potential ETA of sssd fix known?

Kindly requesting this needinfo ;-)

Comment 12 Pavel Moravec 2020-02-04 14:19:24 UTC
Oliver,
would it work if we collect ssctl _only_ when service sssd is running?

Sosreport has recenty added a support for that via presets (cf. e.g. https://github.com/sosreport/sos/blob/master/sos/plugins/__init__.py#L196).

If so, we can call in https://github.com/sosreport/sos/blob/master/sos/plugins/sssd.py#L31 :

self.add_cmd_output("sssctl config-check", pred=SoSPredicate(self, services=["sssd"])))

(and similarly to the "sssctl domain-list" command)

Comment 13 Oliver Falk 2020-02-04 14:38:30 UTC
As discussed, yes, I do agree that exactly this makes sense; Only run sss* commands if sssd is running.

Thanks,
 Oliver

Comment 14 Pavel Moravec 2020-02-04 15:16:18 UTC
Thanks for confirmation, trivial upstream PR raised.

Comment 18 Pavel Moravec 2020-05-01 15:26:30 UTC
FYI this will be in RHEL7.9 as the upstream fix https://github.com/sosreport/sos/commit/1070f6e is contained in 3.9-1 that we will rebase to in 7.9 (I expect).

Comment 28 errata-xmlrpc 2020-09-29 20:55:10 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 (sos 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-2020:4034


Note You need to log in before you can comment on or make changes to this bug.