Bug #11277
closedBad documentation about roles may lead to upgrade failing
Description
Hi,
I have an error when upgrading my rudder server from 4.1.3 to 4.1.6 on post upgrade script (/opt/rudder/bin/rudder-upgrade), here is an extract :
INFO: Checking PostgreSQL service status............ FAILED
PostgreSQL service verification failed after 10 tries.
INFO: Checking LDAP service status............ FAILED
LDAP service verification failed after 10 tries.
I have four servers and results depend on values in this file /var/rudder/cfengine-community/inputs/rudder-server-roles.conf.
For exemple one server with this content in /var/rudder/cfengine-community/inputs/rudder-server-roles.conf :
rudder-ldap:rudder-srv01
rudder-inventory-endpoint:rudder-srv01
rudder-db:pg-serv
rudder-relay-top:rudder-srv01
rudder-web:rudder-srv01
Upgrade script will fail when testing ldap and db access :
INFO: Launching script to check if a migration is needed
INFO: Checking if rudder-web.properties database access credentials are all right... LDAP OK, SQL OK
INFO: Checking if inventory-web.properties database access credentials are all right... LDAP OK, SQL skipped
INFO: A Technique library reload is needed and has been scheduled.
INFO: The /var/rudder/configuration-repository/techniques/ncf_techniques/category.xml file already exists. Not updating.
INFO: Alternative source path added: /var/rudder/configuration-repository/ncf
INFO: Checking PostgreSQL service status... OK
INFO: Checking LDAP service status............ FAILED
LDAP service verification failed after 10 tries.
Here is an extract of /opt/rudder/etc/rudder-web.properties :
ldap.host=localhost
rudder.server-roles.ldap=rudder-srv01
The problem is that upgrade script check role from this file /var/rudder/cfengine-community/inputs/rudder-server-roles.conf and this content override value of LDAP_SERVER variable at runtime.
Changing rudder.server-roles.ldap=rudder-srv01 to rudder.server-roles.ldap=autodetect does not change the result.
Excecuting /opt/rudder/bin/rudder-upgrade before and after upgrade result into the same problem.
LDAP service is bind on localhost and the upgrade script try to connect throught server hostname resolution (server ip) which is not possible.
When temporarily changing value of rudder-ldap:rudder-srv01 to rudder-ldap:localhost from /var/rudder/cfengine-community/inputs/rudder-server-roles.conf result to a working upgrade script.
I have a external DB.
I have one server with a bad value on rudder-db:rudder-srv01 instead of rudder-db:pg-serv in /var/rudder/cfengine-community/inputs/rudder-server-roles.conf and upgrade script also fails on database check.
I don't have /opt/rudder//etc/server-roles.d/rudder-server-root file
DNS resolution works.
Ldap service was not modify by hand.
If you want i can give you more information about this issue.
Thanks