Bug 249739 - Implement a script registering DS to the Configuration DS
Summary: Implement a script registering DS to the Configuration DS
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Command Line Utilities
Version: 1.0.4
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 240316 FDS1.1.0
TreeView+ depends on / blocked
 
Reported: 2007-07-26 18:51 UTC by Noriko Hosoi
Modified: 2015-12-07 16:31 UTC (History)
0 users

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


Attachments (Terms of Use)
New (register-ds-admin.pl.in) (12.89 KB, text/plain)
2007-07-26 18:59 UTC, Noriko Hosoi
no flags Details
New (register-ds-admin.res.in) (1.84 KB, text/plain)
2007-07-26 19:01 UTC, Noriko Hosoi
no flags Details
New (RegDSDialogs.pm) (3.23 KB, text/plain)
2007-07-26 19:07 UTC, Noriko Hosoi
no flags Details
cvs diffs (adminserver) (12.79 KB, patch)
2007-07-26 19:41 UTC, Noriko Hosoi
no flags Details | Diff
cvs diffs (ldapserver) (1.08 KB, patch)
2007-07-26 19:44 UTC, Noriko Hosoi
no flags Details | Diff
use cases (13.64 KB, text/plain)
2007-07-26 19:54 UTC, Noriko Hosoi
no flags Details
cvs commit message (3.01 KB, text/plain)
2007-07-27 01:53 UTC, Noriko Hosoi
no flags Details

Description Noriko Hosoi 2007-07-26 18:51:26 UTC
When one or more Directory Servers which are not registered to the Configuration
DS or there is no Configuration DS / AS set up, this script assigns a
Configuration DS, registers the existing servers to the Configuration DS, then
creates an AS instance if necessary.

Comment 1 Noriko Hosoi 2007-07-26 18:59:49 UTC
Created attachment 160062 [details]
New (register-ds-admin.pl.in)

File: adminserver/admserv/newinst/src/register-ds-admin.pl.in

Description: main script to do the registration tasks.	It works interactively
using Resource / Dialog.

Comment 2 Noriko Hosoi 2007-07-26 19:01:46 UTC
Created attachment 160063 [details]
New (register-ds-admin.res.in)

File: adminserver/admserv/newinst/src/register-ds-admin.res.in

Description: resource file for register-ds-admin.pl

Comment 3 Noriko Hosoi 2007-07-26 19:07:09 UTC
Created attachment 160064 [details]
New (RegDSDialogs.pm)

File: adminserver/admserv/newinst/src/RegDSDialogs.pm

Description: register-ds-admin specific dialog

Comment 4 Noriko Hosoi 2007-07-26 19:41:46 UTC
Created attachment 160066 [details]
cvs diffs (adminserver)

Files:
  Makefile.am
  admserv/newinst/src/AdminServer.pm.in
  admserv/newinst/src/AdminUtil.pm.in
  admserv/newinst/src/ConfigDSDialogs.pm
  admserv/newinst/src/setup-ds-admin.res.in

Description:
Makefile.am -- added new files: register-ds-admin.pl, register-ds-admin.res,
RegDSDialogs.pm
AdminServer.pm.in -- introduced "reconfig" context key to
registerASWithConfigDS, which is interpreted as "fresh" in check_and_add_entry
AdminUtil.pm.in -- introduced isConfigDS subroutine
ConfigDSDialogs.pm -- introduced regconfigdsinfo dialog, which is similar to
configdsinfo except regconfigdsinfo used for gathering new Admin Info, thus it
prompts for admin password twice and it does not access the Config DS for the
data verification.
setup-ds-admin.res.in -- added the second prompt for the admin password

Comment 5 Noriko Hosoi 2007-07-26 19:44:41 UTC
Created attachment 160067 [details]
cvs diffs (ldapserver)

Files:
  ldapserver/ldap/admin/src/scripts/DialogManager.pm
  ldapserver/ldap/admin/src/scripts/SetupDialogs.pm.in

Description:
DialogManager.pm -- introduced resetDialog
SetupDialogs.pm.in -- introduced getRegDialogs just to return the usergroup
dialog

Comment 6 Noriko Hosoi 2007-07-26 19:54:05 UTC
Created attachment 160068 [details]
use cases

The attchement contains the following cases:
1. Register one unregistered DS
2. Register multiple unregistered DSes
3. Register one unregistered DS to the existing Configuration DS
4. Register multiple unregistered DS to the existing Configuration DS
5. Switch the Configuration Server from <serverID> to <serverID2>

Comment 7 Nathan Kinder 2007-07-26 21:43:05 UTC
Looks good.

Comment 8 Rich Megginson 2007-07-26 21:52:16 UTC
(In reply to comment #1)
> Created an attachment (id=160062) [edit]
> New (register-ds-admin.pl.in)
> 
> File: adminserver/admserv/newinst/src/register-ds-admin.pl.in
> 
> Description: main script to do the registration tasks.	It works interactively
> using Resource / Dialog.

I suggest using $setup->{configdir} for the instance config dir, and
Setup->getDirServers() to get the list of directory servers under configdir.

Otherwise, the rest looks good.

Comment 9 Noriko Hosoi 2007-07-27 01:53:26 UTC
Created attachment 160088 [details]
cvs commit message

Reviewed by Rich and Nathan (Thank you!!!)

Revised the code based upon the comments from them.
1. Makefile.am: folded a line longer than 80 characters
   stopped installing register_server.pl
2. resource files: replaced (again) with (confirm)
3. register-ds-admin.pl.in: use $setup->{configdir} for the configdir path, and
borrowed the code to look for the instance directory names from Setup.

Comment 10 Yi Zhang 2007-11-28 23:33:07 UTC
Verified. Pass
Test machine: cypher

Test steps:
1. setup DS and admin server on cypher
2. run "/usr/sbin/setup-ds.pl" to create a new DS server
3. run "/usr/sbin/register-ds-admin.pl" to register the new created DS server
4. run "redhat-idm-console" to start console
Verify: there are two DS server under Admin panel, "server group" tree node.

Verify result: pass


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