Sha256: 173a3ad0ffa01eff177c4104279e6fcf88546748938f17187de2ceec85066762

Contents?: true

Size: 1012 Bytes

Versions: 37

Compression:

Stored size: 1012 Bytes

Contents

namespace :katello do
  task :upgrade_check => ['environment'] do
    desc "Task that can be run before upgrading Katello to check if system is upgrade ready"
    CP_LISTEN_ACTION = Actions::Candlepin::ListenOnCandlepinEvents.to_s
    EVENT_QUEUE_ACTION = Actions::Katello::EventQueue::Monitor.to_s

    success = "PASS"
    fail = "FAIL"

    puts "This script makes no modifications and can be re-run multiple times for the most up to date results."
    puts "Checking upgradeability...\n\n"

    # check for any running tasks
    task_count = ::ForemanTasks::Task.active.where("label NOT IN (?)", [CP_LISTEN_ACTION, EVENT_QUEUE_ACTION]).count
    task_status = task_count > 0 ? fail : success
    puts "Checking for running tasks..."
    puts "[#{task_status}] - There are #{task_count} active tasks. "
    if task_count > 0
      puts "         Please wait for these to complete or cancel them from the Monitor tab.\n\n"
    else
      puts "         You may proceed with the upgrade.\n\n"
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
katello-3.8.1 lib/katello/tasks/upgrade_check.rake
katello-3.9.0.rc2 lib/katello/tasks/upgrade_check.rake
katello-3.9.0.rc1 lib/katello/tasks/upgrade_check.rake
katello-3.7.1.1 lib/katello/tasks/upgrade_check.rake
katello-3.7.1 lib/katello/tasks/upgrade_check.rake
katello-3.8.0 lib/katello/tasks/upgrade_check.rake
katello-3.8.0.rc3 lib/katello/tasks/upgrade_check.rake
katello-3.8.0.rc2 lib/katello/tasks/upgrade_check.rake
katello-3.7.0 lib/katello/tasks/upgrade_check.rake
katello-3.8.0.rc1 lib/katello/tasks/upgrade_check.rake
katello-3.7.0.rc2 lib/katello/tasks/upgrade_check.rake
katello-3.7.0.rc1 lib/katello/tasks/upgrade_check.rake
katello-3.5.2 lib/katello/tasks/upgrade_check.rake
katello-3.6.0 lib/katello/tasks/upgrade_check.rake
katello-3.6.0.1.rc2 lib/katello/tasks/upgrade_check.rake
katello-3.6.0.rc2 lib/katello/tasks/upgrade_check.rake
katello-3.6.0.rc1 lib/katello/tasks/upgrade_check.rake
katello-3.5.1.1 lib/katello/tasks/upgrade_check.rake
katello-3.5.1 lib/katello/tasks/upgrade_check.rake
katello-3.5.0.1 lib/katello/tasks/upgrade_check.rake