Bug 1507608 - ding-libs: libini_config: `ini_config_augment` reports errors on match failure
Summary: ding-libs: libini_config: `ini_config_augment` reports errors on match failure
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ding-libs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Zidek
QA Contact: Fedora Extras Quality Assurance
URL: https://pagure.io/SSSD/ding-libs/issu...
Whiteboard:
Depends On:
Blocks: 1505741 1507607
TreeView+ depends on / blocked
 
Reported: 2017-10-30 17:28 UTC by Robbie Harwood
Modified: 2017-11-21 23:33 UTC (History)
7 users (show)

Fixed In Version: ding-libs-0.6.1-36.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1507607
Environment:
Last Closed: 2017-11-21 23:33:49 UTC
Type: Bug


Attachments (Terms of Use)

Description Robbie Harwood 2017-10-30 17:28:44 UTC
+++ This bug was initially created as a clone of Bug #1507607 +++

When `ini_config_augment()` is called on a directory with a pattern supplied, `error_list` is populated with an entry for each file that does not match the pattern.

These not being errors and rather the point of passing a pattern at all, it seems incorrect to provide them here.  Calling programs (e.g., gssproxy) try to display the contents of the library errors to the user, which results in spurious messages like:

    Error when reading config directory: File /etc/gssproxy/gssproxy.conf did not match provided patterns. Skipping.

which is very confusing (including to systemd).

Comment 1 Fedora Update System 2017-11-14 16:29:59 UTC
ding-libs-0.6.1-35.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6c2757825c

Comment 2 Lukas Slebodnik 2017-11-15 16:28:26 UTC
ding-libs-0.6.1-35.fc27 broke backward compatibility and broke sssd integration test.

=================================== FAILURES ===================================
___________________________ test_show_user_override ____________________________
Traceback (most recent call last):
  File "/home/build/sssd/src/tests/intg/ldap_local_override_test.py", line 590, in test_show_user_override
    assert out == "user1@LDAP:ov_user1:10010:20010:Overriden User 1:"\
AssertionError: assert '[DEBUG]     ...user1_shell:\n' == 'user1@LDAP:ov...ser1_shell:\n'
  - [DEBUG]                        ini/ini_augment.c ( 519) ini_aug_preprare Entry
  - [DEBUG]                        ini/ini_augment.c ( 482) ini_aug_expand_path Entry
  - [DEBUG]                        ini/ini_augment.c ( 483) Input path /tmp/sssd-intg.boodn5bd/etc/sssd/conf.d
  - [DEBUG]                        ini/ini_augment.c ( 503) Output path /tmp/sssd-intg.boodn5bd/etc/sssd/conf.d
  - [DEBUG]                        ini/ini_augment.c ( 504) ini_aug_expand_path Exit
  - [DEBUG]                        ini/ini_augment.c ( 373) ini_aug_construct_list Entry
  - [DEBUG]                  ...
  
  ...Full output truncated (14 lines hidden), use '-vv' to show
