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

Fixes #31305 - Block content switchover for downstream servers #420

Merged
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: 1 addition & 1 deletion definitions/procedures/content/switchover.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Switchover < ForemanMaintain::Procedure
for_feature :pulpcore

confine do
# FIXME: remove this condition on next downstream upgrade scenario
# FIXME: remove this condition for the 6.10 upgrade scenario
!feature(:instance).downstream
end
end
Expand Down
2 changes: 1 addition & 1 deletion definitions/scenarios/content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Switchover < ForemanMaintain::Scenario
end

def compose
# FIXME: remove this condition on next downstream upgrade scenario
# FIXME: remove this condition for the 6.10 upgrade scenario
if Procedures::Content::Switchover.present?
add_step(Procedures::Content::Switchover)
end
Expand Down
9 changes: 6 additions & 3 deletions lib/foreman_maintain/cli/content_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ def execute
end
end

subcommand 'switchover', 'Switch support for certain content from Pulp 2 to Pulp 3' do
def execute
run_scenarios_and_exit(Scenarios::Content::Switchover.new)
unless ForemanMaintain.detector.feature(:satellite) ||
ForemanMaintain.detector.feature(:capsule)
subcommand 'switchover', 'Switch support for certain content from Pulp 2 to Pulp 3' do
def execute
run_scenarios_and_exit(Scenarios::Content::Switchover.new)
end
end
end

Expand Down