Bug #34517
closedBetter error handling when pulpcore version does not match for content export and import
Description
The upstream katello for content export has pulpcore version 3.16.3.
The air gapped katello has pulpcore 3.16.1.
hammer content-import failed with:
Error: 1 subtask(s) failed for task group /pulp/api/v3/task-groups/2b06eee3-85f1-4ca7-bafd-0d7cbae8f3fc/
From Katello log:
2022-02-24T16:12:32 [E|bac|51b50b8e] 1 subtask(s) failed for task group /pulp/api/v3/task-groups/8ba8f0be-2c1d-4124-a375-d4b9aea88806/. (Katello::Errors::Pulp3Error)
51b50b8e | /home/vagrant/katello/app/lib/actions/pulp3/abstract_async_task.rb:108:in `block in check_for_errors'
51b50b8e | /home/vagrant/katello/app/lib/actions/pulp3/abstract_async_task.rb:106:in `each'
51b50b8e | /home/vagrant/katello/app/lib/actions/pulp3/abstract_async_task.rb:106:in `check_for_errors'
51b50b8e | /home/vagrant/katello/app/lib/actions/pulp3/abstract_async_task.rb:160:in `poll_external_task'
51b50b8e | /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/dynflow-1.6.3/lib/dynflow/action/polling.rb:100:in `poll_external_task_with_rescue'
51b50b8e | /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/dynflow-1.6.3/lib/dynflow/action/polling.rb:22:in `run'
51b50b8e | /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/dynflow-1.6.3/lib/dynflow/action/cancellable.rb:14:in `run'
51b50b8e | /home/vagrant/katello/app/lib/actions/pulp3/abstract_async_task.rb:10:in `run'
[vagrant@centos7-katello-devel hammer-cli-katello]$ curl https://`hostname`/pulp/api/v3/tasks/974a392f-af9e-42d3-9536-2596494b6d06/ --cert /etc/pki/katello/certs/pulp-client.crt --key /etc/pki/katello/private/pulp-client.key | python -m json.tool
...
{
"child_tasks": [],
"created_resources": [
null
],
"error": {
"description": "[ErrorDetail(string='Export version 3.16.3 of pulpcore does not match installed version 3.16.1.', code='invalid')]",
"traceback": " File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulpcore/tasking/pulpcore_worker.py\", line 370, in _perform_task\n result = func(*args, **kwargs)\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulpcore/app/tasks/importer.py\", line 384, in pulp_import\n _check_versions(version_json)\n File \"/opt/theforeman/tfm-pulpcore/root/usr/lib/python3.8/site-packages/pulpcore/app/tasks/importer.py\", line 95, in _check_versions\n raise ValidationError((\" \".join(error_messages)))\n"
},
...