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.
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.
Or you can try following, it might help: Class['::apache'] { default_vhost => false, }
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
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?
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.
Created attachment 931660 [details] Add manage_service feature for horizon Added changes to RPM patch suggested by Jason Guiditta
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.
Created attachment 931662 [details] Add manage_service feature for horizon [2]
OK, at least visually, this looks right
I'm pretty sure that removing definition of class 'apache' gonna break Packstack ...
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? :)
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?
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.
the patch we added yesterday to the package doesn't break packstack because it has "include ::apache"
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