Bug 1247547

Summary: overcloud: HA: httpd service should not be started on boot by systemd.
Product: Red Hat OpenStack Reporter: Leonid Natapov <lnatapov>
Component: openstack-tripleo-heat-templatesAssignee: Giulio Fidente <gfidente>
Status: CLOSED ERRATA QA Contact: Leonid Natapov <lnatapov>
Severity: high Docs Contact:
Priority: high    
Version: DirectorCC: gfidente, jamada, jdonohue, mandreou, mburns, oblaut, rhel-osp-director-maint
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-0.8.7-5.el7ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-07 21:38:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1262263    

Description Leonid Natapov 2015-07-28 09:52:23 UTC
overcloud: HA: httpd service should not be started on boot by systemd.


[root@overcloud-controller-0 heat-admin]# systemctl status httpd
httpd.service - Cluster Controlled httpd
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)

Comment 4 Marios Andreou 2015-09-02 11:50:11 UTC
i just went through rebase hell to make this a downstream change too but after running as sanity check i get this trace [0] on controller. I need to revisit to find out why.

for tracking:

upstream @ https://review.openstack.org/#/c/206463/
downstream @ https://code.engineering.redhat.com/gerrit/#/c/56898

[0]
6152:Sep 02 07:32:24 overcloud-controller-0.localdomain os-collect-config[1787]: Error: Could not find resource 'Service[httpd]' for relationship from 'File[/etc/openstack-dashboard/local_settings]' on node overcloud-controller-0.localdomain
6153:Sep 02 07:32:24 overcloud-controller-0.localdomain os-collect-config[1787]: Error: Could not find resource 'Service[httpd]' for relationship from 'File[/etc/openstack-dashboard/local_settings]' on node overcloud-controller-0.localdomain
6154:Sep 02 07:32:24 overcloud-controller-0.localdomain os-collect-config[1787]: [2015-09-02 07:32:24,138] (heat-config) [ERROR] Error running /var/lib/heat-config/heat-config-puppet/4b0ad5be-1220-4ae4-9e2d-0489e1f12974.pp. [1]

Comment 5 Marios Andreou 2015-09-04 16:51:12 UTC
I spent a while poking at this today. I couldn't get a clean run when I tried to tell the apache module not to manage the service (and leave it up to the existing pacemaker service declaration for httpd later on in the overcloud_controller_pacemaker.pp to start it), i.e. what the current upstream review does. I consistently hit the error in comment 4 above. For that particular error, I traced it down to [1][2]. I think the expectation is that the horizon module will manage apache (via horizon::wsgi::apache). 

For now best I can offer is to make the service be disabled for system boot (which from the bug title, seems to be the actual request). I also moved the declaration of the pacemaker managed httpd service to much earlier. Updated upstream review @ https://review.openstack.org/#/c/206463/

That at least runs clean for me and ends up with httpd being disabled for boot startup:

[root@overcloud-controller-0 heat-admin]# systemctl status httpd
httpd.service - Cluster Controlled httpd
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)

The dashboard also seems fine but didn't poke too much, more testing appreciated:

curl -v http://192.0.2.19:80/dashboard

< HTTP/1.1 302 FOUND
< Date: Fri, 04 Sep 2015 16:23:40 GMT
< Server: Apache/2.4.6 (Red Hat Enterprise Linux)
< Vary: Accept-Language,Cookie
< X-Frame-Options: SAMEORIGIN
< Content-Language: en
< Location: http://192.0.2.19/dashboard/auth/login/?next=/dashboard/
< Content-Length: 0
< Connection: close
< Content-Type: text/html; charset=utf-8
< 
* Closing connection 0


[1] https://github.com/openstack/puppet-horizon/blob/master/manifests/wsgi/apache.pp#L107
[2]https://github.com/openstack/puppet-horizon/blob/master/manifests/wsgi/apache.pp#L151

Comment 7 Raoul Scarazzini 2015-10-13 16:06:44 UTC
*** Bug 1266308 has been marked as a duplicate of this bug. ***

Comment 8 Giulio Fidente 2015-12-02 09:20:24 UTC
This has a patch downstream and the upstream version merged already; shouldn't we just include this in 7?

Comment 11 Leonid Natapov 2016-02-28 10:26:19 UTC
openstack-tripleo-heat-templates-0.8.7-12.el7ost.noarch

httpd not started on boot.

Comment 13 errata-xmlrpc 2016-04-07 21:38:28 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://rhn.redhat.com/errata/RHEA-2016-0604.html