---------------------------- Captured stdout setup -----------------------------
[DEBUG]                        ini/ini_augment.c ( 519) ini_aug_preprare Entry
[DEBUG]                        ini/ini_augment.c ( 482) ini_aug_expand_path Entry
[DEBUG]                        ini/ini_augment.c ( 483) Input path /tmp/sssd-intg.boodn5bd/etc/sssd/conf.d
[DEBUG]                        ini/ini_augment.c ( 503) Output path /tmp/sssd-intg.boodn5bd/etc/sssd/conf.d
[DEBUG]                        ini/ini_augment.c ( 504) ini_aug_expand_path Exit
[DEBUG]                        ini/ini_augment.c ( 373) ini_aug_construct_list Entry
[DEBUG]                        ini/ini_augment.c ( 146) ini_aug_regex_prepare Entry
[DEBUG]                        ini/ini_augment.c ( 165) Pattern: ^[^\.].*\.conf$
[DEBUG]                        ini/ini_augment.c ( 210) ini_aug_regex_prepare Exit
[DEBUG]                        ini/ini_augment.c ( 416) Processing .
[DEBUG]                        ini/ini_augment.c ( 416) Processing ..
[DEBUG]                        ini/ini_augment.c ( 125) regex_cleanup Entry
[DEBUG]                        ini/ini_augment.c ( 128) regex_cleanup Exit
[DEBUG]                        ini/ini_augment.c ( 308) ini_aug_sort_list Entry
[DEBUG]                        ini/ini_augment.c ( 472) ini_aug_construct_list Exit
[DEBUG]                        ini/ini_augment.c ( 545) ini_aug_preprare Exit
[DEBUG]                        ini/ini_augment.c ( 666) ini_aug_apply Entry
[DEBUG]                        ini/ini_augment.c ( 679) ini_aug_apply Exit
[DEBUG]                        ini/ini_augment.c ( 953) ini_config_augment Exit
SSSD needs to be restarted for the changes to take effect.
[DEBUG]                        ini/ini_augment.c ( 519) ini_aug_preprare Entry
[DEBUG]                        ini/ini_augment.c ( 482) ini_aug_expand_path Entry
[DEBUG]                        ini/ini_augment.c ( 483) Input path /tmp/sssd-intg.boodn5bd/etc/sssd/conf.d
[DEBUG]                        ini/ini_augment.c ( 503) Output path /tmp/sssd-intg.boodn5bd/etc/sssd/conf.d
[DEBUG]                        ini/ini_augment.c ( 504) ini_aug_expand_path Exit
[DEBUG]                        ini/ini_augment.c ( 373) ini_aug_construct_list Entry
[DEBUG]                        ini/ini_augment.c ( 146) ini_aug_regex_prepare Entry
[DEBUG]                        ini/ini_augment.c ( 165) Pattern: ^[^\.].*\.conf$
[DEBUG]                        ini/ini_augment.c ( 210) ini_aug_regex_prepare Exit
[DEBUG]                        ini/ini_augment.c ( 416) Processing .
[DEBUG]                        ini/ini_augment.c ( 416) Processing ..
[DEBUG]                        ini/ini_augment.c ( 125) regex_cleanup Entry
[DEBUG]                        ini/ini_augment.c ( 128) regex_cleanup Exit
[DEBUG]                        ini/ini_augment.c ( 308) ini_aug_sort_list Entry
[DEBUG]                        ini/ini_augment.c ( 472) ini_aug_construct_list Exit
[DEBUG]                        ini/ini_augment.c ( 545) ini_aug_preprare Exit
[DEBUG]                        ini/ini_augment.c ( 666) ini_aug_apply Entry
[DEBUG]                        ini/ini_augment.c ( 679) ini_aug_apply Exit
[DEBUG]                        ini/ini_augment.c ( 953) ini_config_augment Exit
___________________________ test_find_user_override ____________________________
Traceback (most recent call last):
  File "/home/build/sssd/src/tests/intg/ldap_local_override_test.py", line 624, in test_find_user_override
    assert set(out.splitlines()) == set(exp_usr_ovrd)
AssertionError: assert set(['[DEBUG]... Entry', ...]) == set(['user1@LD...ser2_shell:'])
  Extra items in the left set:
  '[DEBUG]                        ini/ini_augment.c ( 953) ini_config_augment Exit'
  '[DEBUG]                        ini/ini_augment.c ( 504) ini_aug_expand_path Exit'
  '[DEBUG]                        ini/ini_augment.c ( 482) ini_aug_expand_path Entry'
  '[DEBUG]                        ini/ini_augment.c ( 373) ini_aug_construct_list Entry'
  '[DEBUG]                        ini/ini_augment.c ( 472) ini_aug_construct_list Exit'
  '[DEBUG]                        ini/ini_augment.c ( 210) ini_aug_regex_prepare Exit'...
  
  ...Full output truncated (41 lines hidden), use '-vv' to show
