Skip to content

Commit

Permalink
Fixes #33281 - run installer with upgrade flags after restore
Browse files Browse the repository at this point in the history
(cherry picked from commit 6089aa6)
  • Loading branch information
evgeni authored and upadhyeammit committed Apr 19, 2022
1 parent 67ceb32 commit 9d30300
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion definitions/procedures/installer/upgrade_rake_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ class UpgradeRakeTask < ForemanMaintain::Procedure
end

def run
execute!('foreman-rake upgrade:run')
# only run this in the Satellite scenario, as in others
# the installer runs this rake task for us already
execute!('foreman-rake upgrade:run') if feature(:satellite)
end
end
end
2 changes: 2 additions & 0 deletions definitions/scenarios/restore.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def compose
add_steps_with_context(Procedures::Restore::RegenerateQueues) if backup.online_backup?
add_steps_with_context(Procedures::Service::Start,
Procedures::Service::DaemonReload)
add_step(Procedures::Installer::Upgrade.new(:assumeyes => true))
add_step_with_context(Procedures::Installer::UpgradeRakeTask)
add_step_with_context(Procedures::Crond::Start) if feature(:cron)
end
# rubocop:enable Metrics/MethodLength,Metrics/AbcSize
Expand Down

0 comments on commit 9d30300

Please sign in to comment.