[Fedora-directory-commits] adminserver/admserv/newinst/src AdminMigration.pm.in, 1.5, 1.6 AdminServer.pm.in, 1.8, 1.9 setup-ds-admin.res.in, 1.6, 1.7

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Fri Sep 14 21:26:11 UTC 2007


Author: rmeggins

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

Modified Files:
	AdminMigration.pm.in AdminServer.pm.in setup-ds-admin.res.in 
Log Message:
Resolves: bug 288451
Bug Description: Show-Stopper - Migration from HP-PARISC DS 6.21 to DS80 on HP-Itaninum
Reviewed by: nhosoi (Thanks!)
Fix Description: These are additional fixes for various and sundry problems:
1) If doing cross platform migration, just use the default db and changelog db dirs
2) If doing same platform migration, try to keep the db dir if the user has changed it.  It will usually be changed for a good reason, like moving to a separate device for performance reasons.  In order to see if the directory has changed, we need to "normalize" the path in the attribute so that we can compare it correctly.
3) Do not migrate the attributes nsslapd-db-private-import-mem and nsslapd-import-cache-autosize - just use the new default values for these
4) Do not migrate nsslapd-allidsthreshold - this has been removed
5) Add additional error checking and handling when migrating the local.conf information.
6) Change the brand in the sie and isie when migrating.
7) Update the Group in console.conf during migration.
Platforms tested: HP-UX 11.23 IPF64
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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AdminMigration.pm.in	16 Aug 2007 00:34:04 -0000	1.5
+++ AdminMigration.pm.in	14 Sep 2007 21:26:08 -0000	1.6
@@ -216,6 +216,14 @@
     }
     # now get the entries and write them to local.conf
     my $entry = $conn->search($inf->{admin}->{sie}, "sub", "(objectclass=*)");
+    if (!$entry || $conn->getErrorCode()) {
+        $mig->msg($FATAL, 'error_no_localconf_entries',
+                  $inf->{admin}->{sie}, $localconf, $conn->getErrorString());
+        $conn->close();
+        close(LOCALCONF);
+        return 0;
+    }        
+        
     while ($entry) {
         updateLocalConf($entry, $inf->{admin}->{sie}, \*LOCALCONF);
         $entry = $conn->nextEntry();
@@ -468,6 +476,10 @@
         return 0;
     }
 
+    # change branding information
+    $mig->{inf}->{admin}->{sie} =~ s/\bNetscape\b/@capbrand@/g;
+    $mig->{inf}->{admin}->{isie} =~ s/\bNetscape\b/@capbrand@/g;
+
     if (!updateAdmConf({ldapurl => $mig->{inf}->{General}->{ConfigDirectoryLdapURL},
                         userdn => $mig->{inf}->{General}->{ConfigDirectoryAdminID},
                         SuiteSpotUserID => $mig->{inf}->{General}->{SuiteSpotUserID},
@@ -524,3 +536,10 @@
 
 # obligatory module true return
 1;
+
+# emacs settings
+# Local Variables:
+# mode:perl
+# indent-tabs-mode: nil
+# tab-width: 4
+# End:


Index: AdminServer.pm.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminServer.pm.in,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- AdminServer.pm.in	27 Jul 2007 01:42:46 -0000	1.8
+++ AdminServer.pm.in	14 Sep 2007 21:26:08 -0000	1.9
@@ -323,6 +323,23 @@
     debug(1, $output);
     $ENV{LD_LIBRARY_PATH} = $savepath;
     $ENV{SHLIB_PATH} = $savepath;
+
+    # update Group in console.conf
+    if ($admConf->{sysgroup}) {
+        if (!open(CONSOLECONF, "$admConf->{configdir}/console.conf")) {
+            debug(0, "Error opening $admConf->{configdir}/console.conf: $!");
+            return 0;
+        }
+        my $contents = <CONSOLECONF>;
+        close (CONSOLECONF);
+        $contents =~ s/^Group.*$/Group $admConf->{sysgroup}/;
+        if (!open(CONSOLECONF, ">$admConf->{configdir}/console.conf")) {
+            debug(0, "Error writing new group $admConf->{sysgroup} to $admConf->{configdir}/console.conf: $!");
+            return 0;
+        }
+        print CONSOLECONF $contents;
+        close (CONSOLECONF);
+    }
     return 1;
 }
 


Index: setup-ds-admin.res.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.res.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- setup-ds-admin.res.in	27 Jul 2007 01:42:46 -0000	1.6
+++ setup-ds-admin.res.in	14 Sep 2007 21:26:08 -0000	1.7
@@ -103,6 +103,7 @@
 registering_adminserver = Registering admin server with the configuration directory server . . .\n
 error_adding_adminserver_config_entry = Could not add the admin server configuration entry '%s'.\nCheck the configuration directory server access and error log for more details.\n
 error_updating_localconf_entry = Could not update the local admin server configuration file for the configuration entry '%s'.\n
+error_no_localconf_entries = Error finding LDAP entries under '%s' to update in the local admin server configuration file '%s'.  LDAP Error: %s\n
 updating_admconf_configds = Updating adm.conf with information from configuration directory server . . .\n
 updating_httpconf = Updating the configuration for the httpd engine . . .\n
 error_updating_httpconf = Could not update the httpd engine configuration.\n




More information about the Fedora-directory-commits mailing list