Bug 1988299 - foreman-maintain failed to cancel or resume the task after the satellite upgrade.
Summary: foreman-maintain failed to cancel or resume the task after the satellite upgr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.10.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: 6.10.0
Assignee: Justin Sherrill
QA Contact: Danny Synk
URL:
Whiteboard:
: 1995717 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-30 09:54 UTC by Devendra Singh
Modified: 2021-11-16 14:13 UTC (History)
6 users (show)

Fixed In Version: tfm-rubygem-katello-4.1.1.8-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1998224 (view as bug list)
Environment:
Last Closed: 2021-11-16 14:12:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33206 0 None None None 2021-08-03 18:31:13 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:12:59 UTC

Description Devendra Singh 2021-07-30 09:54:25 UTC
Description of problem: foreman-maintain failed to cancel or resume the task after the satellite upgrade.


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

How reproducible:
always

Steps to Reproduce:
1. Prepare the satellite's based version 6.9 for the upgrade.
2. Run the pulp migration
3. Pulp migration completes successfully.
4. Run the satellite upgrade, satellite upgrade completes successfully but the post-upgrade job gets failed at  "Check for paused tasks: " stage gets failed.
satellite-maintain upgrade run --target-version 6.10
.................................
.................................
Check whether all services are running using the ping call:           [OK]
--------------------------------------------------------------------------------
Check for paused tasks:                                               [FAIL]
There are currently 6 paused tasks in the system
--------------------------------------------------------------------------------
There are multiple steps to proceed:
1) Resume paused tasks
2) Delete paused tasks
3) Investigate the tasks via UI
Select step to continue, [n(next)] 1
Resume paused tasks:                                                            

/ Waiting 30 seconds for resumed tasks to start.                      [OK]      
Total tasks resumed: 6
--------------------------------------------------------------------------------
Rerunning the check after fix procedure
Check for paused tasks:                                               [FAIL]
There are currently 6 paused tasks in the system
--------------------------------------------------------------------------------
There are multiple steps to proceed:
1) Resume paused tasks
2) Delete paused tasks
3) Investigate the tasks via UI
Select step to continue, [n(next)] Select step to continue, [n(next)] n
Check to verify no empty CA cert requests exist:                                
                     [OK]
--------------------------------------------------------------------------------
Check whether system is self-registered or not:                       [OK]
--------------------------------------------------------------------------------
Check if only installed assets are present on the system: 
\ Checking for presence of non-original assets...                     [OK]      
--------------------------------------------------------------------------------
Print pulp 2 removal instructions: 
======================================================
Migration of content from Pulp 2 to Pulp3 is complete
After verifying accessibility of content from clients,
it is strongly recommend to run "foreman-maintain content remove-pulp2"
This will remove Pulp 2, MongoDB, and all pulp2 content in /var/lib/pulp/content/
======================================================                [OK]
--------------------------------------------------------------------------------
Scenario [Checks after upgrading to Satellite 6.10] failed.

The following steps ended up in failing state:

  [foreman-tasks-not-paused]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="foreman-tasks-not-paused"


Actual results:
post-upgrade job gets failed due to unable to resume or cancel the paused task.


Expected results:
post-upgrade task should be completed successfully.

Additional info:

Comment 4 Justin Sherrill 2021-08-03 13:01:15 UTC
Here's the error from the refresh distribution tasks:


2021-07-30T04:22:16 [E|bac|] undefined method `new' for nil:NilClass (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository.rb:90:in `instance_for_type'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/models/katello/repository.rb:188:in `backend_service'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/lib/actions/pulp3/repository/refresh_distribution.rb:27:in `invoke_external_task'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action/polling.rb:84:in `initiate_external_action'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action/polling.rb:19:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action/cancellable.rb:14:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/lib/actions/pulp3/abstract_async_task.rb:10:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action.rb:571:in `block (3 levels) in execute_run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/lib/actions/middleware/execute_if_contents_changed.rb:5:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:27:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:19:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware.rb:32:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/middleware/stack.rb:23:in `call'



I suspect it may be hitting some ostree/puppet repos?

Comment 5 Justin Sherrill 2021-08-03 18:31:13 UTC
Created redmine issue https://projects.theforeman.org/issues/33206 from this bug

Comment 6 Justin Sherrill 2021-08-05 12:42:29 UTC
One workaround for this is to remove any ostree or puppet repos prior to upgrade

Comment 10 Danny Synk 2021-08-24 17:37:39 UTC
Verified on Satellite 6.10, snap 14.

Steps to Test:
1. Deploy Satellite 6.9.5, snap 2.
2. Create a new product.
3. Create a Puppet repository in the new product.
4. Upload a Puppet module to the repository.
5. Enable and synchronize the rhel-atomic-host-ostree repository.
6. Migrate from Pulp 2 to Pulp 3:

# satellite-maintain prep-6.10-upgrade
# satellite-maintain content prepare

7. Upgrade the Satellite from 6.9 to 6.10.

Expected Results:
The upgrade completes successfully with no errors on RefreshDistribution tasks.

Actual Results:
The upgrade completes successfully with no errors on RefreshDistribution tasks.

Comment 11 Justin Sherrill 2021-08-25 19:14:37 UTC
*** Bug 1995717 has been marked as a duplicate of this bug. ***

Comment 12 Devendra Singh 2021-09-30 05:39:36 UTC
*** Bug 1995717 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2021-11-16 14:12:53 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 (Moderate: Satellite 6.10 Release), 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-2021:4702


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