Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1419845 - foreman-rake katello:upgrade_check fails on Actions::Katello::EventQueue::Monitor task
Summary: foreman-rake katello:upgrade_check fails on Actions::Katello::EventQueue::Mon...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.2.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Jonathon Turel
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-07 08:49 UTC by Kenny Tordeurs
Modified: 2020-12-14 08:09 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17944 0 Normal Closed upgrade_check: [FAIL] - There are 1 active tasks. 2021-01-08 17:18:25 UTC

Description Kenny Tordeurs 2017-02-07 08:49:21 UTC
Description of problem:
upgrade_check.rake does not exclude the monitor eventqueue from the check, upstream there is a fix for this per [0]

Version-Release number of selected component (if applicable):
6.2

How reproducible:
100%

Steps to Reproduce:
1. Upgrade
2. Fail with Active task for monitor eventqueue
3.

Actual results:
Upgrade stopped because of running task

Expected results:
It to ignore the Monitor task

Additional info:

[0] https://github.com/Katello/katello/blob/master/lib/katello/tasks/upgrade_check.rake

Comment 1 Brad Buckingham 2017-02-07 18:31:51 UTC
Would it be possible to attach the foreman-debug?  Thanks!

Comment 2 Kenny Tordeurs 2017-02-08 08:05:39 UTC
Unfortunately the customer already skipped the upgrade_check and did the upgrade.

But if I have a look at the current upgrade_check.rake it only does something for ListenOnCandlepinEvents nothing for the monitorqueue:

#cat /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/lib/katello/tasks/upgrade_check.rake
~~~
CP_LISTEN_ACTION = "Actions::Candlepin::ListenOnCandlepinEvents".freeze

namespace :katello do
  task :upgrade_check => ['environment'] do
    desc "Task that can be run before upgrading Katello to check if system is upgrade ready"
    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 != '#{CP_LISTEN_ACTION}'").count
    task_status = task_count > 0 ? fail : success
    puts "Checking for running tasks..."
    puts "[#{task_status}] - There are #{task_count} active tasks. "
    puts "         Please wait for these to complete or cancel them from the Monitor tab.\n\n"
  end
end

~~~

Comment 3 Brad Buckingham 2017-02-10 16:54:12 UTC
Moving to POST based on the state of the upstream redmine.

Comment 6 Jonathon Turel 2017-09-06 16:33:34 UTC
Verified against Sat 6.3 Snap 14 => satellite-6.3.0-17.0.beta.el7sat.noarch

Had the following running tasks:

ForemanTasks::Task.all.where(:state => :running).pluck(:label)
=> ["Actions::Candlepin::ListenOnCandlepinEvents", "Actions::Katello::EventQueue::Monitor"]

upgrade_check says:

[vagrant@sat63-qa-rhel7 foreman]$ sudo foreman-rake katello:upgrade_check
This script makes no modifications and can be re-run multiple times for the most up to date results.
Checking upgradeability...

Checking for running tasks...
[PASS] - There are 0 active tasks.

Comment 8 Satellite Program 2018-02-21 16:54:37 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> > 
> > For information on the advisory, and where to find the updated files, follow the link below.
> > 
> > If the solution does not work for you, open a new bug report.
> > 
> > https://access.redhat.com/errata/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.