Bug #11153
closedsysconfig/apache2 modifications get removed
Description
On SLES editing the /etc/sysconfig/apache2
file by adding two files to be sourced is not a good idea.
the template-fillup system by suse removes them on each update of the apache2 package:
Extraction of apache2 rpm's scripts:
PNAME=apache2 SUBPNAME= TEMPLATE_DIR=/var/adm/fillup-templates SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME$SUBPNAME SD_NAME="" if [ -x /bin/fillup ] ; then if [ -f $SYSC_TEMPLATE ] ; then echo "Updating /etc/sysconfig/$SD_NAME$PNAME..." mkdir -p /etc/sysconfig/$SD_NAME touch /etc/sysconfig/$SD_NAME$PNAME /bin/fillup -q /etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE fi else echo "ERROR: fillup not found. This should not happen. Please compare" echo "/etc/sysconfig/$PNAME and $TEMPLATE_DIR/sysconfig.$PNAME and" echo "update by hand." fi
Before called:
rudder # tail /etc/sysconfig/apache2 # APACHE_EXTENDED_STATUS="off" APACHE_DISABLE_SSL_COMPRESSION="on" # This sources the modules/defines needed by Rudder . /etc/sysconfig/rudder-relay-apache # This sources the modules/defines needed by Rudder . /etc/sysconfig/rudder-webapp-apache
Calling fillup
:
rudder # /bin/fillup -q /etc/sysconfig/apache2 /var/adm/fillup-templates/sysconfig.apache2 rudder #
Afterwards:
rudder # tail /etc/sysconfig/apache2 ## Default: "off" ## ServiceReload: apache2 # # If mod_status is used, include extended information about the server, like # CPU usage, in the status report. It is a server-wide setting, and it can cost # some performance! # APACHE_EXTENDED_STATUS="off" APACHE_DISABLE_SSL_COMPRESSION="on"
poof, it's gone.
this causes apache2 not to start, because mostly proxy and wcgi modules are not enabled, only by the sourcing of the additional stuff.
it also requires re-adding the lines after each apache2 rpm update :-/
you could either:- use
a2enmod
to enable all necessary modules - use an rpm trigger on apache2, to re-add the sourcing part (http://ftp.rpm.org/api/4.4.2.2/triggers.html)
(found in rudder 4.1.5 on SLES11/12)
Updated by Benoît PECCATTE over 7 years ago
- User visibility set to Operational - other Techniques | Technique editor | Rudder settings
- Priority changed from 0 to 52
Where should we put the configuration if the configuration is overwritten by suse on each upgrade ?
Is there a documentation for fillup somewhere ?
Updated by Janos Mattyasovszky over 7 years ago
I'd recommend using a2enmod
to enable the modules
Updated by Janos Mattyasovszky over 7 years ago
A quick script I came up, completely untested:
for FLAG in SSL; do ( source /etc/sysconfig/apache2; grep -qw "$FLAG" <<<"${APACHE_SERVER_FLAGS}") || e2enflag "$FLAG"; done for MOD in dav dav_fs ssl version wsgi filter deflate; do a2enmod -l | grep -qw "$MOD" || a2enmod "$MOD"; done
Updated by Janos Mattyasovszky over 7 years ago
As discussed, the fillup does not remove the source-part if it is followed by an additional KEY="VALUE"
settings:
# This sources the modules/defines needed by Rudder . /etc/sysconfig/rudder-relay-apache # This sources the modules/defines needed by Rudder . /etc/sysconfig/rudder-webapp-apache # This line is necessary for fillup not to remove any lines above. See #11153 APACHE_RUDDER_CUSTOMIZED="true"
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.22 to 3.1.23
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.23 to 3.1.24
- Priority changed from 52 to 51
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 3.1.24 to 3.1.25
- Priority changed from 51 to 50
Updated by Benoît PECCATTE about 7 years ago
- Effort required set to Small
- Priority changed from 50 to 65
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 3.1.25 to 387
- Priority changed from 65 to 63
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 387 to 4.1.10
Updated by Benoît PECCATTE almost 7 years ago
- Status changed from New to In progress
- Assignee set to Benoît PECCATTE
- Priority changed from 63 to 61
Updated by Benoît PECCATTE almost 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Benoît PECCATTE to Alexis Mousset
- Pull Request set to https://github.com/Normation/rudder-packages/pull/1499
Updated by Alexis Mousset almost 7 years ago
- Status changed from Pending technical review to In progress
I'm taking over this issue!
Updated by Alexis Mousset almost 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Alexis Mousset to Nicolas CHARLES
- Pull Request changed from https://github.com/Normation/rudder-packages/pull/1499 to https://github.com/Normation/rudder-packages/pull/1509
Updated by Alexis Mousset almost 7 years ago
- Assignee changed from Nicolas CHARLES to Vincent MEMBRÉ
Updated by Alexis Mousset almost 7 years ago
- Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 4.1.10 to 4.1.11
Updated by Nicolas CHARLES over 6 years ago
- Assignee changed from Nicolas CHARLES to Alexis Mousset
- Priority changed from 61 to 60
I'm pretty sure I cannot do anything about this one - assigning to Alexis as there are feedbacks on the PR
Updated by Benoît PECCATTE over 6 years ago
- Status changed from Pending technical review to Pending release
- Priority changed from 60 to 59
Applied in changeset rudder-packages|3f0b9058b0946c6dbd1688198b2413001963abd9.
Updated by Alexis Mousset over 6 years ago
- Status changed from Pending release to Released