Actions
Bug #3528
closedDuring 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
Status:
Released
Priority:
1 (highest)
Assignee:
Matthieu CERDA
Category:
Packaging
Target version:
Pull Request:
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