Project

General

Profile

Actions

Bug #3528

closed

During migration from 2.5.1 to 2.6.0 nightly, the LDAP server could sometimes not be contacted and the script rudder-upgrade can't be properly applied

Added by Nicolas PERRON over 11 years ago. Updated over 9 years ago.

Status:
Released
Priority:
1 (highest)
Assignee:
Matthieu CERDA
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

During the migration from 2.5.1 to 2.6.0 nightly, the script /opt/rudder/rudder-upgrade is launched. Nevertheless, it seems to failed in some cases and the attributes for the workflow needed in 2.6 is not added:

Output of a failure:

[...]
Rudder application is down, it might be reloading. Deferring restart.
/opt/rudder/etc/rudder-users.xml is conform
Modifying system group entries in LDAP if necessary...
ldap_result: Can't contact LDAP server (-1)
modifying entry "groupCategoryId=SystemGroups,groupCategoryId=GroupRoot,ou=Rudder,cn=rudder-configuration" 

modifying entry "ruleTarget=policyServer:root,groupCategoryId=SystemGroups,groupCategoryId=GroupRoot,ou=Rudder,cn=rudder-configuration" 

********************************************************************************
rudder-webapp has been upgraded, but for the upgrade to take effect, please
restart the jetty application server as follows:
# /etc/init.d/jetty restart
********************************************************************************
[...]

Output of a successful migration:

[...]
Rudder application is down, it might be reloading. Deferring restart.
/opt/rudder/etc/rudder-users.xml is conform
Modifying system group entries in LDAP if necessary...
modifying entry "groupCategoryId=SystemGroups,groupCategoryId=GroupRoot,ou=Rudder,cn=rudder-configuration" 

modifying entry "ruleTarget=policyServer:root,groupCategoryId=SystemGroups,groupCategoryId=GroupRoot,ou=Rudder,cn=rudder-configuration" 

modifying entry "ruleTarget=special:all,groupCategoryId=SystemGroups,groupCategoryId=GroupRoot,ou=Rudder,cn=rudder-configuration" 

modifying entry "ruleTarget=special:all_exceptPolicyServers,groupCategoryId=SystemGroups,groupCategoryId=GroupRoot,ou=Rudder,cn=rudder-configuration" 

modifying entry "nodeGroupId=hasPolicyServer-root,groupCategoryId=SystemGroups,groupCategoryId=GroupRoot,ou=Rudder,cn=rudder-configuration" 

OK
Converting escaped directive variabled to plain format...
    # If some entries match something like " or \, convert them to either  or  and change them in the LDAP.
OK
psql:/opt/rudder/share/upgrade-tools/dbMigration-2.5-2.6-add_workflow_support.sql:48: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "changerequest_pkey" for table "changerequest" 
New configuration property rudder.workflow.enabled added to /opt/rudder/etc/rudder-web.properties
New configuration property rudder.workflow.self.validation added to /opt/rudder/etc/rudder-web.properties
New configuration property rudder.workflow.self.deployment added to /opt/rudder/etc/rudder-web.properties
********************************************************************************
rudder-webapp has been upgraded, but for the upgrade to take effect, please
restart the jetty application server as follows:
# /etc/init.d/jetty restart
********************************************************************************
[...]

It is strange that when it fails, the ldif has been partially applied. The code from rudder-upgrade is:

[...]
# - 2.6.0 : Migration LDAP modify entries about System groups
echo "Modifying system group entries in LDAP if necessary..." 
# Ensure that LDAP exist before to do any request
if [ ${LDAP_EXISTS} -ne 0 ]; then
/opt/rudder/bin/ldapmodify -x -D ${LDAP_USER} -w ${LDAP_PASSWORD} -H ldap://localhost -f ${RUDDER_UPGRADE_TOOLS}/rudder-upgrade-modify-system-group-entries.ldif
fi
echo "OK" 
[...]

To analyze the problem, we should retry a migration with slapd.conf with a stats loglevel and search what is in the logs when failing.

Actions #1

Updated by Matthieu CERDA over 11 years ago

  • Project changed from Rudder to 34
  • Status changed from New to In progress
  • Assignee set to Matthieu CERDA
  • Priority changed from N/A to 1 (highest)
  • Target version set to 2.6.0~rc1
Actions #2

Updated by Matthieu CERDA over 11 years ago

  • Status changed from In progress to Pending technical review
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/52

PR available

Actions #3

Updated by Matthieu CERDA over 11 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:8248fed4ff2dd3f859b6ad6e8c5f64053290d22e.

Actions #4

Updated by Jonathan CLARKE over 11 years ago

Applied in changeset commit:dccec37be72d943e9d0b7c3809eec5e2976e797a.

Actions #5

Updated by Jonathan CLARKE over 11 years ago

  • Status changed from Pending release to Released
Actions #6

Updated by Benoît PECCATTE over 9 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF