Bug 1432112

Summary: sssctl config-check does not give any error when default configuration file is not present
Product: Red Hat Enterprise Linux 7 Reporter: Madhuri <mupadhye>
Component: sssdAssignee: SSSD Maintainers <sssd-maint>
Status: CLOSED ERRATA QA Contact: Madhuri <mupadhye>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: grajaiya, jhrozek, lslebodn, mkosek, mzidek, nsoman, pbrezina, sgoveas, tscherf
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: sssd-1.15.2-12.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 09:04:18 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 Madhuri 2017-03-14 14:31:53 UTC
Description of problem:
sssctl config-check does not give any error when default configuration file (sssd.conf) is not present.


Version-Release number of selected component (if applicable):
sssd-1.15.1-1.el7.x86_64.

How reproducible:
Always.


Steps to Reproduce:
1. yum install -y sssd sssd-tools.
2. Create sssd.conf.
3. Start sssd service.
4. Remove sssd.conf file.
5. Before restart of sssd, run sssctl config-check.

Actual results:
Not giving any error message when there is no sssd.conf file.


Expected results:
sssctl config-check should give the some error message when default configuration file is not present.

Comment 2 Lukas Slebodnik 2017-03-14 15:49:24 UTC
Upstream ticket:
https://pagure.io/SSSD/sssd/issue/3330

Comment 4 Lukas Slebodnik 2017-03-15 18:26:41 UTC
Is is not a regression.

Please remove regression keyword.

Comment 5 Madhuri 2017-03-16 06:04:01 UTC
Suppose I mistakenly removed default configuration file then

Error message for rhel7.3 is as below

# sssctl config-check

(Thu Mar 16 11:12:17:300084 2017) [sssd] [confdb_setup] (0x0010): ConfDB initialization has failed [1432158244]: Missing configuration file
(Thu Mar 16 11:12:17:300252 2017) [sssd] [sss_tool_confdb_init] (0x0010): Unable to setup ConfDB [1432158244]: Missing configuration file

but for rhel7.4, getting empty output.

Comment 6 Lukas Slebodnik 2017-03-16 06:45:13 UTC
(In reply to Madhuri from comment #5)
> Suppose I mistakenly removed default configuration file then
> 
> Error message for rhel7.3 is as below
> 
> # sssctl config-check
> 
> (Thu Mar 16 11:12:17:300084 2017) [sssd] [confdb_setup] (0x0010): ConfDB
> initialization has failed [1432158244]: Missing configuration file
> (Thu Mar 16 11:12:17:300252 2017) [sssd] [sss_tool_confdb_init] (0x0010):
> Unable to setup ConfDB [1432158244]: Missing configuration file
> 

This utility should not modify/touch file /var/lib/sss/db/config.ldb.
It was bug in "sssctl config-check"; that such debug messages were printed.
DEBUG messages cannot be translated and therefore should not be considered as expected output.

Comment 7 Lukas Slebodnik 2017-04-10 14:38:12 UTC
master:
* 955574eeb3a3b937abc3df150e9bbbb79b75c889

sssd-1-14:
* b35d7aa90b18ba544ba11fcabeb9662e38fb91fa

Comment 10 Madhuri 2017-05-16 06:23:11 UTC
Tested with 
sssd-1.15.2-29.el7.x86_64
sssd-tools-1.15.2-29.el7.x86_64

Steps followed during verification:
1. Install sssd and sssd-tools package.
2. Create sssd.conf.
3. Start sssd service.
4. Remove sssd.conf file.
5. Run # sssctl config-check.

#rm /etc/sssd/sssd.conf
rm: remove regular file ‘/etc/sssd/sssd.conf’? y

# sssctl config-check
File /etc/sssd/sssd.conf does not exist.

Comment 11 errata-xmlrpc 2017-08-01 09:04:18 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, 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-2017:2294