Bug 2000605

Summary: Upgrade job gets stuck in GUI investigation stage.
Product: Red Hat Satellite Reporter: Devendra Singh <desingh>
Component: RH Cloud - InventoryAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Devendra Singh <desingh>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: ahumbe, apatel, aruzicka, aupadhye, ehelms, kgaikwad, mmccune, myarboro, smallamp, sshtein, vijsingh, zhunting
Target Milestone: 6.10.1Keywords: Triaged, Upgrades
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-0.8.21 Doc Type: Known Issue
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-18 14:38:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Devendra Singh 2021-09-02 13:31:59 UTC
Description of problem: Upgrade job gets stuck in GUI investigation stage.


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

How reproducible:
always with snap15 and snap16 

Steps to Reproduce:
1. Restore the 6.9.z satellite by using a specific customers database backup.
2. Satellite restored successfully.
3. Run the pulp migration.
4. Pulp migration completes successfully.
5. Run the upgrade check with assumeyes flag but the job stucks at ui investigation stage.


Actual results:
The job stuck and there was no method except UI to proceed with the job, In UI, there was a cancellation option but it was in disabled.

Expected results:
The job should be canceled or moved to the stopped stage until the upgrade process has not been completed.

Additional info:

Comment 3 Amit Upadhye 2021-09-03 11:39:35 UTC
Hello Devendra,

I checked this after our discussion and below are my thoughts,

1. The check which is asking to investigate the tasks is for Running state.
2. As you can see in search query and as per the code too foreman-maintain excludes below tasks for this check,

  EXCLUDE_ACTIONS_FOR_RUNNING_TASKS = %w[
    Actions::Candlepin::ListenOnCandlepinEvents
    Actions::Katello::EventQueue::Monitor
    Actions::Insights::EmailPoller
  ].freeze

https://rhnsatmon0102.service.networklayer.com/foreman_tasks/tasks?search=state+%3D+running+AND+label+%21%5E%28Actions%3A%3ACandlepin%3A%3AListenOnCandlepinEvents+Actions%3A%3AKatello%3A%3AEventQueue%3A%3AMonitor+Actions%3A%3AInsights%3A%3AEmailPoller%29

3. Now upon excluding these tasks if there is still a task in running state then those should not be safe to delete or cancel.

The delete is preferred in 'paused' state task check in not the running task check. Accordingly I think this is correct and there is no need to change anything.

Regards,
Amit Upadhye.

Comment 4 Amit Upadhye 2021-09-03 11:42:02 UTC
Regression keyword removed because this is how it worked always.

Comment 19 Devendra Singh 2021-11-12 10:19:29 UTC
Verified on 6.10.1 Snap1

Verification points:

- The satellite upgrade didn't get failed due to "ForemanInventoryUpload::Async::GenerateAllReportsJob" task.
- Verified the foreman-maintain fixed-in version.

# rpm -qa|grep rubygem-foreman_maintain-0.8.21
rubygem-foreman_maintain-0.8.21-1.el7sat.noarch

Comment 24 errata-xmlrpc 2021-11-18 14:38:46 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 (Satellite 6.10.1 Async Bug Fix Update), 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/RHBA-2021:4737