Project

General

Profile

Actions

Bug #11153

closed

sysconfig/apache2 modifications get removed

Added by Janos Mattyasovszky over 7 years ago. Updated over 6 years ago.

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

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)

Actions #1

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 ?

Actions #2

Updated by Janos Mattyasovszky over 7 years ago

I'd recommend using a2enmod to enable the modules

Actions #3

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
Actions #4

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" 
Actions #5

Updated by Benoît PECCATTE over 7 years ago

  • Target version set to 3.1.22
Actions #6

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.22 to 3.1.23
Actions #7

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
Actions #8

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
Actions #9

Updated by Benoît PECCATTE about 7 years ago

  • Effort required set to Small
  • Priority changed from 50 to 65
Actions #10

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.25 to 387
  • Priority changed from 65 to 63
Actions #11

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 387 to 4.1.10
Actions #12

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
Actions #13

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
Actions #14

Updated by Alexis Mousset almost 7 years ago

  • Status changed from Pending technical review to In progress

I'm taking over this issue!

Actions #15

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
Actions #16

Updated by Alexis Mousset almost 7 years ago

  • Assignee changed from Nicolas CHARLES to Vincent MEMBRÉ
Actions #17

Updated by Alexis Mousset almost 7 years ago

  • Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
Actions #18

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 4.1.10 to 4.1.11
Actions #19

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

Actions #20

Updated by Benoît PECCATTE over 6 years ago

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

Updated by Alexis Mousset over 6 years 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.

Actions

Also available in: Atom PDF