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 #37357 - Add container migration to upgrade #829

Merged
merged 1 commit into from
May 15, 2024
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
23 changes: 23 additions & 0 deletions definitions/procedures/pulpcore/container_handle_image_metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module Procedures::Pulpcore
class ContainerHandleImageMetadata < ForemanMaintain::Procedure
include ForemanMaintain::Concerns::SystemService
include ForemanMaintain::Concerns::PulpCommon

metadata do
description 'Initialize and expose container image metadata in the pulpcore db'
for_feature :pulpcore
end

def run
with_spinner('Initialize and expose container image metadata in the pulpcore db') do |spinner|
necessary_services = feature(:pulpcore_database).services

feature(:service).handle_services(spinner, 'start', :only => necessary_services)

spinner.update('Adding image metadata to pulp. You can continue using the ' \
'system normally while the task runs in the background.')
execute!(pulpcore_manager('container-handle-image-data'))
end
sjha4 marked this conversation as resolved.
Show resolved Hide resolved
end
end
end
3 changes: 2 additions & 1 deletion definitions/scenarios/foreman_upgrade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ def compose
Checks::ServerPing,
Checks::ServicesUp,
Checks::SystemRegistration,
Procedures::Packages::CheckForReboot
Procedures::Packages::CheckForReboot,
Procedures::Pulpcore::ContainerHandleImageMetadata
)
end
end
Expand Down
1 change: 1 addition & 0 deletions definitions/scenarios/upgrade_to_capsule_6_16.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def compose
add_steps(find_checks(:default))
add_steps(find_checks(:post_upgrade))
add_step(Procedures::Packages::CheckForReboot)
add_step(Procedures::Pulpcore::ContainerHandleImageMetadata)
end
end
end
1 change: 1 addition & 0 deletions definitions/scenarios/upgrade_to_satellite_6_16.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def compose
add_steps(find_checks(:default))
add_steps(find_checks(:post_upgrade))
add_step(Procedures::Packages::CheckForReboot)
add_step(Procedures::Pulpcore::ContainerHandleImageMetadata)
end
end
end
Loading