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 19, 2024
1 parent d158069 commit 9317a24
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
22 changes: 22 additions & 0 deletions definitions/procedures/pulpcore/container_handle_image_data.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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')
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 @@ -80,6 +80,7 @@ class PostMigrations < Abstract
def compose
add_step(Procedures::RefreshFeatures)
add_step(Procedures::Service::Start.new)
add_step(Procedures::Pulpcore::ContainerHandleImageData)
add_steps(find_procedures(:post_migrations))
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 @@ -77,6 +77,7 @@ class PostMigrations < Abstract
def compose
add_step(Procedures::RefreshFeatures)
add_step(Procedures::Service::Start.new)
add_step(Procedures::Pulpcore::ContainerHandleImageData)
add_steps(find_procedures(:post_migrations))
end
end
Expand Down
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 @@ -83,6 +83,7 @@ class PostMigrations < Abstract
def compose
add_step(Procedures::RefreshFeatures)
add_step(Procedures::Service::Start.new)
add_step(Procedures::Pulpcore::ContainerHandleImageData)
add_steps(find_procedures(:post_migrations))
end
end
Expand Down

0 comments on commit 9317a24

Please sign in to comment.