Project

General

Profile

Bug #11153

sysconfig/apache2 modifications get removed

Added by Janos Mattyasovszky over 1 year ago. Updated 8 months ago.

Status:
Released
Priority:
N/A
Category:
Server components
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Small
Priority:
59

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:

(found in rudder 4.1.5 on SLES11/12)

Associated revisions

Revision 3f0b9058 (diff)
Added by Benoît PECCATTE 10 months ago

Fixes #11153: sysconfig/apache2 modifications get removed

History

#1 Updated by Benoît PECCATTE over 1 year 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 ?

#2 Updated by Janos Mattyasovszky over 1 year ago

I'd recommend using a2enmod to enable the modules

#3 Updated by Janos Mattyasovszky over 1 year 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

#4 Updated by Janos Mattyasovszky over 1 year 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" 

#5 Updated by Benoît PECCATTE over 1 year ago

  • Target version set to 3.1.22

#6 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.22 to 3.1.23

#7 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.23 to 3.1.24
  • Priority changed from 52 to 51

#8 Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 3.1.24 to 3.1.25
  • Priority changed from 51 to 50

#9 Updated by Benoît PECCATTE about 1 year ago

  • Effort required set to Small
  • Priority changed from 50 to 65

#10 Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 3.1.25 to 387
  • Priority changed from 65 to 63

#11 Updated by Vincent MEMBRÉ 12 months ago

  • Target version changed from 387 to 4.1.10

#12 Updated by Benoît PECCATTE 10 months ago

  • Status changed from New to In progress
  • Assignee set to Benoît PECCATTE
  • Priority changed from 63 to 61

#13 Updated by Benoît PECCATTE 10 months 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

#14 Updated by Alexis MOUSSET 10 months ago

  • Status changed from Pending technical review to In progress

I'm taking over this issue!

#15 Updated by Alexis MOUSSET 10 months 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

#16 Updated by Alexis MOUSSET 10 months ago

  • Assignee changed from Nicolas CHARLES to Vincent MEMBRÉ

#17 Updated by Alexis MOUSSET 10 months ago

  • Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES

#18 Updated by Vincent MEMBRÉ 10 months ago

  • Target version changed from 4.1.10 to 4.1.11

#19 Updated by Nicolas CHARLES 9 months 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

#20 Updated by Benoît PECCATTE 8 months ago

  • Status changed from Pending technical review to Pending release
  • Priority changed from 60 to 59

#21 Updated by Alexis MOUSSET 8 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.11, 4.2.5 and 4.3.0~rc3 which were released today.

Also available in: Atom PDF