Bug 1506913

Summary: ipa-replica-install might fail because of an already existing entry cn=ipa-http-delegation,cn=s4u2proxy,cn=etc,$SUFFIX [rhel-7.4.z]
Product: Red Hat Enterprise Linux 7 Reporter: Oneata Mircea Teodor <toneata>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.4CC: fbarreto, ipa-maint, ksiddiqu, msauton, myusuf, pvoborni, pvomacka, rcritten, slaznick, toneata, tscherf
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ipa-4.5.0-22.el7_4 Doc Type: If docs needed, set a value
Doc Text:
Cause – If a replica installation was done in the past and some info was left behind, the replication process may fail when applying replica-s4u2proxy.ldif. Consequence – The user would not be able to setup an IPA replica Fix – A verification is done to check if the needed values are already there. Result – The user is able to continue if the replication process.
Story Points: ---
Clone Of: 1493145 Environment:
Last Closed: 2017-11-30 16:01:44 UTC Type: ---
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: 1493145    
Bug Blocks:    

Description Oneata Mircea Teodor 2017-10-27 07:13:00 UTC
This bug has been copied from bug #1493145 and has been proposed to be backported to 7.4 z-stream (EUS).

Comment 7 Standa Laznicka 2017-11-06 08:32:55 UTC
Answering the question on how to reproduce this:
There's an LDIF file that was previously used, with the following contents:

"""
dn: cn=ipa-http-delegation,cn=s4u2proxy,cn=etc,$SUFFIX
changetype: modify
add: memberPrincipal
memberPrincipal: HTTP/$FQDN@$REALM

# ipa-cifs-delegation-targets needs to be an ipaAllowedTarget for HTTP
# delegation but we don't add it here as an LDIF because this entry may
# already exist from another replica, or previous install. If it is missing
# then it will be caught by the update file 61-trusts-s4u2proxy.update

dn: cn=ipa-ldap-delegation-targets,cn=s4u2proxy,cn=etc,$SUFFIX
changetype: modify
add: memberPrincipal
memberPrincipal: ldap/$FQDN@$REALM
"""
Just perform ldapmodify with appropriately replaced variables on master server and try to install replica against such a master. Previously, the observed failure would happen, now the installation should pass.

Comment 9 Mohammad Rizwan 2017-11-07 14:50:13 UTC
version:
ipa-server-4.5.0-22.el7_4.x86_64

Steps:

1. Added the entry for replica in directory server on master.

[root@master ~]# cat a.ldif 
dn: cn=ipa-http-delegation,cn=s4u2proxy,cn=etc,dc=testrelm,dc=test
changetype: modify
add: memberPrincipal
memberPrincipal: HTTP/replica.testrelm.test

dn: cn=ipa-ldap-delegation-targets,cn=s4u2proxy,cn=etc,dc=testrelm,dc=test
changetype: modify
add: memberPrincipal
memberPrincipal: ldap/replica.testrelm.test


[root@master ~]# ldapmodify -h master.testrelm.test -p 389 -D "cn=directory manager" -w Secret123 -f a.ldif 
modifying entry "cn=ipa-http-delegation,cn=s4u2proxy,cn=etc,dc=testrelm,dc=test"

modifying entry "cn=ipa-ldap-delegation-targets,cn=s4u2proxy,cn=etc,dc=testrelm,dc=test"

[root@master ~]#

2. Install replica


Expected result:
replica should install

Actual result:

Replica installed successfully.

Comment 13 errata-xmlrpc 2017-11-30 16:01:44 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-2017:3319