Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 528480

Summary: Upgrade from DS 1.2.0-4 to DS 1.2.2-1 during OS upgrade leave replication changelog DB unusable
Product: [Retired] 389 Reporter: James Roman <james_roman>
Component: Replication - GeneralAssignee: Rich Megginson <rmeggins>
Status: CLOSED DUPLICATE QA Contact: Chandrasekar Kannan <ckannan>
Severity: medium Docs Contact:
Priority: low    
Version: 1.2.1CC: benl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-12 14:36:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Roman 2009-10-12 13:01:08 UTC
Description of problem:
When upgrading from Fedora Core 9 running Fedora-ds-base 1.2.0-4 to Fedora 10 (389-ds-base 1.2.2-1), the database upgrade process leaves the replication database in a unusable state. I have replication set up between an active directory and DS 1.2.2 replica (already migrated).

Version-Release number of selected component (if applicable):
Upgrade from 1.2.0-4 to 1.2.2-1.

How reproducible:
It happened every time I performed an upgrade from Fedora Core 9 to Fedora Core 10 (i386). (4 attempts)

Steps to Reproduce:
1. Create an FC9 1.2.0-4 database. Configure replication between an active directory and a DS replica.
2. Disable automatic start of DS. Set login process back to normal password login. Perform manual replication sync.
3. Perform Fedora OS upgrade on existing FC9 OS.
4. After Disk based install, boot system and perform "yum upgrade" to update remaining FC9 packages.
5. reboot once more after upgrade completes. 
6. After reboot, start dirsrv service. Start-up will fail.
  
Actual results:
Dirsrv fails to start after upgrade. Error log shows that it is upgrading the replication database in /var/lib/dirsrv/slpad-DBNAME/cldb but it then seems to want to create a new database, which fails.

Expected results:
Replication database is upgraded and loads correctly. It may also be more appropriate to simply drop replication database and create a new one (at least when "yum upgrade" is called, over Yum update.

Additional info:
I am including the content of the error log:
04/Oct/2009:19:40:35 -0400] - All database threads now stopped
[04/Oct/2009:19:41:37 -0400] - slapd shutting down - signaling operation threads
[04/Oct/2009:19:41:37 -0400] - slapd shutting down - closing down internal subsystems and plugins
[04/Oct/2009:19:41:38 -0400] - Waiting for 4 database threads to stop
[04/Oct/2009:19:41:38 -0400] - All database threads now stopped
[04/Oct/2009:19:41:38 -0400] - slapd stopped.
        389-Directory/1.2.2 B2009.237.206
        directory.REALM.com:636 (/etc/dirsrv/slapd-REALM-COM)

[05/Oct/2009:01:46:34 -0400] - 389-Directory/1.2.2 B2009.237.206 starting up
[05/Oct/2009:01:46:34 -0400] - Clean up db environment and start from archive.
[05/Oct/2009:01:46:34 -0400] - libdb: Program version 4.7 doesn't match environment version 4.6
[05/Oct/2009:01:46:34 -0400] - libdb: Program version 4.7 doesn't match environment version 4.6
[05/Oct/2009:01:46:36 -0400] - attrcrypt_unwrap_key: failed to unwrap key for cipher AES
[05/Oct/2009:01:46:37 -0400] - Failed to retrieve key for cipher AES in attrcrypt_cipher_init
[05/Oct/2009:01:46:37 -0400] - Failed to initialize cipher AES in attrcrypt_init
[05/Oct/2009:01:46:37 -0400] - attrcrypt_unwrap_key: failed to unwrap key for cipher 3DES
[05/Oct/2009:01:46:37 -0400] - Failed to retrieve key for cipher 3DES in attrcrypt_cipher_init
[05/Oct/2009:01:46:37 -0400] - Failed to initialize cipher 3DES in attrcrypt_init
[05/Oct/2009:01:46:37 -0400] NSMMReplicationPlugin - changelog program - Upgrading from bdb/4 to bdb/4.7/libreplication-plugin is successfully done (/var/lib/dirsrv/slapd-REALM-COM/cldb)
[05/Oct/2009:01:46:37 -0400] NSMMReplicationPlugin - changelog program - _cl5NewDBFile: db_open failed; db error - 22 Invalid argument
[05/Oct/2009:01:46:37 -0400] NSMMReplicationPlugin - changelog program - cl5Open: failed to open changelog
[05/Oct/2009:01:46:37 -0400] NSMMReplicationPlugin - changelog program - changelog5_init: failed to start changelog at /var/lib/dirsrv/slapd-REALM-COM/cldb
[05/Oct/2009:01:46:37 -0400] - Failed to start object plugin Multimaster Replication Plugin
[05/Oct/2009:01:46:37 -0400] NSMMReplicationPlugin - changelog program - _cl5NewDBFile: db_open failed; db error - 22 Invalid argument
[05/Oct/2009:01:46:37 -0400] NSMMReplicationPlugin - changelog program - cl5Open: failed to open changelog
[05/Oct/2009:01:46:37 -0400] NSMMReplicationPlugin - changelog program - changelog5_init: failed to start changelog at /var/lib/dirsrv/slapd-REALM-COM/cldb
[05/Oct/2009:01:46:37 -0400] - Failed to start object plugin Multimaster Replication Plugin
[05/Oct/2009:01:46:37 -0400] - Error: Failed to resolve plugin dependencies
[05/Oct/2009:01:46:37 -0400] - Error: object plugin Legacy Replication Plugin is not started
[05/Oct/2009:01:46:37 -0400] - Error: object plugin Multimaster Replication Plugin is not started
        389-Directory/1.2.2 B2009.237.206
        directory.REALM.com:636 (/etc/dirsrv/slapd-REALM-COM)

