Skip to content

Fixes #33766 - Support Pulpcore 3.15 #238

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

Merged
merged 3 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ jobs:
setfile: ${{fromJson(needs.setup_matrix.outputs.beaker_setfiles)}}
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
pulpcore_version:
- '3.15'
- '3.14'
name: Acceptance / ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
name: Acceptance / ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }} - Pulp ${{ matrix.pulpcore_version }}
steps:
- uses: actions/checkout@v2
- name: Setup ruby
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ 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.14
### Pulpcore 3.15

Default recommended version.

Only supported version.
Starting Pulpcore 3.15 the migration plugin is no longer built. Users should remove the plugin prior to upgrding. The [foreman_maintain Pulp 2 removal procedure](https://github.com/theforeman/foreman_maintain/blob/d49ece67f1dba761bb232229593765f61e01361a/definitions/procedures/pulp/remove.rb#L109-L160) is a good reference. Additionally the package `python3-pulp-2to3-migration` should be removed.

### Pulpcore 3.14

At lest pulpcore 3.14.8-2 (and matching plugins) should be used, as this version introduced virtual package names that are used in this module.
At least pulpcore 3.14.8-2 (and matching plugins) should be used, as this version introduced virtual package names that are used in this module. Certguard 1.4.0-3 should be used to pull in the correct RHSM package.

## Installation layout

Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
# Modification should be performed incrementally to determine the least value that prevents false positive worker timeouts.
#
# @param use_rq_tasking_system
# Use the older RQ workers tasking system instead of the newer PostgreSQL tasking system introduced in Pulpcore 3.14.
# Use the older RQ workers tasking system instead of the newer PostgreSQL tasking system introduced in Pulpcore 3.14. This is deprecated in 3.15.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And will be removed in 3.16.

# Any benchmarking you did to optimize worker_count or other tasking related parameters will no longer be accurate after changing the tasking system.
# Do not modify this setting unless you understand the implications for performance and stability.
#
Expand Down
5 changes: 1 addition & 4 deletions manifests/plugin/certguard.pp
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# @summary Pulp Certguard plugin
class pulpcore::plugin::certguard {
package { 'python3-subscription-manager-rhsm':
ensure => present,
}
-> pulpcore::plugin { 'certguard':
pulpcore::plugin { 'certguard':
}
}
2 changes: 1 addition & 1 deletion manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# @param version
# The Pulpcore version to use
class pulpcore::repo (
Pattern['^\d+\.\d+$'] $version = '3.14',
Pattern['^\d+\.\d+$'] $version = '3.15',
) {
$context = {
'version' => $version,
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class { 'pulpcore':
its(:exit_status) { is_expected.to eq 0 }
end

describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py rq info -c pulpcore.rqconfig") do
describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py /usr/libexec/pulpcore/rq info -c pulpcore.rqconfig") do
its(:stdout) { is_expected.to match(/^0 workers, /) }
its(:stdout) { is_expected.not_to match(/^resource-manager /) }
its(:exit_status) { is_expected.to eq 0 }
Expand Down
4 changes: 2 additions & 2 deletions spec/acceptance/disable_new_tasking_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class { 'pulpcore':
its(:exit_status) { is_expected.to eq 0 }
end

describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py rq info -c pulpcore.rqconfig") do
describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py /usr/libexec/pulpcore/rq info -c pulpcore.rqconfig") do
its(:stdout) { is_expected.to match(/^0 workers, /) }
its(:stdout) { is_expected.not_to match(/^resource-manager /) }
its(:exit_status) { is_expected.to eq 0 }
Expand Down Expand Up @@ -128,7 +128,7 @@ class { 'pulpcore':
its(:exit_status) { is_expected.to eq 0 }
end

describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py rq info -c pulpcore.rqconfig") do
describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py /usr/libexec/pulpcore/rq info -c pulpcore.rqconfig") do
its(:stdout) { is_expected.to match(/^2 workers, /) }
its(:stdout) { is_expected.to match(/^resource-manager /) }
its(:exit_status) { is_expected.to eq 0 }
Expand Down
4 changes: 2 additions & 2 deletions spec/acceptance/enable_new_tasking_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class { 'pulpcore':
its(:exit_status) { is_expected.to eq 0 }
end

describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py rq info -c pulpcore.rqconfig") do
describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py /usr/libexec/pulpcore/rq info -c pulpcore.rqconfig") do
its(:stdout) { is_expected.to match(/^2 workers, /) }
its(:stdout) { is_expected.to match(/^resource-manager /) }
its(:exit_status) { is_expected.to eq 0 }
Expand Down Expand Up @@ -128,7 +128,7 @@ class { 'pulpcore':
its(:exit_status) { is_expected.to eq 0 }
end

describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py rq info -c pulpcore.rqconfig") do
describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py /usr/libexec/pulpcore/rq info -c pulpcore.rqconfig") do
its(:stdout) { is_expected.to match(/^0 workers, /) }
its(:stdout) { is_expected.not_to match(/^resource-manager /) }
its(:exit_status) { is_expected.to eq 0 }
Expand Down
6 changes: 4 additions & 2 deletions spec/acceptance/plugins_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'basic installation' do
describe 'Installation with all plugins' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
Expand All @@ -10,7 +10,9 @@
include pulpcore::plugin::container
include pulpcore::plugin::deb
include pulpcore::plugin::file
include pulpcore::plugin::migration
if fact('pulpcore_version') == '3.14' {
include pulpcore::plugin::migration
}
include pulpcore::plugin::rpm
PUPPET
end
Expand Down
6 changes: 4 additions & 2 deletions spec/acceptance/use_pulp2_content_route_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'basic installation' do
describe 'Pulp 2 content routes' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<-PUPPET
Expand All @@ -11,7 +11,9 @@
class { 'pulpcore::plugin::file':
use_pulp2_content_route => true,
}
include pulpcore::plugin::migration
if fact('pulpcore_version') == '3.14' {
include pulpcore::plugin::migration
}
class { 'pulpcore::plugin::rpm':
use_pulp2_content_route => true,
}
Expand Down
2 changes: 0 additions & 2 deletions spec/classes/plugin_certguard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_package('python3-subscription-manager-rhsm').with_ensure('present') }
it { is_expected.to contain_package('pulpcore-plugin(certguard)') }
it { is_expected.to contain_pulpcore__plugin('certguard') }

Expand All @@ -16,7 +15,6 @@
it do
is_expected.to compile.with_all_deps
is_expected.to contain_pulpcore__plugin('certguard')
.that_requires('Package[python3-subscription-manager-rhsm]')
.that_subscribes_to('Class[Pulpcore::Install]')
.that_notifies(['Class[Pulpcore::Database]', 'Class[Pulpcore::Service]'])
end
Expand Down