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 1369443 - RFE: sssctl does not show exact file name having the error
Summary: RFE: sssctl does not show exact file name having the error
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sssd
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: pre-dev-freeze
: 8.1
Assignee: SSSD Maintainers
QA Contact: Steeve Goveas
URL:
Whiteboard:
Depends On: 1394205
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-23 12:44 UTC by Madhuri
Modified: 2020-05-02 18:28 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-24 09:42:12 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 4191 0 None open sssctl config-check does not show what file contains the problem 2020-08-07 07:45:51 UTC

Description Madhuri 2016-08-23 12:44:43 UTC
Description of problem: sssctl does not show the exact file name where the error is found? Error may be in any snippet file or in sssd.conf

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

How reproducible: Always

Steps to Reproduce:
1) Install sssd package
2) Install sssd-tools package
3) Create sssd.conf in /etc/sssd/
4) Create snippet files in /etc/sssd/conf.d/
5) Run sssctl config-check

[root@server ~]# cat /etc/sssd/sssd.conf

[sssd]
services = nss, pam
config_file_version = 2
domains = LDAP

[domain/LDAP]
ldap_search_base = dc=example,dc=com
offline_timeoutX =
id_provider = ldap
auth_provider = ldap
ldap_uri = ldap://server.example.com
ldap_id_use_start_tls = True
ldap_tls_cacert = /etc/openldap/certs/cacert.asc
debug_level = 10



[root@server ~]# cat /etc/sssd/conf.d/02_snippet_file.conf 
[domain/LDAP]
d_provider = ldap

After running # sssctl config-check gives output as follow:

[root@server ~]# sssctl config-check
Issues identified by validators: 2
[rule/allowed_domain_options]: Attribute 'offline_timeoutX' is not allowed in section 'domain/LDAP'. Check for typos.
[rule/allowed_domain_options]: Attribute 'd_provider' is not allowed in section 'domain/LDAP'. Check for typos.

Messages generated during configuration merging: 0

Used configuration snippet files: 3
/etc/sssd/conf.d/01_snippet_file.conf
/etc/sssd/conf.d/02_snippet_file.conf
/etc/sssd/conf.d/03_snippet_file.conf

After seeing the above output, it is not easy to find the file having the error? Validators function only checked the typos but did not show which typos were in which configuration file. It only gives the list of typos found.

Expected Result: It should give the name of configuration file causing the error message so it is easy to fix.

Comment 1 Lukas Slebodnik 2016-08-23 13:01:08 UTC
It's not a bug it's expected behaviour.

Because the validation is done after merging all snippets file together
So the information about files and lines are lost.
BTW. It's not too difficult for users to call grep and find typos.

Comment 3 Jakub Hrozek 2016-08-24 12:55:36 UTC
(In reply to Lukas Slebodnik from comment #1)
> It's not a bug it's expected behaviour.
> 
> Because the validation is done after merging all snippets file together
> So the information about files and lines are lost.
> BTW. It's not too difficult for users to call grep and find typos.

OK, I wasn't sure if this was totally not possible or just not implemented. Therefore I asked for this bug to be filed so we can ask Michal next week and let him close the bug or leave it open for future.

Comment 4 Lukas Slebodnik 2016-08-24 13:17:04 UTC
We can consider this ticket as RFE :-)

Comment 5 Jakub Hrozek 2016-08-25 08:41:11 UTC
Michal is this possible at all (so should we turn this bug into an RFE) or should we rather close it?

Comment 6 Michal Zidek 2016-08-26 09:23:13 UTC
We plan to add feature into sssctl that will print values of all configured options (only options that were explicitly configured, not default ones) together with their source file (snippet file or sssd.conf).

This is however not possible with the current version of libini. We will have to enhance it to store additional metadata during the parsing. When this is done, this RFE will be simple.

However we did not plan (in terms of milestones) the above feature yet.

Comment 7 Jakub Hrozek 2016-08-26 11:53:46 UTC
(In reply to Michal Zidek from comment #6)
> We plan to add feature into sssctl that will print values of all configured
> options (only options that were explicitly configured, not default ones)
> together with their source file (snippet file or sssd.conf).
> 
> This is however not possible with the current version of libini. We will
> have to enhance it to store additional metadata during the parsing. When
> this is done, this RFE will be simple.
> 
> However we did not plan (in terms of milestones) the above feature yet.

OK, can you file ticket(s) please?

Comment 8 Michal Zidek 2016-08-29 09:59:44 UTC
Upstream ticket:
https://fedorahosted.org/sssd/ticket/3158

Comment 9 Jakub Hrozek 2016-09-12 09:26:22 UTC
Upstream ticket:
https://fedorahosted.org/sssd/ticket/3158

Comment 12 Jakub Hrozek 2017-08-08 09:54:57 UTC
Since fixing this bug requires work in the upstream SSSD project which is not scheduled for the immediate future, I added a conditional development nack, pending upstream availability.

Comment 17 Tomas Halman 2020-04-24 09:42:12 UTC
Due to out limited capacity we are closing this BZ.


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