[05/Oct/2009:01:58:17 -0400] - 389-Directory/1.2.2 B2009.237.206 starting up
[05/Oct/2009:01:58:17 -0400] - Detected Disorderly Shutdown last time Directory Server was running, recovering database.
[05/Oct/2009:01:58:18 -0400] - attrcrypt_unwrap_key: failed to unwrap key for cipher AES
[05/Oct/2009:01:58:18 -0400] - Failed to retrieve key for cipher AES in attrcrypt_cipher_init
[05/Oct/2009:01:58:18 -0400] - Failed to initialize cipher AES in attrcrypt_init
[05/Oct/2009:01:58:18 -0400] - attrcrypt_unwrap_key: failed to unwrap key for cipher 3DES
[05/Oct/2009:01:58:18 -0400] - Failed to retrieve key for cipher 3DES in attrcrypt_cipher_init
[05/Oct/2009:01:58:18 -0400] - Failed to initialize cipher 3DES in attrcrypt_init
[05/Oct/2009:01:58:19 -0400] NSMMReplicationPlugin - changelog program - _cl5NewDBFile: db_open failed; db error - 22 Invalid argument
[05/Oct/2009:01:58:19 -0400] NSMMReplicationPlugin - changelog program - cl5Open: failed to open changelog
[05/Oct/2009:01:58:19 -0400] NSMMReplicationPlugin - changelog program - changelog5_init: failed to start changelog at /var/lib/dirsrv/slapd-REALM-COM/cldb
[05/Oct/2009:01:58:19 -0400] - Failed to start object plugin Multimaster Replication Plugin
[05/Oct/2009:01:58:19 -0400] NSMMReplicationPlugin - changelog program - _cl5NewDBFile: db_open failed; db error - 22 Invalid argument
[05/Oct/2009:01:58:19 -0400] NSMMReplicationPlugin - changelog program - cl5Open: failed to open changelog
[05/Oct/2009:01:58:19 -0400] NSMMReplicationPlugin - changelog program - changelog5_init: failed to start changelog at /var/lib/dirsrv/slapd-REALM-COM/cldb
[05/Oct/2009:01:58:19 -0400] - Failed to start object plugin Multimaster Replication Plugin
[05/Oct/2009:01:58:19 -0400] - Error: Failed to resolve plugin dependencies
[05/Oct/2009:01:58:19 -0400] - Error: object plugin Legacy Replication Plugin is not started
[05/Oct/2009:01:58:19 -0400] - Error: object plugin Multimaster Replication Plugin is not started

Comment 1 Rich Megginson 2009-10-12 14:36:58 UTC

*** This bug has been marked as a duplicate of bug 527848 ***