[Fedora-directory-commits] adminserver/admserv/newinst/src AdminMigration.pm.in, 1.6, 1.7 AdminServer.pm.in, 1.11, 1.12

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Fri Dec 7 00:09:39 UTC 2007


Author: rmeggins

Update of /cvs/dirsec/adminserver/admserv/newinst/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30317/adminserver/admserv/newinst/src

Modified Files:
	AdminMigration.pm.in AdminServer.pm.in 
Log Message:
Resolves: bug 400421
Bug Description: unable to restart configDS via console
Reviewed by: nhosoi (Thanks!)
Fix Description: We were using the old format for the ldapStart directive, which assumed everything was under a serverroot, so it just stored the relative path.  We need the absolute path.  During regular setup, we can get this from the directory server instance.  During migration, we need to update the ldapStart directive to use the absolute path, so we need to get that information from the directory server code.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none



Index: AdminMigration.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminMigration.pm.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AdminMigration.pm.in	14 Sep 2007 21:26:08 -0000	1.6
+++ AdminMigration.pm.in	7 Dec 2007 00:09:36 -0000	1.7
@@ -34,6 +34,7 @@
 use SetupLog;
 
 use File::Path;
+use File::Spec qw(file_name_is_absolute);
 # tempfiles
 use File::Temp qw(tempfile tempdir);
 
@@ -480,6 +481,16 @@
     $mig->{inf}->{admin}->{sie} =~ s/\bNetscape\b/@capbrand@/g;
     $mig->{inf}->{admin}->{isie} =~ s/\bNetscape\b/@capbrand@/g;
 
+    # update ldapStart
+    # if ldapStart is not an absolute path, we need to add
+    # the directory server instance dir (ServerRoot) to it
+    if ($mig->{inf}->{admin}->{ldapStart} &&
+        !file_name_is_absolute($mig->{inf}->{admin}->{ldapStart})) {
+        debug(1, "Need to make ldapStart an absolute path - ", $mig->{ServerRoot}, "/",
+              $mig->{inf}->{admin}->{ldapStart}, "\n");
+        $mig->{inf}->{admin}->{ldapStart} = $mig->{ServerRoot} . "/" . $mig->{inf}->{admin}->{ldapStart};
+    }
+
     if (!updateAdmConf({ldapurl => $mig->{inf}->{General}->{ConfigDirectoryLdapURL},
                         userdn => $mig->{inf}->{General}->{ConfigDirectoryAdminID},
                         SuiteSpotUserID => $mig->{inf}->{General}->{SuiteSpotUserID},


Index: AdminServer.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminServer.pm.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- AdminServer.pm.in	20 Sep 2007 01:01:21 -0000	1.11
+++ AdminServer.pm.in	7 Dec 2007 00:09:36 -0000	1.12
@@ -157,8 +157,8 @@
 
     my @start_slapd;
     if ($setup->{inf}->{slapd}->{SlapdConfigForMC} =~ /yes/i) {
-        my $slapdid = $setup->{inf}->{slapd}->{ServerIdentifier};
-        @start_slapd = ('ldapStart', "slapd-$slapdid/start-slapd");
+        my $inst_dir = $setup->{inf}->{slapd}->{inst_dir};
+        @start_slapd = ('ldapStart', "$inst_dir/start-slapd");
     }
     $setup->msg('updating_admconf');
     my $rc = updateAdmConf({ldapurl => $setup->{inf}->{General}->{ConfigDirectoryLdapURL},




More information about the Fedora-directory-commits mailing list