apache2 icon indicating copy to clipboard operation
apache2 copied to clipboard

Amazon 2018 install broken with PR#688

Open dylanbartos opened this issue 5 years ago • 0 comments

:ghost: Brief Description

In PR#688, the apache_pkg helper libraries/helpers.rb is modified to remove

when 'amazon'
    if node['platform_version'] == '2'
        'httpd'
    else
        'httpd24'
    end

for this static instead

when 'amazon'
    'httpd'

This causes the httpd package (apache2.2) to be downloaded from the Amazon repo instead of httpd24 (apache2.4). 2.2 should not be downloaded by default

:pancakes: Cookbook version

8.2.0

:woman_cook: Chef-Infra Version

16.2.50

:tophat: Platform details

amazon, 2018.03

Steps To Reproduce

Steps to reproduce the behavior:

  1. On Amazon Linux instance, run a default_install. I was never able to get Chef to get to a site config because my httpd.conf.erb is built for 2.4, not 2.2.
  2. After error, check httpd version httpd -v yum info httpd. You should be able to run yum info httpd24 and see it listed as an installed package, but it only shows available.

:police_car: Expected behavior

The httpd24 package is expected to install (has been since cookbook v6 at least).

:heavy_plus_sign: Additional context

PR#688 appears to have broken the libraries/helpers.rb. Code is also modified in spec/libraries/package_helpers_spec.rb. I have not tested the affects of this change.

context 'with amazon family' do
    context 'on amazon-1' do
        platform 'amazon', '2018'
        it { is_expected.to write_log('httpd24') }
    end

    context 'on amazon-2' do
        platform 'amazon', '2'
        it { is_expected.to write_log('httpd24') }
    end
end

dylanbartos avatar Jun 26 '20 16:06 dylanbartos