Skip to content

Commit

Permalink
Fixes #37357 - Add container migration to upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
sjha4 committed Apr 23, 2024
1 parent d158069 commit b37dc32
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
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
end
end
end
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 @@ -94,6 +94,7 @@ class PostUpgradeChecks < Abstract
def compose
add_steps(find_checks(:default))
add_steps(find_checks(:post_upgrade))
add_step(Procedures::Pulpcore::ContainerHandleImageMetadata)
add_step(Procedures::Packages::CheckForReboot)
end
end
Expand Down
1 change: 1 addition & 0 deletions definitions/scenarios/upgrade_to_katello_nightly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class PostUpgradeChecks < Abstract
def compose
add_steps(find_checks(:default))
add_steps(find_checks(:post_upgrade))
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 @@ -97,6 +97,7 @@ class PostUpgradeChecks < Abstract
def compose
add_steps(find_checks(:default))
add_steps(find_checks(:post_upgrade))
add_step(Procedures::Pulpcore::ContainerHandleImageMetadata)
add_step(Procedures::Packages::CheckForReboot)
end
end
Expand Down

0 comments on commit b37dc32

Please sign in to comment.