Bug 1319780 - apachectl use httpd from system instead of collection one
Summary: apachectl use httpd from system instead of collection one
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: httpd
Version: httpd24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 2.2
Assignee: Jan Kaluža
QA Contact: Ondřej Pták
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-21 14:05 UTC by Ondřej Pták
Modified: 2016-05-31 10:17 UTC (History)
2 users (show)

Fixed In Version: httpd24-httpd-2.4.18-5.el6 httpd24-httpd-2.4.18-5.el7
Doc Type: Known Issue
Doc Text:
The apachectl script uses the system /usr/bin/httpd binary file instead of the Software Collection one: /opt/rh/httpd24/root/usr/sbin/httpd. Consequently, it is impossible to control the httpd daemon from the httpd24 collection using the apachectl script. To work around this problem, use the initscript or systemd service file to control httpd from the Software Collection.
Clone Of:
Environment:
Last Closed: 2016-05-31 10:17:11 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1154 0 normal SHIPPED_LIVE httpd24 bug fix and enhancement update 2016-05-31 13:48:49 UTC

Description Ondřej Pták 2016-03-21 14:05:23 UTC
Description of problem:
/opt/rh/httpd24/root/usr/sbin/apachectl has hardcoded path to httpd binary, which is a regression since httpd24-httpd-2.4.12-6.el7.1.x86_64, here is what changed since that version:

# diff ~/apachect_{old,new}
96c96
<   runcon -- `id -Z` $HTTPD $OPTIONS -t
---
>   runcon -- `id -Z` /usr/sbin/httpd $OPTIONS -t
98c98
<   $HTTPD $OPTIONS -t
---
>   /usr/sbin/httpd $OPTIONS -t
137c137
<     $HTTPD $OPTIONS "$@"
---
>     /usr/sbin/httpd $OPTIONS "$@"

So for example "apachectl configtest" always use /usr/bin/httpd (and check /etc/httpd/*).

Version-Release number of selected component (if applicable):
httpd24-httpd-2.4.18-4.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. grep '/usr/sbin/httpd' /opt/rh/httpd24/root/usr/sbin/apachectl

Actual results:
HTTPD='/opt/rh/httpd24/root/usr/sbin/httpd'
  runcon -- `id -Z` /usr/sbin/httpd $OPTIONS -t
  /usr/sbin/httpd $OPTIONS -t
    /usr/sbin/httpd $OPTIONS "$@"

Expected results:
HTTPD='/opt/rh/httpd24/root/usr/sbin/httpd'


Additional info:

Comment 3 Ondřej Pták 2016-03-23 17:01:07 UTC
Also affects this use case:

service httpd24-httpd configtest

Comment 10 errata-xmlrpc 2016-05-31 10:17:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1154


Note You need to log in before you can comment on or make changes to this bug.