Bug 525785 - setup-ds-admin.pl should use correct default hostname + port
Summary: setup-ds-admin.pl should use correct default hostname + port
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Install/Uninstall
Version: 1.2.1
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 389_1.2.3 639035
TreeView+ depends on / blocked
 
Reported: 2009-09-25 17:52 UTC by Rich Megginson
Modified: 2015-12-07 16:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 16:37:27 UTC
Embargoed:


Attachments (Terms of Use)
patch (1.89 KB, patch)
2009-09-25 17:57 UTC, Rich Megginson
no flags Details | Diff

Description Rich Megginson 2009-09-25 17:52:05 UTC
setup-ds-admin.pl running in silent mode does not fill in FullMachineName nor ServerPort if not specified.  If creating the configuration DS, this means the ConfigDirectoryLdapURL will not be filled in with a correct default either.

Comment 1 Rich Megginson 2009-09-25 17:57:42 UTC
Created attachment 362703 [details]
patch

Comment 2 Rich Megginson 2009-09-25 18:05:44 UTC
To ssh://git.fedorahosted.org/git/389/admin.git
   ec71bac..eb25bdf  master -> master

commit eb25bdff89df7f3f3a7dc31ffa5d8ac1aaf1cc78
Author: Rich Megginson <rmeggins>
Date:   Fri Sep 25 11:59:14 2009 -0600

    Reviewed by: nkinder (Thanks!)
    Fix Description: We were not setting a default hostname and port in silent
    mode.  I also fixed a problem with the SysUser setting.
    Platforms tested: RHEL5 x86_64
    Flag Day: no
    Doc impact: no

Comment 3 Amita Sharma 2011-07-28 09:14:13 UTC
Testing :
===========
1. Left blank below fields in inf file :
[General]
FullMachineName =
[admin]
Port = 
[slapd]
ServerPort =

Executed - [root@amsharma tmp]# setup-ds-admin.pl --silent --file=/home/setupadmin.inf --debug
Creating directory server . . .
The port  is not a valid port. Please choose a valid port.
Error: Could not create directory server instance 'amsharma'.
Exiting . . .
Log file is '/tmp/setuphmKO_g.log'


[11/07/28:14:43:06] - [Setup] Info Creating directory server . . .
[11/07/28:14:43:06] - [Setup] Info The port  is not a valid port. Please choose a valid port.
[11/07/28:14:43:06] - [Setup] Fatal Error: Could not create directory server instance 'amsharma'.

Please guide here.
[11/07/28:14:43:06] - [Setup] Fatal Exiting . . .
Log file is '/tmp/setuphmKO_g.log'

Comment 4 Nathan Kinder 2011-08-01 15:01:15 UTC
(In reply to comment #3)
> Testing :
> ===========
> 1. Left blank below fields in inf file :
> [General]
> FullMachineName =
> [admin]
> Port = 
> [slapd]
> ServerPort =

I believe you need to not have those parameters in your inf file at all.  You are explicitly setting them to an empty value, so that overrides any default you have set.  If you remove the parameters from your inf file, the setup script should use the appropriate defaults.

Comment 5 Rich Megginson 2011-08-01 15:08:42 UTC
Also note that it does not apply to [admin] Port - only [slapd] ServerPort.

If after you take into consideration the comments of Nathan and I, you still have problems/questions, please reproduce the problem with setup-ds-admin.pl and add -ddd to the arguments and attach the output of that to this bug.

Comment 6 Rich Megginson 2011-08-31 17:41:13 UTC
Is this bug VERIFIED yet?

Comment 7 Amita Sharma 2011-09-28 08:55:08 UTC
Removed FullMachineName = snmaptest.pnq.redhat.com and ServerPort = 389 from inf file .
[General]
AdminDomain = pnq.redhat.com
SuiteSpotGroup = amsharma
ConfigDirectoryLdapURL = ldap://snmaptest.pnq.redhat.com:389/o=NetscapeRoot
ConfigDirectoryAdminID = admin
SuiteSpotUserID = amsharma
ConfigDirectoryAdminPwd = Secret123

[admin]
ServerAdminID = admin
ServerAdminPwd = Secret123
SysUser = amsharma
ServerIpAddress = 0.0.0.0
Port = 9830


[slapd]
InstallLdifFile = suggest
ServerIdentifier = snmaptest
AddOrgEntries = Yes
RootDN = cn=Directory Manager
RootDNPwd = Secret123
SlapdConfigForMC = yes
Suffix = dc=example,dc=com
UseExistingMC = 0
AddSampleEntries = No


Admin server was successfully created, configured, and started.
Exiting . . .
Log file is '/tmp/setupDxOlz1.log'

Hence VERIFIED.


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