Project

General

Profile

Actions

Bug #10505

closed

During a migration from 4.0 to 4.1, ldap base was emptied

Added by François ARMAND over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
System integration
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
60
Name check:
Fix check:
Regression:

Description

I'm not exactly sure about what happened, I don't see error in the process, but after the upgrade, the LDAP base is completely empty (not even root object).

The first symptom was that there was no CSS/JS at all, which is strange and reminds #10430.
The webapp logs are full of LDAP errors:

[2017-03-24 14:51:26] ERROR com.normation.rudder.repository.ldap.LDAPGitRevisionProvider - The root entry of the user template library was not found, the current revision won't be persisted
[2017-03-24 14:51:28] ERROR com.normation.ldap.sdk.ROPooledSimpleAuthConnectionProvider - Can't execute LDAP request
com.unboundid.ldap.sdk.LDAPSearchException: no such object
>-at com.unboundid.ldap.sdk.LDAPConnection.search(LDAPConnection.java:3650)
...
[2017-03-24 14:51:28] ERROR com.normation.ldap.sdk.ROPooledSimpleAuthConnectionProvider - Can't execute LDAP request
com.unboundid.ldap.sdk.LDAPSearchException: no such object
>-at com.unboundid.ldap.sdk.LDAPConnection.search(LDAPConnection.java:3650)

An ldapsearch returned excatly nothing:

root@server:/var/rudder/ldap/backup# ldapsearch -v -h localhost -p 389  -x -D "cn=Manager,cn=rudder-configuration" -w b385ddd5a0b4 -b "cn=rudder-configuration" -s sub "1.1" 

ldap_initialize( ldap://localhost:389 )
filter: (objectclass=*)
requesting: 1.1
# extended LDIF
#
# LDAPv3
# base <cn=rudder-configuration> with scope subtree
# filter: (objectclass=*)
# requesting: 1.1
#

# search result
search: 2
result: 32 No such object

# numResponses: 1

So, this was easely solved by restauring the pre-migration backup, but it is not quite satisfying:

$ service rudder-slapd stop
$ cd /var/rudder/ldap/backup
$ gunzip openldap-data-pre-upgrade-20170324143846.ldif.gz
$ /opt/rudder/sbin/slapadd -l openldap-data-pre-upgrade-20170324143846.ldif
$ /etc/init.d/rudder-slapd start
$ service rudder-jetty restart

Related issues 2 (0 open2 closed)

Related to Rudder - Bug #10430: Broken pages served by Rudder 4.1 with no explanation (missing JS/CSS due to unavailable LDAP server)RejectedActions
Is duplicate of Rudder - Bug #10517: slapd migration for 4.1 is not done on Ubuntu 16.04ReleasedBenoît PECCATTEActions
Actions

Also available in: Atom PDF