[ContentMigration] HTTP status code: 403

Problem:
I started the first 2 Pulp3 migration steps suggested here Foreman :: Plugin Manuals Step 2 stops with an error.

Running Prepare content for Pulp 3
================================================================================
Prepare content for Pulp 3:                                           [FAIL]
Failed executing foreman-rake katello:pulp3_migration, exit status 1:
 Migration failed, You will want to investigate: https://wzvx20.zv.uni-wuerzburg.de/foreman_tasks/tasks/9669c986-fdde-46c2-b592-13eb130fe109
rake aborted!
ForemanTasks::TaskError: Task 9669c986-fdde-46c2-b592-13eb130fe109: PulpcoreClient::ApiError: Error message: the server returns an error
HTTP status code: 403
Response headers: {"date"=>"Wed, 18 Nov 2020 16:14:14 GMT", "server"=>"gunicorn/20.0.4", "content-type"=>"application/json", "vary"=>"Accept,Cookie", "allow"=>"GET, PATCH, DELETE, HEAD, OPTIONS", "x-frame-options"=>"SAMEORIGIN", "content-length"=>"63", "via"=>"1.1 wzvx20.zv.uni-wuerzburg.de", "connection"=>"close"}
Response body: {"detail":"You do not have permission to perform this action."}
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.17.0/lib/katello/tasks/pulp3_migration.rake:17:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => katello:pulp3_migration
(See full trace by running task with --trace)
--------------------------------------------------------------------------------
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"

Expected outcome:
Success

Foreman and Proxy versions:
Katello 3.17 and dependent packages

Foreman and Proxy plugin versions:

Distribution and version:
cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

Other relevant data:

@iballou seen anything like this?

Are there any pulpcore errors in /var/log/messages ? I haven’t seen this before.

Also, feel free to go about your business with Foreman without migrating while this error is stopping it. It’s still voluntary.

I’m having the same error:
Running Prepare content for Pulp 3

Prepare content for Pulp 3: [FAIL]
Failed executing foreman-rake katello:pulp3_migration, exit status 1:
Migration failed, You will want to investigate: https://theforeman.mccg.net/foreman_tasks/tasks/1767baf4-ef22-4219-a4c1-6683ed12a92b
rake aborted!
ForemanTasks::TaskError: Task 1767baf4-ef22-4219-a4c1-6683ed12a92b: PulpcoreClient::ApiError: Error message: the server returns an error
HTTP status code: 403
Response headers: {“date”=>“Tue, 08 Dec 2020 21:25:48 GMT”, “server”=>“gunicorn/20.0.4”, “content-type”=>“application/json”, “vary”=>“Accept,Cookie”, “allow”=>“GET, PATCH, DELETE, HEAD, OPTIONS”, “x-frame-options”=>“SAMEORIGIN”, “content-length”=>“63”, “via”=>“1.1 theforeman.mccg.net”, “connection”=>“close”}
Response body: {“detail”:“You do not have permission to perform this action.”}
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.17.1/lib/katello/tasks/pulp3_migration.rake:17:in block (2 levels) in <top (required)>' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in <top (required)>’
Tasks: TOP => katello:pulp3_migration
(See full trace by running task with --trace)

I have the same issue with upgrade to katello 3.17 pulp3.
Any news how to fix or workaround that?

** Execute katello:pulp3_migration
Migration failed, You will want to investigate: https://my.server.name/foreman_tasks/tasks/7e14bbfc-7d4c-49f5-a0d6-dd3971dfe463
rake aborted!
ForemanTasks::TaskError: Task 7e14bbfc-7d4c-49f5-a0d6-dd3971dfe463: PulpcoreClient::ApiError: Error message: the server returns an error
HTTP status code: 403
Response headers: {“date”=>“Tue, 15 Dec 2020 11:11:39 GMT”, “server”=>“gunicorn/20.0.4”, “content-type”=>“application/json”, “vary”=>“Accept,Cookie”, “allow”=>“GET, PATCH, DELETE, HEAD, OPTIONS”, “x-frame-options”=>“SAMEORIGIN”, “content-length”=>“63”, “via”=>“1.1 katello.srv.big.local”, “connection”=>“close”}
Response body: {“detail”:“You do not have permission to perform this action.”}
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.17.1/lib/katello/tasks/pulp3_migration.rake:17:in block (2 levels) in <top (required)>' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in block in execute’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in each' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in execute’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:195:in block in invoke_with_call_chain' /opt/rh/rh-ruby25/root/usr/share/ruby/monitor.rb:226:in mon_synchronize’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:188:in invoke_with_call_chain' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:181:in invoke’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:160:in invoke_task' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in block (2 levels) in top_level’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in each' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in block in top_level’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:125:in run_with_threads' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:110:in top_level’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:83:in block in run' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:186:in standard_exception_handling’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:80:in run' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in <top (required)>’
/opt/rh/rh-ruby25/root/usr/bin/rake:23:in load' /opt/rh/rh-ruby25/root/usr/bin/rake:23:in
Tasks: TOP => katello:pulp3_migration

The error disappeared after some time. I can’t reproduce it. It’s replaced by another error. I’ll open another case after inspecting it.