Bug 770705 - Upgrading from 1.2.2-1.el5 to 1.2.9.9-1.el5 deletes userRoot
Summary: Upgrading from 1.2.2-1.el5 to 1.2.9.9-1.el5 deletes userRoot
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: 389
Classification: Retired
Component: Install/Uninstall
Version: 1.2.9
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Nathan Kinder
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-28 13:01 UTC by Graham Leggett
Modified: 2015-01-04 23:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-29 16:47:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Graham Leggett 2011-12-28 13:01:58 UTC
Upgrade 389-ds-base from 1.2.2-1.el5 to 1.2.9.9-1.el5.

The server refuses to start, the error log complains:

[28/Dec/2011:06:24:16 -0600] - nsslapd-subtree-rename-switch is on, while the in
stance userRoot is in the DN format. Please run dn2rdn to convert the database format.
[28/Dec/2011:06:24:16 -0600] - nsslapd-subtree-rename-switch is on, while the instance NetscapeRoot is in the DN format. Please run dn2rdn to convert the databa
se format.[28/Dec/2011:06:24:16 -0600] - start: Failed to start databases, err=-1 Unknown 
error: -1[28/Dec/2011:06:24:16 -0600] - Failed to start database plugin ldbm database[28/Dec/2011:06:24:16 -0600] - WARNING: ldbm instance userRoot already exists
[28/Dec/2011:06:24:16 -0600] - WARNING: ldbm instance NetscapeRoot already exists

Discover that dn2rdn is called from setup-ds.pl, so we run "setup-ds.pl -u". No idea why the RPM postinstall script doesn't "do the right thing".

We run "setup-ds.pl -u" and it emits thousands of warnings, one for each entry in the database:

[28/Dec/2011:06:37:16 -0600] - userRoot: WARNING: skipping an entry with a corrupted dn (syntax value): zzz0107A (id 63863)
[28/Dec/2011:06:37:16 -0600] - userRoot: WARNING: skipping an entry with a corrupted dn (syntax value): zzz  MS E (id 63864)
[28/Dec/2011:06:37:16 -0600] - userRoot: WARNING: skipping an entry with a corrupted dn (syntax value): zzz0111A (id 63865)
[28/Dec/2011:06:37:16 -0600] - userRoot: WARNING: skipping an entry with a corrupted dn (syntax value): zzz  DR I (id 63866)

At the end up the upgrade process, the database is completely empty, all data has been destroyed.

The message "skipping an entry with a corrupted dn (syntax value)" is too vague to be useful - it doesn't say what DN, it doesn't say what syntax value, so I'm in the dark as what action to take.

Comment 1 Rich Megginson 2012-01-03 20:54:00 UTC
(In reply to comment #0)
> Upgrade 389-ds-base from 1.2.2-1.el5 to 1.2.9.9-1.el5.
> 
> The server refuses to start, the error log complains:
> 
> [28/Dec/2011:06:24:16 -0600] - nsslapd-subtree-rename-switch is on, while the
> in
> stance userRoot is in the DN format. Please run dn2rdn to convert the database
> format.
> [28/Dec/2011:06:24:16 -0600] - nsslapd-subtree-rename-switch is on, while the
> instance NetscapeRoot is in the DN format. Please run dn2rdn to convert the
> databa
> se format.[28/Dec/2011:06:24:16 -0600] - start: Failed to start databases,
> err=-1 Unknown 
> error: -1[28/Dec/2011:06:24:16 -0600] - Failed to start database plugin ldbm
> database[28/Dec/2011:06:24:16 -0600] - WARNING: ldbm instance userRoot already
> exists
> [28/Dec/2011:06:24:16 -0600] - WARNING: ldbm instance NetscapeRoot already
> exists
> 
> Discover that dn2rdn is called from setup-ds.pl, so we run "setup-ds.pl -u". No
> idea why the RPM postinstall script doesn't "do the right thing".

RPM postinstall does run setup-ds.pl -u

> 
> We run "setup-ds.pl -u" and it emits thousands of warnings, one for each entry
> in the database:
> 
> [28/Dec/2011:06:37:16 -0600] - userRoot: WARNING: skipping an entry with a
> corrupted dn (syntax value): zzz0107A (id 63863)
> [28/Dec/2011:06:37:16 -0600] - userRoot: WARNING: skipping an entry with a
> corrupted dn (syntax value): zzz  MS E (id 63864)
> [28/Dec/2011:06:37:16 -0600] - userRoot: WARNING: skipping an entry with a
> corrupted dn (syntax value): zzz0111A (id 63865)
> [28/Dec/2011:06:37:16 -0600] - userRoot: WARNING: skipping an entry with a
> corrupted dn (syntax value): zzz  DR I (id 63866)
> 
> At the end up the upgrade process, the database is completely empty, all data
> has been destroyed.

It should have been saved in the database backup directory - usually /var/lib/dirsrv/slapd-INSTANCE/bak

> 
> The message "skipping an entry with a corrupted dn (syntax value)" is too vague
> to be useful - it doesn't say what DN, it doesn't say what syntax value, so I'm
> in the dark as what action to take.

Once you restore your db, you can use dbscan -K idnumber -f /path/to/id2entry.db4
e.g.
dbscan -K 63866 -f /var/lib/dirsrv/slapd-INSTANCE/db/userRoot/id2entry.db4

Comment 2 Martin Kosek 2012-01-04 12:42:24 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/5

Comment 3 Rich Megginson 2012-01-10 18:05:16 UTC
marking as screened because it has been cloned upstream


Note You need to log in before you can comment on or make changes to this bug.