From a9c959532851d7ed767728610e21c776c4cb5316 Mon Sep 17 00:00:00 2001 From: ianballou Date: Wed, 8 Nov 2023 10:14:49 -0500 Subject: [PATCH] Fixes #36902 - Support Pulpcore 3.39, drop older versions --- .github/workflows/ci.yml | 2 +- .sync.yml | 2 +- README.md | 16 ++++------------ manifests/repo.pp | 14 +------------- spec/classes/repo_spec.rb | 14 +------------- spec/setup_acceptance_node.pp | 6 ++++++ templates/pulpcore-api.service.erb | 2 +- templates/pulpcore-content.service.erb | 3 +-- 8 files changed, 16 insertions(+), 43 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03a660f..4bb74b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,6 @@ jobs: uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2 with: pidfile_workaround: 'false' - beaker_facter: 'pulpcore_version:Pulp:3.28,3.22,3.21' + beaker_facter: 'pulpcore_version:Pulp:nightly,3.39' rubocop: false cache-version: '1' diff --git a/.sync.yml b/.sync.yml index 38127cd..84ff4b1 100644 --- a/.sync.yml +++ b/.sync.yml @@ -1,3 +1,3 @@ --- .github/workflows/ci.yml: - beaker_facter: 'pulpcore_version:Pulp:3.28,3.22,3.21' + beaker_facter: 'pulpcore_version:Pulp:nightly,3.39' diff --git a/README.md b/README.md index 31bfc02..9bc78ef 100644 --- a/README.md +++ b/README.md @@ -10,21 +10,13 @@ All supported versions are listed below. For every supported version, acceptance Supported operating systems are listed in `metadata.json` but individual releases can divert from that. For example, if Pulpcore x.y drops EL7, it will still be listed in metadata.json until all versions supported by the module have dropped it. Similarly, if x.z adds support for EL9, it'll be listed in `metadata.json` and all versions that don't support EL9 will have a note. -### Pulpcore 3.28 +### Pulpcore nightly -Default recommended version. - -### Pulpcore 3.22 - -Supported version. +The latest version of Pulpcore that is being tested. -### Pulpcore 3.21 +### Pulpcore 3.39 -Supported version. The parameter `$hide_guarded_distributions` doesn't work since it's a Pulp 3.22 feature. - -### Pulpcore 3.16 - 3.18 - -Untested, but should work besides the `$hide_guarded_distributions` parameter. Not recommended. +Default recommended version. ## Installation layout diff --git a/manifests/repo.pp b/manifests/repo.pp index a380732..425ea21 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -8,7 +8,7 @@ # An optional value for gpgkey to be used for yumrepo, instead of the default. # If an empty string is passed, gpgcheck will be disabled. class pulpcore::repo ( - Variant[Enum['nightly'], Pattern['^\d+\.\d+$']] $version = '3.28', + Variant[Enum['nightly'], Pattern['^\d+\.\d+$']] $version = '3.39', Optional[Stdlib::HTTPUrl] $baseurl = undef, Optional[String[0]] $gpgkey = undef, ) { @@ -23,18 +23,6 @@ notify => Anchor['pulpcore::repo'], } - # Only EL8 has DNF modules - if $dist_tag == 'el8' { - package { 'pulpcore-dnf-module': - ensure => $dist_tag, - name => 'pulpcore', - enable_only => true, - provider => 'dnfmodule', - require => Yumrepo['pulpcore'], - notify => Anchor['pulpcore::repo'], - } - } - # An anchor is used because it can be collected anchor { 'pulpcore::repo': } # lint:ignore:anchor_resource } diff --git a/spec/classes/repo_spec.rb b/spec/classes/repo_spec.rb index 384e2e7..a36b103 100644 --- a/spec/classes/repo_spec.rb +++ b/spec/classes/repo_spec.rb @@ -15,19 +15,7 @@ .that_notifies('Anchor[pulpcore::repo]') } - if os_facts[:os]['release']['major'] == '8' - it 'configures the pulpcore module' do - is_expected.to contain_package('pulpcore-dnf-module') - .with_name('pulpcore') - .with_ensure(/^el\d+/) - .with_enable_only(true) - .with_provider('dnfmodule') - .that_requires('Yumrepo[pulpcore]') - .that_notifies('Anchor[pulpcore::repo]') - end - else - it { is_expected.not_to contain_package('pulpcore-dnf-module') } - end + it { is_expected.not_to contain_package('pulpcore-dnf-module') } end describe "with nightly version" do diff --git a/spec/setup_acceptance_node.pp b/spec/setup_acceptance_node.pp index 5c5cd56..b237fda 100644 --- a/spec/setup_acceptance_node.pp +++ b/spec/setup_acceptance_node.pp @@ -9,8 +9,14 @@ default: {} } +$gpgkey = fact('pulpcore_version') ? { + 'nightly' => '', + default => undef, +} + class { 'pulpcore::repo': version => fact('pulpcore_version'), + gpgkey => $gpgkey, } # Needed as a workaround for idempotency diff --git a/templates/pulpcore-api.service.erb b/templates/pulpcore-api.service.erb index 6dd2b1a..729c3f7 100644 --- a/templates/pulpcore-api.service.erb +++ b/templates/pulpcore-api.service.erb @@ -11,7 +11,7 @@ User=<%= scope['pulpcore::user'] %> Group=<%= scope['pulpcore::group'] %> WorkingDirectory=<%= scope['pulpcore::user_home'] %> RuntimeDirectory=pulpcore-api -ExecStart=/usr/libexec/pulpcore/gunicorn pulpcore.app.wsgi:application \ +ExecStart=/usr/bin/pulpcore-api \ --preload \ --timeout <%= scope['pulpcore::api_service_worker_timeout'] %> \ --workers <%= scope['pulpcore::api_service_worker_count'] %> \ diff --git a/templates/pulpcore-content.service.erb b/templates/pulpcore-content.service.erb index abfd0e6..c23688c 100644 --- a/templates/pulpcore-content.service.erb +++ b/templates/pulpcore-content.service.erb @@ -11,10 +11,9 @@ User=<%= scope['pulpcore::user'] %> Group=<%= scope['pulpcore::group'] %> WorkingDirectory=<%= scope['pulpcore::user_home'] %> RuntimeDirectory=pulpcore-content -ExecStart=/usr/libexec/pulpcore/gunicorn pulpcore.content:server \ +ExecStart=/usr/bin/pulpcore-content \ --preload \ --timeout <%= scope['pulpcore::content_service_worker_timeout'] %> \ - --worker-class 'aiohttp.GunicornWebWorker' \ --workers <%= scope['pulpcore::content_service_worker_count'] %> \ --access-logfile - ExecReload=/bin/kill -s HUP $MAINPID