Bug 1442880 - setup-ds-admin.pl -u with nsslapd-localhost changed
Summary: setup-ds-admin.pl -u with nsslapd-localhost changed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.4
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: mreynolds
QA Contact: Viktor Ashirov
URL:
Whiteboard:
: 1394006 1444951 (view as bug list)
Depends On: 1394006
Blocks: 1444951 1445178
TreeView+ depends on / blocked
 
Reported: 2017-04-17 21:00 UTC by mreynolds
Modified: 2020-09-13 21:58 UTC (History)
8 users (show)

Fixed In Version: 389-ds-base-1.3.6.1-9.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1394006
: 1444951 1445178 (view as bug list)
Environment:
Last Closed: 2017-08-01 21:16:38 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 2280 None None None 2020-09-13 21:58:50 UTC
Red Hat Product Errata RHBA-2017:2086 normal SHIPPED_LIVE 389-ds-base bug fix and enhancement update 2017-08-01 18:37:38 UTC

Description mreynolds 2017-04-17 21:00:03 UTC
+++ This bug was initially created as a clone of Bug #1394006 +++

Description of problem:

This is a follow-on issue to bz#1153758.  When nsslapd-localhost is set to a load balancer FQDN to support GSSAPI ticket auth, it breaks running setup-ds-admin.pl -u.

When you have an existing server registered to an admin server for use with the 389 console, running setup-ds-admin.pl -u adds another host (named after the load balancer) to the 389 console gui rather than updating the server's console data.  This is required in order for the correct jar to be served up by 389 console.

Version-Release number of selected component (if applicable):
389-ds-base-1.3.5.10-11.el7.x86_64

Steps to Reproduce:
1. install 389 replica, running setup-ds-admin.pl
2. update nsslapd-localhost with the load balancer fqdn
3. run setup-ds-admin.pl -s -u -f /tmp/setup.inf
4. see the new entry appear in 389 console rather than having the true replica's information updated.

setup.inf:

[General]
StrictHostCheck= False
FullMachineName= slave.example.com
SuiteSpotUserID= ldap
SuiteSpotGroup= ldap
AdminDomain= CORP_LDAP
ConfigDirectoryAdminID= admin
ConfigDirectoryAdminPwd= bleh
ConfigDirectoryLdapURL= ldaps://master.example.com:636/o=NetscapeRoot
UserDirectoryAdminID= cn=Directory Manager
UserDirectoryAdminPwd= bleh
UserDirectoryLdapURL= ldap://slave.example.com:389/o=NetscapeRoot

[slapd]
SlapdConfigForMC= No
SecurityOn= No
UseExistingMC= Yes
UseExistingUG= No
ServerPort= 389
ServerIdentifier= corpldap
Suffix= dc=example,dc=com
RootDN= cn=Directory Manager
AddSampleEntries= No
InstallLdifFile= none
AddOrgEntries= No
DisableSchemaChecking= No
RootDNPwd= bleh

[admin]
SysUser= ldap
Port= 9830
ServerAdminID= admin
ServerAdminPwd= bleh

Comment 2 mreynolds 2017-04-17 21:05:03 UTC
Upstream ticket:
https://pagure.io/389-ds-base/issue/49221

Comment 3 mreynolds 2017-04-17 22:00:50 UTC
Fixed upstream

Comment 4 Nathan Kinder 2017-04-20 15:31:22 UTC
*** Bug 1394006 has been marked as a duplicate of this bug. ***

Comment 5 mreynolds 2017-04-24 16:57:37 UTC
*** Bug 1444951 has been marked as a duplicate of this bug. ***

Comment 8 Simon Pichugin 2017-05-10 11:26:16 UTC
Hi Mark,
after reading the source and the comments I had a thought that this can be verified with a simple DS setup without using Console interface etc. Am I right?

