From 9c547934f1d1083aec634bcc35d0db49235191d9 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Tue, 4 Sep 2007 17:50:49 +0000 Subject: Resolves: bug 276741 Bug Description: 'Operation Error' encountered during DS6.21 to DS80 cross-platform migration Reviewed by: nhosoi (Thanks!) Fix Description: For cross platform migration, we should not migrate the nsslapd-idl-switch setting, we should just use the new default value which is "new". Platforms tested: RHEL4 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none --- ldap/admin/src/scripts/DSMigration.pm.in | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'ldap/admin/src/scripts') diff --git a/ldap/admin/src/scripts/DSMigration.pm.in b/ldap/admin/src/scripts/DSMigration.pm.in index d34e1657..cc0f9b3c 100644 --- a/ldap/admin/src/scripts/DSMigration.pm.in +++ b/ldap/admin/src/scripts/DSMigration.pm.in @@ -101,7 +101,8 @@ my %ignoreOld = 'nsslapd-ldapiuidnumbertype' => 'nsslapd-ldapiuidnumbertype', 'nsslapd-ldapigidnumbertype' => 'nsslapd-ldapigidnumbertype', 'nsslapd-ldapientrysearchbase' => 'nsslapd-ldapientrysearchbase', - 'nsslapd-ldapiautodnsuffix' => 'nsslapd-ldapiautodnsuffix' + 'nsslapd-ldapiautodnsuffix' => 'nsslapd-ldapiautodnsuffix', + 'numsubordinates' => 'numSubordinates' ); # these are the obsolete entries we do not migrate @@ -180,6 +181,21 @@ sub removensState { return $newval; } +sub migIdlSwitch { + my ($ent, $attr, $mig, $inst) = @_; + my $newval; + + # if doing cross platform migration, just use the default value for + # nsslapd-idl-switch + # if not doing cross platform, meaning we just use the existing + # database binaries, we must preserve whatever the old value is + if (!$mig->{crossplatform}) { + $newval = $ent->getValues($attr); + } + + return $newval; +} + # these are attributes that we have to transform from # the old value to the new value (e.g. a pathname) # The key of this hash is the attribute name. The value @@ -193,7 +209,8 @@ my %transformAttr = 'nsslapd-changelogdir' => \&getNewDbDir, 'nsds5replicacredentials' => \&migrateCredentials, 'nsmultiplexorcredentials' => \&migrateCredentials, - 'nsstate' => \&removensState + 'nsstate' => \&removensState, + 'nsslapd-idl-switch' => \&migIdlSwitch ); sub copyDatabaseDirs { -- cgit