summaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2009-02-27 14:33:12 +0000
committerRich Megginson <rmeggins@redhat.com>2009-02-27 14:33:12 +0000
commit463bac4de552803d0a937617999c384181aa4ea5 (patch)
treef804a58416ecd75f0067ce4891dccc3e5fb617fb /man
parent489e3dd14c62e55fd26135a676f66dbe0627ecaf (diff)
downloadds-463bac4de552803d0a937617999c384181aa4ea5.tar.gz
ds-463bac4de552803d0a937617999c384181aa4ea5.tar.xz
ds-463bac4de552803d0a937617999c384181aa4ea5.zip
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
Diffstat (limited to 'man')
-rw-r--r--man/man8/migrate-ds.pl.811
-rw-r--r--man/man8/remove-ds.pl.85
2 files changed, 14 insertions, 2 deletions
diff --git a/man/man8/migrate-ds.pl.8 b/man/man8/migrate-ds.pl.8
index b3a53ece..5036cf50 100644
--- a/man/man8/migrate-ds.pl.8
+++ b/man/man8/migrate-ds.pl.8
@@ -125,14 +125,23 @@ to LDIF format, and the LDIF file must be in the default database directory
the same name as the database instance directory, with a ".ldif". For
example, if you have
.IP
-/opt/fedora\-ds/slapd\-instance/db/userRoot/ and
+.ad l
+.nf
+/opt/fedora\-ds/slapd\-instance/db/userRoot/
+and
/opt/fedora\-ds/slapd\-instance/db/NetscapeRoot/
+.na
+.fi
.PP
you must first use db2ldif to export these databases to LDIF e.g.
.IP
+.ad l
+.nf
cd /opt/fedora\-ds/slapd\-instance
\&./db2ldif \fB\-n\fR userRoot \fB\-a\fR /opt/fedora\-ds/slapd\-instance/db/userRoot.ldif and
\&./db2ldif \fB\-n\fR NetscapeRoot \fB\-a\fR /opt/fedora\-ds/slapd\-instance/db/NetscapeRoot.ldif
+.fi
+.na
.PP
Then you must somehow make your old server root directory available on
the destination machine, either by creating a tar archive on the source
diff --git a/man/man8/remove-ds.pl.8 b/man/man8/remove-ds.pl.8
index c430b0c8..c74b8234 100644
--- a/man/man8/remove-ds.pl.8
+++ b/man/man8/remove-ds.pl.8
@@ -19,7 +19,7 @@
remove\-ds.pl \- Remove an instance of Directory Server
.SH SYNOPSIS
.B remove-ds.pl
-[\-f] \-i \fIinstance\fR
+[\-f] [\-d \-d ... \-d] \-i \fIinstance\fR
.SH DESCRIPTION
Removes a Directory Server instance from the system. The instance
will be shutdown and the files will be removed. The certificate
@@ -36,6 +36,9 @@ A summary of options is included below:
.B \fB\-f\fR
Force removal
.TP
+.B \fB\-d\fR
+Enable debugging - adding more -d will make output more verbose
+.TP
.B \fB\-i\fR \fIinstance\fR
The full name of the instance to remove (e.g. slapd-example)
.br