Actions
Bug #10131
closedrudder-relay has bad "sed" line
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
Upgrade from 4.0 -> 4.1.0.beta2.
Was:
# rpm -qa rudder\* rudder-jetty-4.0.1.release-1.SLES.11 rudder-techniques-4.0.1.release-1.SLES.11 rudder-server-root-4.0.1.release-1.SLES.11 rudder-reports-4.0.1.release-1.SLES.11 rudder-inventory-ldap-4.0.1.release-1.SLES.11 rudder-webapp-4.0.1.release-1.SLES.11 rudder-agent-4.0.1.release-1.SLES.11 rudder-inventory-endpoint-4.0.1.release-1.SLES.11
Upgrade:
# zypper -v up -r Rudder_4.1.0b2 Verbosity: 1 Initializing Target Checking whether to refresh metadata for Rudder_4.1.0b2 Loading repository data... Reading installed packages... Force resolution: No The following NEW package is going to be installed: rudder-server-relay 1398866025:4.1.0.beta2-1.SLES.11 The following packages are going to be upgraded: ncf 1398866025:1.0.0.201612071136-1.SLES.11 -> 1398866025:1.1.0.201702020005-1.SLES.11 ncf-api-virtualenv 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-agent 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-inventory-endpoint 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-inventory-ldap 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-jetty 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-reports 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-server-root 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-techniques 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 rudder-webapp 1398866025:4.0.1.release-1.SLES.11 -> 1398866025:4.1.0.beta2-1.SLES.11 The following packages are not supported by their vendor: ncf 1398866025:1.1.0.201702020005-1.SLES.11 ncf-api-virtualenv 1398866025:4.1.0.beta2-1.SLES.11 rudder-agent 1398866025:4.1.0.beta2-1.SLES.11 rudder-inventory-endpoint 1398866025:4.1.0.beta2-1.SLES.11 rudder-inventory-ldap 1398866025:4.1.0.beta2-1.SLES.11 rudder-jetty 1398866025:4.1.0.beta2-1.SLES.11 rudder-reports 1398866025:4.1.0.beta2-1.SLES.11 rudder-server-relay 1398866025:4.1.0.beta2-1.SLES.11 rudder-server-root 1398866025:4.1.0.beta2-1.SLES.11 rudder-techniques 1398866025:4.1.0.beta2-1.SLES.11 rudder-webapp 1398866025:4.1.0.beta2-1.SLES.11 10 packages to upgrade, 1 new. Overall download size: 211.3 MiB. After the operation, 267.2 MiB will be freed. Continue? [y/n/? shows all options] (y): [..] Installing: rudder-server-relay-1398866025:4.1.0.beta2-1.SLES.11 [done] Additional rpm output: INFO: Creating the rudder user... Done INFO: Setting Apache HTTPd as a boot service... Done INFO: Stopping Apache HTTPd... Done sed: can't read /var/tmp/rudder-server-relay-4.1.0.beta2-1.SLES.11-root-root/opt/rudder/etc/rudder-apache-relay-common.conf: No such file or directory INFO: Importing existing webapp certificates... Done INFO: An old rudder virtual host file has been detected (rudder-vhost.conf), it will be moved to /var/backups. Done INFO: An old rudder virtual host file has been detected (rudder-vhost-ssl.conf), it will be moved to /var/backups. Done INFO: Starting Apache HTTPd...[Fri Feb 03 09:22:40 2017] [warn] module ssl_module is already loaded, skipping [Fri Feb 03 09:22:40 2017] [warn] module wsgi_module is already loaded, skipping Warning: DocumentRoot [/var/www] does not exist Warning: DocumentRoot [/var/www] does not exist Done ***************************************************************************************** INFO: rudder-server-relay setup complete. INFO: INFO: * If you are installing a root server, configuration is automatically done INFO: * If you are installing a simple relay, run: INFO: '/opt/rudder/bin/rudder-node-to-relay root' INFO: on your root server to complete this node transition to a relay server. INFO: Please look at the documentation for details (Section 'Relay servers') ***************************************************************************************** [..]
The issue is in this sed statement in the rpm scripts:
# rpm -q --scripts rudder-server-relay-4.1.0.beta2-1.SLES.11 | grep sed sed -i "/. \/etc\/sysconfig\/rudder-apache/d" /etc/sysconfig/apache2 sed -i "s%^DocumentRoot /var/www$%DocumentRoot /srv/www%" /var/tmp/rudder-server-relay-4.1.0.beta2-1.SLES.11-root-root/opt/rudder/etc/rudder-apache-relay-common.conf
Actions