Bug 1129408 - HA: Systemd unit needs option to be disabled for horizon
Summary: HA: Systemd unit needs option to be disabled for horizon
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-puppet-modules
Version: 5.0 (RHEL 7)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 5.0 (RHEL 7)
Assignee: Martin Magr
QA Contact: Leonid Natapov
URL:
Whiteboard:
Depends On:
Blocks: 1123303
TreeView+ depends on / blocked
 
Reported: 2014-08-12 16:52 UTC by Jason Guiditta
Modified: 2016-04-26 17:54 UTC (History)
10 users (show)

Fixed In Version: openstack-puppet-modules-2014.1-21.4.el6ost
Doc Type: Bug Fix
Doc Text:
Clone Of: 1123303
Environment:
Last Closed: 2014-09-02 18:10:42 UTC


Attachments (Terms of Use)
Add manage_service feature for horizon (3.44 KB, patch)
2014-08-27 19:44 UTC, Ivan Chavero
no flags Details | Diff
Add manage_service feature for horizon [2] (3.30 KB, patch)
2014-08-27 20:05 UTC, Ivan Chavero
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1125 normal SHIPPED_LIVE openstack-packstack and openstack-puppet-modules bug fix advisory 2014-09-02 22:09:22 UTC
OpenStack gerrit 115690 None None None Never

Comment 4 Jason Guiditta 2014-08-26 21:20:39 UTC
This creates a duplicate declaration error for us in quick stack, and I am not sure how to get around it.  We have the following patch in our manifests with which this conflicts:

https://github.com/redhat-openstack/astapor/pull/284

Any ideas?  I tried removing our ::apache declaration, and the old error (linked there) just resurfaces.

Comment 6 Martin Magr 2014-08-27 09:20:50 UTC
Class ::horizon already contains ::apache definition (via ::horizon::wsgi::apache), so you should remove all ::apache definitions from your manifests.

If you need to change default_vhost value to false then I'm afraid we will need to create another patch for that.

Comment 7 Martin Magr 2014-08-27 11:22:26 UTC
Or you can try following, it might help:

Class['::apache'] {
  default_vhost => false,
}

Comment 8 Jason Guiditta 2014-08-27 14:38:25 UTC
Ok, so that failed with:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Only subclasses can override parameters at 43:/usr/share/openstack-foreman-installer/puppet/modules/quickstack/manifests/horizon.pp on node c1a2.example.com


I also tried 'amending with a collector' as so:

 include ::apache
  Class <| title == '::apache'|> {
    default_vhost => false,
  }

and that got me:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Resource type class doesn't exist on node c1a2.example.com

Comment 9 Jason Guiditta 2014-08-27 14:46:31 UTC
What if the opm patch just didn't include the block:

class { '::apache':
  service_enable => $enabled,
  service_ensure => $service_ensure,
}

in wsgi/apache.pp?

I tried this in my setup, and changed out call to:

class { '::apache' :
  default_vhost => false,
  service_enable => false,
  service_ensure => false,
}

and it got me past the error (though I am not yet sure if it properly disabled the service or not, due to other things that I am testing being in the way of a complete run).. Does that make any sense?

Comment 10 Jason Guiditta 2014-08-27 16:24:23 UTC
Ok, I tested this on my setup, and it seems to work.  httpd.service is disabled as expected, and pacemaker has started the service, also as expected.

Comment 12 Ivan Chavero 2014-08-27 19:44:10 UTC
Created attachment 931660 [details]
Add manage_service feature for horizon

Added changes to RPM patch suggested by Jason Guiditta

Comment 13 Jason Guiditta 2014-08-27 19:57:49 UTC
I mean for 
+  class { '::apache':
+    default_vhost => false,
+    service_enable => $enabled,
+    service_ensure => $service_ensure,
+  }

to go into quick stack, I don't know that it makes sense to set default_vhost = false for everyone, including packstack, but we need it for quick stack.

Comment 14 Ivan Chavero 2014-08-27 20:05:05 UTC
Created attachment 931662 [details]
Add manage_service feature for horizon [2]

Comment 15 Jason Guiditta 2014-08-27 21:09:30 UTC
OK, at least visually, this looks right

Comment 16 Martin Magr 2014-08-28 08:22:21 UTC
I'm pretty sure that removing definition of class 'apache' gonna break Packstack ...

Comment 17 Martin Magr 2014-08-28 10:59:25 UTC
Apparently I was wrong. Seems like class apache::service is used even though class apache is not defined in packstack's horizon.pp manifest. 

... can somebody explain how this is possible? :)

Comment 18 Martin Magr 2014-08-28 11:12:58 UTC
Ah-hah, there's notification defined, which is pulling the ::apache::service class:

File[$::horizon::params::config_file] ~> Service[$::horizon::params::http_service]

While this is working, I think this is a fragile state and we should avoid that. What was the reason for removing ::apache definition from ::horizon::wsgi::apache anyway?

Comment 19 Jason Guiditta 2014-08-28 13:54:50 UTC
Yeah, the old version here had include ::apache, which should probably still be there.  I think I was unclear when I discussed this with Ivan.  Include will work fine, but class declaration makes it so quick stack cannot override the default_vhost param, which we need to do.

Comment 20 Ivan Chavero 2014-08-29 00:49:26 UTC
the patch we added yesterday to the package doesn't break packstack because it has "include ::apache"

Comment 22 errata-xmlrpc 2014-09-02 18:10:42 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.

http://rhn.redhat.com/errata/RHBA-2014-1125.html


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