---------------------------- Captured stdout setup -----------------------------
[DEBUG]                        ini/ini_augment.c ( 519) ini_aug_preprare Entry
[DEBUG]                        ini/ini_augment.c ( 482) ini_aug_expand_path Entry
[DEBUG]                        ini/ini_augment.c ( 483) Input path /tmp/sssd-intg.boodn5bd/etc/sssd/conf.d
[DEBUG]                        ini/ini_augment.c ( 503) Output path /tmp/sssd-intg.boodn5bd/etc/sssd/conf.d
[DEBUG]                        ini/ini_augment.c ( 504) ini_aug_expand_path Exit
[DEBUG]                        ini/ini_augment.c ( 373) ini_aug_construct_list Entry
[DEBUG]                        ini/ini_augment.c ( 146) ini_aug_regex_prepare Entry
[DEBUG]                        ini/ini_augment.c ( 165) Pattern: ^[^\.].*\.conf$
[DEBUG]                        ini/ini_augment.c ( 210) ini_aug_regex_prepare Exit
[DEBUG]                        ini/ini_augment.c ( 416) Processing .
[DEBUG]                        ini/ini_augment.c ( 416) Processing ..
[DEBUG]                        ini/ini_augment.c ( 125) regex_cleanup Entry
[DEBUG]                        ini/ini_augment.c ( 128) regex_cleanup Exit
[DEBUG]                        ini/ini_augment.c ( 308) ini_aug_sort_list Entry
[DEBUG]                        ini/ini_augment.c ( 472) ini_aug_construct_list Exit
[DEBUG]                        ini/ini_augment.c ( 545) ini_aug_preprare Exit
[DEBUG]                        ini/ini_augment.c ( 666) ini_aug_apply Entry
[DEBUG]                        ini/ini_augment.c ( 679) ini_aug_apply Exit
[DEBUG]                        ini/ini_augment.c ( 953) ini_config_augment Exit
SSSD needs to be restarted for the changes to take effect.
[DEBUG]                        ini/ini_augment.c ( 519) ini_aug_preprare Entry
[DEBUG]                        ini/ini_augment.c ( 482) ini_aug_expand_path Entry
[DEBUG]                        ini/ini_augment.c ( 483) Input path /tmp/sssd-intg.boodn5bd/etc/sssd/conf.d
[DEBUG]                        ini/ini_augment.c ( 503) Output path /tmp/sssd-intg.boodn5bd/etc/sssd/conf.d
[DEBUG]                        ini/ini_augment.c ( 504) ini_aug_expand_path Exit
[DEBUG]                        ini/ini_augment.c ( 373) ini_aug_construct_list Entry
[DEBUG]                        ini/ini_augment.c ( 146) ini_aug_regex_prepare Entry
[DEBUG]                        ini/ini_augment.c ( 165) Pattern: ^[^\.].*\.conf$
[DEBUG]                        ini/ini_augment.c ( 210) ini_aug_regex_prepare Exit
[DEBUG]                        ini/ini_augment.c ( 416) Processing .
[DEBUG]                        ini/ini_augment.c ( 416) Processing ..
[DEBUG]                        ini/ini_augment.c ( 125) regex_cleanup Entry
[DEBUG]                        ini/ini_augment.c ( 128) regex_cleanup Exit
[DEBUG]                        ini/ini_augment.c ( 308) ini_aug_sort_list Entry
[DEBUG]                        ini/ini_augment.c ( 472) ini_aug_construct_list Exit
[DEBUG]                        ini/ini_augment.c ( 545) ini_aug_preprare Exit
[DEBUG]                        ini/ini_augment.c ( 666) ini_aug_apply Entry
[DEBUG]                        ini/ini_augment.c ( 679) ini_aug_apply Exit
[DEBUG]                        ini/ini_augment.c ( 953) ini_config_augment Exit
==================== 2 failed, 240 passed in 562.45 seconds ====================

Comment 3 Michal Zidek 2017-11-15 18:06:44 UTC
(In reply to Lukas Slebodnik from comment #2)
> ding-libs-0.6.1-35.fc27 broke backward compatibility and broke sssd
> integration test.

Upstream PR:
https://pagure.io/SSSD/ding-libs/pull-request/3184

Michal

Comment 4 Fedora Update System 2017-11-15 23:52:01 UTC
ding-libs-0.6.1-35.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6c2757825c

Comment 5 Fedora Update System 2017-11-16 16:11:13 UTC
ding-libs-0.6.1-36.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-841ffe2712

Comment 6 Fedora Update System 2017-11-17 18:57:12 UTC
ding-libs-0.6.1-36.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-841ffe2712

Comment 7 Fedora Update System 2017-11-21 23:33:49 UTC
ding-libs-0.6.1-36.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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