Bug 1672516
| Summary: | [RFE] sosreport shouldn't execute sssctl if sssd isn't running | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Oliver Falk <ofalk> |
| Component: | sos | Assignee: | Pavel Moravec <pmoravec> |
| Status: | CLOSED ERRATA | QA Contact: | Miroslav HradĂlek <mhradile> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.6 | CC: | agk, bmr, cww, jjansky, mhradile, ofalk, peter.vreman, plambri, pmoravec, pvlasin, sbradley |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | sos-3.9-2.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-09-29 20:55:10 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1122832, 1784466 | ||
> 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?
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
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! 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 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. Ack Bryn. I understand. Please keep me posted on this issue! Oliver (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? Scope of 7.7 closed, rescheduling for potential inclusion in 7.8. (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 ;-) 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) As discussed, yes, I do agree that exactly this makes sense; Only run sss* commands if sssd is running. Thanks, Oliver Thanks for confirmation, trivial upstream PR raised. 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). 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 |
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