[Fedora-directory-commits] adminserver/admserv/cfgstuff admserv.conf.in, 1.13, 1.14 ds_removal.in, 1.2, 1.3

Richard Allen Megginson rmeggins at fedoraproject.org
Fri Feb 27 14:33:30 UTC 2009


Author: rmeggins

Update of /cvs/dirsec/adminserver/admserv/cfgstuff
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21602/adminserver/admserv/cfgstuff

Modified Files:
	admserv.conf.in ds_removal.in 
Log Message:
Resolves: bug 480869
Bug Description: DS console: Can not delete DS instance
Reviewed by: nkinder (Thanks!)
Fix Description: As it turns out, my assumption that ds_remove in CGI mode also did the unregistration was false.  It is the console that does the unregistration, only after the ds_remove CGI returns success.  So, ds_remove needs to run with AdminSDK off, just like the other "special" CGI programs.  In addition, ds_remove needs to be more robust - if there is an error during ds_remove, you should be allowed to try again after fixing something.  However, the way the error handling worked did not differentiate between fatal errors and errors that could be ignored.  In order to do this properly, we need to propagate the errors back up to the top level (oh how I wish perl had real exception handling . . .).  The main type of error we need to ignore is file not found or process not found.  If we attempted to remove before and that attempt failed for some reason, and left a partial instance, we need to be able to run the remove command again, skipping over the things we shutdown or
  removed already, and clean up the stuff we need to remove.  This can also happen if you use the console to create a ds instance, and remove-ds.pl to remove the instance.  The instance will still show up in the console.  We need to be able to use the Remove Server in the console to remove the instance from the console, even through there is no physical instance on disk any more.  Since the console will only do the unregistration if the CGI returns success, we need to make sure the CGI returns success even though there is no instance on disk.  When ds_remove is run via ds_removal, it will do the unregistration.
I also took this opportunity to refactor the remove code, creating a removeDSInstance method in DSCreate.pm, and moving some of the other removal helper functions to Util.pm.  That simplified the code in both ds_remove and remove-ds.pl.
I added a remove-ds-admin.pl script - one of the problems that users have is that they run setup-ds-admin.pl, then hit some error (e.g. bad DNS setup), then find that they cannot restore the system to the state before they ran setup-ds-admin.pl.  remove-ds-admin.pl does this.
Finally, I added some man pages to the admin package for those commonly used commands.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no 



Index: admserv.conf.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/admserv.conf.in,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- admserv.conf.in	22 Jan 2009 22:03:01 -0000	1.13
+++ admserv.conf.in	27 Feb 2009 14:33:28 -0000	1.14
@@ -119,7 +119,7 @@
 # Handle Stop, Start, Restart, Instance Creation - invoke mod_restartd
 # need to add instance creation because you may want to create an instance
 # of DS on a low port, and instance creation starts the instance as well
-<LocationMatch /*/[tT]asks/[Oo]peration/(?i:stop|start|restart|startconfigds|create)$>
+<LocationMatch /*/[tT]asks/[Oo]peration/(?i:stop|start|restart|startconfigds|create|remove)$>
   AuthUserFile @configdir@/admpw
   AuthType basic
   AuthName "Admin Server"
@@ -132,17 +132,3 @@
   Order allow,deny
   Allow from all
 </LocationMatch>
-
-# special case for the remove task - it needs to use the password pipe
-<LocationMatch /*/[tT]asks/[Oo]peration/(?i:remove)$>
-  AuthUserFile @configdir@/admpw
-  AuthType basic
-  AuthName "Admin Server"
-  Require valid-user
-  AdminSDK on
-  ADMCgiBinDir @cgibindir@
-  Options +ExecCGI
-  RetainPerms on
-  Order allow,deny
-  Allow from all
-</LocationMatch>


Index: ds_removal.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/ds_removal.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ds_removal.in	14 Jul 2008 20:27:02 -0000	1.2
+++ ds_removal.in	27 Feb 2009 14:33:28 -0000	1.3
@@ -50,7 +50,7 @@
 err2=""
 server_id=""
 admin_pw=""
-forceflag=
+forceflag=0
 
 while [ "$1" != "" ]
 do




More information about the Fedora-directory-commits mailing list