Skip to content
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
2 changes: 2 additions & 0 deletions config/foreman-proxy-content-answers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ certs:
foreman_proxy_content:
pulpcore_mirror: true
puppet: false
pulpcore_api_control_socket_path: /run/pulpcore-api/gunicorn.ctl
pulpcore_content_control_socket_path: /run/pulpcore-content/gunicorn.ctl
foreman_proxy:
foreman_ssl_ca: /etc/foreman-proxy/foreman_ssl_ca.pem
foreman_ssl_cert: /etc/foreman-proxy/foreman_ssl_cert.pem
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if answers['foreman_proxy_content'].is_a?(Hash)
answers['foreman_proxy_content']['pulpcore_api_control_socket_path'] ||= '/run/pulpcore-api/gunicorn.ctl'
answers['foreman_proxy_content']['pulpcore_content_control_socket_path'] ||= '/run/pulpcore-content/gunicorn.ctl'
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if answers['foreman_proxy_content'].is_a?(Hash)
answers['foreman_proxy_content']['pulpcore_api_control_socket_path'] ||= '/run/pulpcore-api/gunicorn.ctl'
answers['foreman_proxy_content']['pulpcore_content_control_socket_path'] ||= '/run/pulpcore-content/gunicorn.ctl'
end
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ foreman_proxy_content:
proxy_pulp_isos_to_pulpcore: false
proxy_pulp_yum_to_pulpcore: false
puppet: false
pulpcore_api_control_socket_path: /run/pulpcore-api/gunicorn.ctl
pulpcore_content_control_socket_path: /run/pulpcore-content/gunicorn.ctl
katello:
enable_deb: true
use_pulp_2_for_deb: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ foreman_proxy_content:
proxy_pulp_yum_to_pulpcore: false
proxy_pulp_deb_to_pulpcore: false
puppet: false
pulpcore_api_control_socket_path: /run/pulpcore-api/gunicorn.ctl
pulpcore_content_control_socket_path: /run/pulpcore-content/gunicorn.ctl
katello:
use_pulp_2_for_deb: true
use_pulp_2_for_docker: true
Expand Down
2 changes: 2 additions & 0 deletions spec/fixtures/pulpcore-migration/katello-answers-after.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ foreman_proxy_content:
proxy_pulp_isos_to_pulpcore: false
proxy_pulp_yum_to_pulpcore: false
proxy_pulp_deb_to_pulpcore: false
pulpcore_api_control_socket_path: /run/pulpcore-api/gunicorn.ctl
pulpcore_content_control_socket_path: /run/pulpcore-content/gunicorn.ctl
katello:
use_pulp_2_for_docker: true
use_pulp_2_for_file: true
Expand Down
40 changes: 40 additions & 0 deletions spec/migrations/20260430083000-set-gunicorn-control-socket_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
require 'spec_helper'

migration '20260430083000-set-gunicorn-control-socket' do
scenarios %w[katello foreman-proxy-content] do
context 'without existing socket path answers' do
let(:answers) { { 'foreman_proxy_content' => {} } }

it 'sets the api control socket path' do
expect(migrated_answers['foreman_proxy_content']['pulpcore_api_control_socket_path'])
.to eq('/run/pulpcore-api/gunicorn.ctl')
end

it 'sets the content control socket path' do
expect(migrated_answers['foreman_proxy_content']['pulpcore_content_control_socket_path'])
.to eq('/run/pulpcore-content/gunicorn.ctl')
end
end

context 'with existing custom socket paths' do
let(:answers) do
{
'foreman_proxy_content' => {
'pulpcore_api_control_socket_path' => '/custom/api.ctl',
'pulpcore_content_control_socket_path' => '/custom/content.ctl',
},
}
end

it 'preserves a custom api socket path' do
expect(migrated_answers['foreman_proxy_content']['pulpcore_api_control_socket_path'])
.to eq('/custom/api.ctl')
end

it 'preserves a custom content socket path' do
expect(migrated_answers['foreman_proxy_content']['pulpcore_content_control_socket_path'])
.to eq('/custom/content.ctl')
end
end
end
end
Loading