Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCL support for httpd and php7.1 #1822

Merged
merged 2 commits into from
Dec 14, 2018
Merged

SCL support for httpd and php7.1 #1822

merged 2 commits into from
Dec 14, 2018

Conversation

mmoll
Copy link
Contributor

@mmoll mmoll commented Aug 25, 2018

No description provided.

@mmoll
Copy link
Contributor Author

mmoll commented Aug 25, 2018

rebased version of GH-1752

@mmoll
Copy link
Contributor Author

mmoll commented Aug 25, 2018

@ekohl ☝️

@kny78
Copy link

kny78 commented Nov 5, 2018

I would be happy if this is merged. But I have limited time, as I have been transferred to another project.

I believe it should be more or less ready to merge.

@david22swan
Copy link
Member

@mmoll @kny78 While the code looks good overall it would still require some test coverage to be added to it to get a merge.

@mmoll
Copy link
Contributor Author

mmoll commented Nov 14, 2018

OK, I'll add some tests soon:tm:

@mmoll
Copy link
Contributor Author

mmoll commented Nov 18, 2018

After quite some wrangling: Here we have a working acceptance test.

spec/acceptance/zzz_centos_scl_spec.rb Outdated Show resolved Hide resolved
@david22swan
Copy link
Member

@mmoll Your changes give failures on redhat 6. I've put the error messages below:

02:21:57 Failures:
02:21:57 
02:21:57   1) CentOS with SCL enabled when setting the respective parameters succeeds in puppeting Apache and PHP from SCL
02:21:57      Failure/Error: apply_manifest(pp, catch_failures: true)
02:21:57      Beaker::Host::CommandFailure:
02:21:57        Host 'w79pbod5d4yfkg4.delivery.puppetlabs.net' exited with 6 running:
02:21:57         puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.yBhEBt
02:21:57        Last 10 lines of output were:
02:21:57        	Info: Concat[25-sclphp.example.com.conf]: Scheduling refresh of Class[Apache::Service]
02:21:57        	Info: Class[Apache::Service]: Scheduling refresh of Service[httpd]
02:21:57        	Error: Could not start Service[httpd]: Execution of '/sbin/service httpd24-httpd start' returned 1: Starting httpd: httpd: Syntax error on line 42 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 1 of /opt/rh/httpd24/root/etc/httpd/conf.d/authn_alias.load: Cannot load modules/mod_authn_alias.so into server: /opt/rh/httpd24/root/etc/httpd/modules/mod_authn_alias.so: cannot open shared object file: No such file or directory
02:21:57        	[FAILED]
02:21:57        	Error: /Stage[main]/Apache::Service/Service[httpd]/ensure: change from 'stopped' to 'running' failed: Could not start Service[httpd]: Execution of '/sbin/service httpd24-httpd start' returned 1: Starting httpd: httpd: Syntax error on line 42 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 1 of /opt/rh/httpd24/root/etc/httpd/conf.d/authn_alias.load: Cannot load modules/mod_authn_alias.so into server: /opt/rh/httpd24/root/etc/httpd/modules/mod_authn_alias.so: cannot open shared object file: No such file or directory
02:21:57        	[FAILED]
02:21:57        	Notice: /Stage[main]/Apache::Service/Service[httpd]: Triggered 'refresh' from 1 event
02:21:57        	Info: Class[Apache::Service]: Unscheduling all events on Class[Apache::Service]
02:21:57        	Info: Stage[main]: Unscheduling all events on Stage[main]
02:21:57        	Notice: Applied catalog in 44.98 seconds
02:21:57        
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/host.rb:375:in `exec'
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/dsl/helpers/host_helpers.rb:83:in `block in on'
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/shared/host_manager.rb:130:in `run_block_on'
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/dsl/patterns.rb:37:in `block_on'
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/dsl/helpers/host_helpers.rb:63:in `on'
02:21:57      # ./.bundle/gems/gems/beaker-puppet-1.12.0/lib/beaker-puppet/helpers/puppet_helpers.rb:529:in `block in apply_manifest_on'
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/shared/host_manager.rb:130:in `run_block_on'
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/dsl/patterns.rb:37:in `block_on'
02:21:57      # ./.bundle/gems/gems/beaker-puppet-1.12.0/lib/beaker-puppet/helpers/puppet_helpers.rb:457:in `apply_manifest_on'
02:21:57      # ./.bundle/gems/gems/beaker-puppet-1.12.0/lib/beaker-puppet/helpers/puppet_helpers.rb:536:in `apply_manifest'
02:21:57      # ./spec/acceptance/zzz_centos_scl_spec.rb:35:in `block (3 levels) in <top (required)>'
02:21:57 
02:21:57   2) CentOS with SCL enabled when setting the respective parameters answers to sclphp.example.com
02:21:57      Failure/Error:
02:21:57        shell("/usr/bin/curl -H 'Host: sclphp.example.com' 127.0.0.1:80") do |r|
02:21:57          expect(r.stdout).to eq('Hello world')
02:21:57          expect(r.exit_code).to eq(0)
02:21:57        end
02:21:57      Beaker::Host::CommandFailure:
02:21:57        Host 'w79pbod5d4yfkg4.delivery.puppetlabs.net' exited with 7 running:
02:21:57         /usr/bin/curl -H 'Host: sclphp.example.com' 127.0.0.1:80
02:21:57        Last 10 lines of output were:
02:21:57        	
02:21:57 
       	curl: (7) couldn't connect to host
02:21:57        
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/host.rb:375:in `exec'
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/dsl/helpers/host_helpers.rb:83:in `block in on'
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/shared/host_manager.rb:130:in `run_block_on'
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/dsl/patterns.rb:37:in `block_on'
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/dsl/helpers/host_helpers.rb:63:in `on'
02:21:57      # ./.bundle/gems/gems/beaker-4.3.0/lib/beaker/dsl/helpers/host_helpers.rb:125:in `shell'
02:21:57      # ./spec/acceptance/zzz_centos_scl_spec.rb:44:in `block (3 levels) in <top (required)>'
02:21:57 
02:21:57   3) CentOS with SCL enabled when setting the respective parameters Service "httpd24-httpd" should be enabled
02:21:57      Failure/Error: it { is_expected.to be_enabled }
02:21:57        expected Service "httpd24-httpd" to be enabled
02:21:57        
02:21:57      # ./spec/acceptance/zzz_centos_scl_spec.rb:39:in `block (4 levels) in <top (required)>'
02:21:57 
02:21:57   4) CentOS with SCL enabled when setting the respective parameters Service "httpd24-httpd" should be running
02:21:57      Failure/Error: it { is_expected.to be_running }
02:21:57        expected Service "httpd24-httpd" to be running
02:21:57        
02:21:57      # ./spec/acceptance/zzz_centos_scl_spec.rb:40:in `block (4 levels) in <top (required)>'

@mmoll
Copy link
Contributor Author

mmoll commented Dec 13, 2018

@david22swan should be fixed now 💚

@mmoll
Copy link
Contributor Author

mmoll commented Dec 13, 2018

@david22swan BTW, was this CentOS 6 or RHEL 6? On CentOS I got an error, but a different one.

AFAIK, on RHEL you need to enable the SCL channels and the centos-release-scl-rh package won't work.

@david22swan
Copy link
Member

screen shot 2018-12-14 at 11 21 36 am

@david22swan david22swan merged commit 44f58f1 into puppetlabs:master Dec 14, 2018
@david22swan
Copy link
Member

@mmoll @kny78 Thank you both for all the work that you put into this.
Merry Christmass

@mmoll mmoll deleted the scl71 branch December 14, 2018 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants