Bug 249739 - Implement a script registering DS to the Configuration DS
Implement a script registering DS to the Configuration DS
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Community
Component: Command Line Utilities (Show other bugs)
1.0.4
All Linux
low Severity low
: ---
: ---
Assigned To: Noriko Hosoi
Viktor Ashirov
:
Depends On:
Blocks: 240316 FDS1.1.0
  Show dependency treegraph
 
Reported: 2007-07-26 14:51 EDT by Noriko Hosoi
Modified: 2015-12-07 11:31 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 11:31:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Noriko Hosoi 2007-07-26 14:51:26 EDT
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 14:59:49 EDT
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 15:01:46 EDT
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 15:07:09 EDT
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 15:41:46 EDT
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 15:44:41 EDT
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 15:54:05 EDT
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 17:43:05 EDT
Looks good.
Comment 8 Rich Megginson 2007-07-26 17:52:16 EDT
(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-26 21:53:26 EDT
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 18:33:07 EST
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.