Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #5495: upgrade on 2.11 does not end correctly #477

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions rudder-webapp/SOURCES/rudder-init
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ else
unset PGPASSWORD
fi

# Override any server values with those from ${RUDDER_ROLES_FILE}
if [ -f ${RUDDER_ROLES_FILE} ]; then
# Override any server values with those from ${RUDDER_ROLES_FILE} , unless this is a monolithic
# Rudder server installation (to keep using localhost)
RUDDER_ROLE_SERVER_ROOT="${RUDDER_OPT}/etc/server-roles.d/rudder-server-root"
if [ ! -f ${RUDDER_ROLE_SERVER_ROOT} -a -f ${RUDDER_ROLES_FILE} ]; then
for role in rudder-db rudder-ldap rudder-inventory-endpoint; do
ROLE_HOSTNAME=$(grep "^${role}:" ${RUDDER_ROLES_FILE} | cut -d: -f2 | cut -d, -f1 | tr -d " ")
if [ ! -z ${ROLE_HOSTNAME} ]; then
Expand Down
6 changes: 4 additions & 2 deletions rudder-webapp/SOURCES/rudder-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ else
unset PGPASSWORD
fi

# Override any server values with those from ${RUDDER_ROLES_FILE}
# Override any server values with those from ${RUDDER_ROLES_FILE}, unless this is a monolithic
# Rudder server installation (to keep using localhost)
RUDDER_ROLE_SERVER_ROOT="${RUDDER_OPT}/etc/server-roles.d/rudder-server-root"
RUDDER_ROLES_FILE="${RUDDER_VAR}/cfengine-community/inputs/rudder-server-roles.conf"
if [ -f ${RUDDER_ROLES_FILE} ]; then
if [ ! -f ${RUDDER_ROLE_SERVER_ROOT} -a -f ${RUDDER_ROLES_FILE} ]; then
for role in rudder-db rudder-ldap; do
ROLE_HOSTNAME=$(grep "^${role}:" ${RUDDER_ROLES_FILE} | cut -d: -f2 | cut -d, -f1 | tr -d " ")
if [ ! -z ${ROLE_HOSTNAME} ]; then
Expand Down