The steps:
1. Install the instance with setup-ds-admin.pl
2. Set any FQDN to nsslapd-localhost at cn=config via ldapmodify
3. Run setup-ds-admin.pl -s -u -f /tmp/setup.inf with the file from above
4. Check nsslapd-localhost with ldapsearch cli. It should not be changed to the new FQDN from /tmp/setup.inf

Please, verify if I understood it right and no graphical Console interface is required.

Comment 9 mreynolds 2017-05-10 13:46:22 UTC
(In reply to Simon Pichugin from comment #8)
> Hi Mark,
> after reading the source and the comments I had a thought that this can be
> verified with a simple DS setup without using Console interface etc. Am I
> right?

Correct - it's really a setup INF file processing issue.  

> 
> The steps:
> 1. Install the instance with setup-ds-admin.pl
> 2. Set any FQDN to nsslapd-localhost at cn=config via ldapmodify
> 3. Run setup-ds-admin.pl -s -u -f /tmp/setup.inf with the file from above
> 4. Check nsslapd-localhost with ldapsearch cli. It should not be changed to
> the new FQDN from /tmp/setup.inf

Well, correct it should not update nsslapd-localhost, but that's not what this is addressing.  This is addressing an issue where the server is behind a load balancer with a different hostname.  So its must do the online update/upgrade using the FullMachineName specified in the INF file, and NOT nsslapd-localhost.

So basically we need to verify that the INF file machine name is overriding nsslapd-localhost during the upgrade.  So your test doesn't even need to successfully perform the upgrade, but it needs to verify that the FullMachineName is always being used (whether the upgrade works or not).  So its actually quite simple to test:

Use a bogus hostname in the INF file, and make sure the upgrade fails :)


> 
> Please, verify if I understood it right and no graphical Console interface
> is required.

Comment 10 Simon Pichugin 2017-05-11 11:22:54 UTC
Build tested:
389-ds-base-1.3.6.1-13.el7.x86_64

Verification steps:
1. Install the instance and admin server with setup-ds-admin.pl
2. Create setup.inf file with a bogus FQDN in FullMachineName
[root@inst ~]# cat /tmp/setup.inf
[General]
StrictHostCheck= False
FullMachineName= bogus.example.com
SuiteSpotUserID= ldap
SuiteSpotGroup= ldap
AdminDomain= CORP_LDAP
ConfigDirectoryAdminID= admin
ConfigDirectoryAdminPwd= Secret123
ConfigDirectoryLdapURL= ldap://inst.test.redhat.com:389/o=NetscapeRoot
UserDirectoryAdminID= cn=Directory Manager
UserDirectoryAdminPwd= Secret123
UserDirectoryLdapURL= ldap://inst.test.redhat.com:389/o=NetscapeRoot

[slapd]
SlapdConfigForMC= No
SecurityOn= No
UseExistingMC= Yes
UseExistingUG= No
ServerPort= 389
ServerIdentifier= corpldap
Suffix= dc=example,dc=com
RootDN= cn=Directory Manager
AddSampleEntries= No
InstallLdifFile= none
AddOrgEntries= No
DisableSchemaChecking= No
RootDNPwd= Secret123

[admin]
SysUser= ldap
Port= 9830
ServerAdminID= admin
ServerAdminPwd= Secret123

3. Run a silent upgrade from INF file. It should fail because FullMachineName is always being used:
[root@inst ~]# setup-ds-admin.pl -s -u -f /tmp/setup.inf
Updating instance (slapd-inst)...
Could not open a connection to bogus.example.com:389
Could not open a connection to the server at bogus.example.com port 389 as 'uid=admin,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot'.
Please make sure the server is up and running before using online mode,
or use offline mode.

Could not reconfigure the admin server.
Exiting . . .
Log file is '/tmp/setupMACcxO.log'


Results:
FullMachineName is always being used. Marking as verified.

Comment 11 errata-xmlrpc 2017-08-01 21:16:38 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:2086


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