[OPENDJ-6285] Preparation to upgrade DJ from 6.0.0 to 7.0.0 raises CryptoManager error Created: 14/May/19  Updated: 08/Nov/19  Resolved: 16/May/19

Status: Done
Project: OpenDJ
Component/s: regression, upgrade
Affects Version/s: 7.0.0
Fix Version/s: 7.0.0

Type: Bug Priority: Major
Reporter: Petr Matej [X] (Inactive) Assignee: Fabio Pistolesi
Resolution: Fixed Votes: 0
Labels: Verified
Environment:

Linux


Issue Links:
Duplicate
is duplicated by OPENDJ-6284 Upgrade from 6 to 7 is failing with "... Done
Flagged:
Impediment
Epic Link: Bugs 7.0
Story Points: 1
QA Assignee: Michal Severin [X] (Inactive)

 Description   

When upgrading DJ from version 6.0.0 to 7.0.0 on Linux, error is raised during preparation:

>>>> Preparing to upgrade

Unable to retrieve the hostname from the admin backend using the truststore as
source of keys; 'advertised-listen-address' attribute in global configurati...
    [ Message content over the limit has been removed. ]
... Migrating replication changelog files to 6.5.0 format...............   FAIL
  Migrating replication changelog files to 6.5.0 format...............   FAIL

 ** An error occurred while renaming the changelog files:
 InitializationException: CryptoManager failed to retrieve entry
 "ds-cfg-key-id=ads-certificate,cn=ads-truststore" (the instance-key-pair
 public-key-certificate): Constraint Violation: Unable to process entry
 ds-cfg-key-id=ads-certificate,cn=ads-truststore in the trust store backend
 because the requested DN is one level below the base DN but does not specify
 a certificate name (CryptoManagerSync.java:134 DirectoryServer.java:763
 DirectoryServer.java:695 UpgradeTasks.java:1772 ProgressMonitor.java:81
 UpgradeTasks.java:1768 Upgrade.java:953 UpgradeCli.java:233 Utils.java:945
 Utils.java:922 UpgradeCli.java:95)

Config is set to:

version = 7.0.0-SNAPSHOT
previous_version = 6.0.0

 

Steps to reproduce the issue:

  1. Setup DJ 6.0.0
  2. Upgrade instance to 7.0.0-SNAPSHOT --> error should be raised

 

Command to run one of the failed tests:

./run-pybot.py -s upgrade_group.upgradetasks -t upgrade_tasks dj

 

Found in OPENDJ 7.0.0-SNAPSHOT, revision number: 66ec4cddc7fa399304a32470a5f939c8f866e9e0



 Comments   
Comment by Fabio Pistolesi [ 15/May/19 ]

There are two problems, here.

  1. It cannot find a hostname because in version 6 `cn=admin data` is in a different backendID.
  2. While looking for the key, the default schema is used, which has no definitions for `ds-cfg-key-id`, while migrating changelogs files uses the full schema, thus ending with two different `ds-cfg-key-id` definitions. Comparisons of attribute types then fails.
Comment by Michal Severin [X] (Inactive) [ 20/May/19 ]

Verified on 7.0.0-SNAPSHOT 068af1c8c54

Generated at Mon Mar 08 11:53:02 UTC 2021 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.