Bug 1995421 - The foreman-maintain should only ask to run failed step with whitelist option if step has whitelist option
Summary: The foreman-maintain should only ask to run failed step with whitelist option...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Maintain
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Amit Upadhye
QA Contact: Satellite QE Team
URL:
Whiteboard:
: 1907710 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-19 05:06 UTC by Shekhar Raut
Modified: 2023-07-15 00:29 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33344 0 Normal New ERROR: Unrecognised option '--whitelist' while performing "Content Migration to Pulp3" 2022-05-18 17:15:17 UTC
Red Hat Issue Tracker SAT-18314 0 None None None 2023-06-12 19:58:04 UTC
Red Hat Knowledge Base (Solution) 6619981 0 None None None 2022-05-05 14:10:05 UTC

Description Shekhar Raut 2021-08-19 05:06:46 UTC
Description of problem:

While performing Satellite upgrade 6.9 to 6.10, tried to perform "Content Migration to Pulp3".

Command suggested to use "use --whitelist="content-prepare" option but using the same option, command is failing with error, "ERROR: Unrecognised option '--whitelist'"

You can find full details in "Steps to Reproduce:"

Version-Release number of selected component (if applicable):
6.9, "Content Migration to Pulp3" [while performing pre-upgrade task for 6.10]

How reproducible:

Steps to Reproduce:

On Satellite 6.9, start performing "Content Migration to Pulp3"

1. # satellite-maintain content migration-stats

2. # satellite-maintain prep-6.10-upgrade

3. # satellite-maintain content prepare

   Above command failed with an error:

~~~
   Failed executing foreman-rake katello:pulp3_migration, exit status 1
--------------------------------------------------------------------------------
Scenario [Prepare content for Pulp 3] failed.

The following steps ended up in failing state:

  [content-prepare]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="content-prepare"
~~~

4. Using this option failing with another error:

~~~
[root@satellite ~]# satellite-maintain content prepare --whitelist="content-prepare"
ERROR: Unrecognised option '--whitelist'

See: 'satellite-maintain content prepare --help'
~~~

- Please see the full command output in next comment

Actual results:

~~~
[root@satellite ~]# satellite-maintain content prepare --whitelist="content-prepare"
ERROR: Unrecognised option '--whitelist'

See: 'satellite-maintain content prepare --help'
~~~

- Please see the full command output in next comment

Expected results:

If the option is not available then it should not suggest the same in the output.

Comment 1 Shekhar Raut 2021-08-19 05:07:59 UTC
Full Command Output

~~~

Prepare content for Pulp 3: 
Checking for valid Katello configuraton.
Starting task.
2021-08-19 00:39:54 -0400: Pre-migrating Pulp 2 rpm content (detail info) 38000/46158Migration failed, You will want to investigate: https://vm249-161.gsslab.pnq2.redhat.com/foreman_tasks/tasks/481ecb32-1606-42b7-909d-a70e63b3c501
rake aborted!
ForemanTasks::TaskError: Task 481ecb32-1606-42b7-909d-a70e63b3c501: Katello::Errors::Pulp3Error: out of memory
DETAIL:  Failed on request of size 268435456 in memory context "ErrorContext".
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/lib/katello/tasks/pulp3_migration.rake:35:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => katello:pulp3_migration
(See full trace by running task with --trace)
                                                                      [FAIL]
Failed executing foreman-rake katello:pulp3_migration, exit status 1
--------------------------------------------------------------------------------
Scenario [Prepare content for Pulp 3] failed.

The following steps ended up in failing state:

  [content-prepare]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="content-prepare"


[root@satellite ~]# satellite-maintain content prepare --whitelist="content-prepare"
ERROR: Unrecognised option '--whitelist'

See: 'satellite-maintain content prepare --help'
Enabling the following service(s):
pulpcore-api, pulpcore-content, pulpcore-resource-manager, pulpcore-worker@1, pulpcore-worker@2, pulpcore-worker@3, pulpcore-worker@4
/ All services enabled                                                [OK]      
--------------------------------------------------------------------------------
Start applicable services: 

Starting the following service(s):
pulpcore-api, pulpcore-content, pulpcore-resource-manager, pulpcore-worker@1, pulpcore-worker@2, pulpcore-worker@3, pulpcore-worker@4
\ All services started                                                [OK]      
--------------------------------------------------------------------------------
Prepare content for Pulp 3: 
Checking for valid Katello configuraton.
Starting task.
2021-08-19 00:39:54 -0400: Pre-migrating Pulp 2 rpm content (detail info) 38000/46158Migration failed, You will want to investigate: https://vm249-161.gsslab.pnq2.redhat.com/foreman_tasks/tasks/481ecb32-1606-42b7-909d-a70e63b3c501
rake aborted!
ForemanTasks::TaskError: Task 481ecb32-1606-42b7-909d-a70e63b3c501: Katello::Errors::Pulp3Error: out of memory
DETAIL:  Failed on request of size 268435456 in memory context "ErrorContext".
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/lib/katello/tasks/pulp3_migration.rake:35:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => katello:pulp3_migration
(See full trace by running task with --trace)
                                                                      [FAIL]
Failed executing foreman-rake katello:pulp3_migration, exit status 1
--------------------------------------------------------------------------------
Scenario [Prepare content for Pulp 3] failed.

The following steps ended up in failing state:

  [content-prepare]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="content-prepare"


[root@satellite ~]# satellite-maintain content prepare --whitelist="content-prepare"
ERROR: Unrecognised option '--whitelist'

See: 'satellite-maintain content prepare --help'

~~~

Comment 2 Amit Upadhye 2021-08-25 10:44:04 UTC
Hello Shekhar,

The content prepare does not have whitelist option as upgrade should not happen without it. The problem is whitelist message there for a step which does not support the whitelist. The foreman-maintain has scenarios and then procedures are run as a step in scenario. Each scenario can have one or more than one step and hence its not possible to remove whitelist option from output for all the failed steps as some of them can have that.

Considering this I have changed the summary of bz to reflect what will be implemented for handling this situation.

To solve actual problem you will need to allocate more memory to the system.
_
Amit Upadhye.

Comment 5 Amit Upadhye 2022-05-05 14:10:05 UTC
*** Bug 1907710 has been marked as a duplicate of this bug. ***


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