Bug 249739

Summary: Implement a script registering DS to the Configuration DS
Product: [Retired] 389 Reporter: Noriko Hosoi <nhosoi>
Component: Command Line UtilitiesAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: low Docs Contact:
Priority: low    
Version: 1.0.4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-07 16:31:41 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:    
Bug Blocks: 240316, 427409    
Attachments:
Description Flags
New (register-ds-admin.pl.in)
none
New (register-ds-admin.res.in)
none
New (RegDSDialogs.pm)
none
cvs diffs (adminserver)
none
cvs diffs (ldapserver)
none
use cases
none
cvs commit message none

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