Bug 1469759

Summary: ini_config_augment: merge_flags detect behavior incorrect
Product: Red Hat Enterprise Linux 7 Reporter: Robbie Harwood <rharwood>
Component: ding-libsAssignee: Michal Zidek <mzidek>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: ksiddiqu, mzidek, ndehadra, nsoman, rharwood
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://pagure.io/SSSD/ding-libs/issue/3167
Whiteboard:
Fixed In Version: ding-libs-0.6.1-28.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 16:24:47 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: 1458913    

Description Robbie Harwood 2017-07-11 19:25:18 UTC
This happens when a config section is duplicated between a config file and a config directory (either with the same or different contents).

If ERROR/DETECT are set in merge_flags or collision_flags on ini_config_augment, error=17 is returned from ini_aug_apply, which causes the error_list to be discarded in ini_config_augment. When MERGE/PRESERVE/OVERWRITE are instead set as flags (on merge_flags and collision_flags in various combinations), error_list is empty as merging happens silently. Thus it is impossible to determine what the offending file or section is.

Comment 1 Jakub Hrozek 2017-07-11 20:43:48 UTC
Upstream ticket: https://bugzilla.redhat.com/show_bug.cgi?id=1469759

Comment 2 Jakub Hrozek 2017-07-11 20:44:23 UTC
(In reply to Jakub Hrozek from comment #1)
> Upstream ticket: https://bugzilla.redhat.com/show_bug.cgi?id=1469759

Well, of course not. Let's try this again, the upstream ticket link is https://pagure.io/SSSD/ding-libs/issue/3167

Comment 5 Michal Zidek 2017-08-10 10:20:57 UTC
I forgot to comment here, but the patches landed in upstream master yesterday:
- fd539954e68ae49e6670f49e3ff3300cac3e4739
- 3163a969bbcd10c4d9e48e191f978c6991ac01cd
- e322192d1711677e78b197915b1a12537a0e510b

Comment 6 Jakub Hrozek 2017-08-10 11:08:47 UTC
(In reply to Michal Zidek from comment #5)
> I forgot to comment here, but the patches landed in upstream master
> yesterday:
> - fd539954e68ae49e6670f49e3ff3300cac3e4739
> - 3163a969bbcd10c4d9e48e191f978c6991ac01cd
> - e322192d1711677e78b197915b1a12537a0e510b

Therefore marking as POST.

Comment 7 Robbie Harwood 2017-08-10 18:19:58 UTC
In fedora - ding-libs-0.6.0-33.fc27

Comment 12 Nikhil Dehadrai 2018-01-25 09:37:26 UTC
Hi,

Can you please suggest the steps to verify this bugzilla?

Thanks.

Comment 13 Robbie Harwood 2018-01-26 12:42:25 UTC
(In reply to Nikhil Dehadrai from comment #12)
> Hi,
> 
> Can you please suggest the steps to verify this bugzilla?

I am not the maintainer, but: gssproxy building successfully should be enough to mark it fixed.

Barring that, you could lift a test program from the logic from gssproxy's build script: https://pagure.io/gssproxy/blob/master/f/configure.ac#_121 (lines 121-237)

Comment 18 Nikhil Dehadrai 2018-01-30 14:53:48 UTC
IPA-Version: ipa-server-4.5.4-9.el7.x86_64

Verified the bug on the basis of below observations:
1. Verified that ipa-server installation is successful.
2. No errors are observed in installations.
3. IPA services and commands ran successfully.

Console:
[root@auto-hv-01-guest06 ~]# rpm -q ipa-server gssproxy
ipa-server-4.5.4-9.el7.x86_64
gssproxy-0.7.0-17.el7.x86_64
[root@auto-hv-01-guest06 ~]# ipactl status
Directory Service: RUNNING
krb5kdc Service: RUNNING
kadmin Service: RUNNING
named Service: RUNNING
httpd Service: RUNNING
ipa-custodia Service: RUNNING
ntpd Service: RUNNING
pki-tomcatd Service: RUNNING
ipa-otpd Service: RUNNING
ipa-dnskeysyncd Service: RUNNING
ipa: INFO: The ipactl command was successful
[root@auto-hv-01-guest06 ~]# ipactl restart;ipactl status
Stopping pki-tomcatd Service
Restarting Directory Service
Restarting krb5kdc Service
Restarting kadmin Service
Restarting named Service
Restarting httpd Service
Restarting ipa-custodia Service
Restarting ntpd Service
Restarting pki-tomcatd Service
Restarting ipa-otpd Service
Restarting ipa-dnskeysyncd Service
ipa: INFO: The ipactl command was successful
Directory Service: RUNNING
krb5kdc Service: RUNNING
kadmin Service: RUNNING
named Service: RUNNING
httpd Service: RUNNING
ipa-custodia Service: RUNNING
ntpd Service: RUNNING
pki-tomcatd Service: RUNNING
ipa-otpd Service: RUNNING
ipa-dnskeysyncd Service: RUNNING
ipa: INFO: The ipactl command was successful
[root@auto-hv-01-guest06 ~]# kinit admin
Password for admin: 
[root@auto-hv-01-guest06 ~]# klist
Ticket cache: KEYRING:persistent:0:0
Default principal: admin

Valid starting       Expires              Service principal
01/30/2018 02:57:24  01/31/2018 02:57:21  krbtgt/TESTRELM.TEST
[root@auto-hv-01-guest06 ~]# tail -1 /var/log/ipaserver-install.log 
2018-01-30T05:36:13Z INFO The ipa-server-install command was successful
[root@auto-hv-01-guest06 ~]# 

Thus on the basis of above observations and comments in comment#17, marking the status of Bugzilla to 'Verified'

Comment 21 errata-xmlrpc 2018-04-10 16:24:47 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/RHBA-2018:0898