Content-view version export Error: PLP0046: The repository group cannot be exported

Problem:

$> hammer shell 
hammer> content-view version export --id XX

hammer> [................................................................................................................................................................................] [100%]
Error: PLP0046: The repository group cannot be exported because these repos have units that are not downloaded: XXXXXXXXXXXXXXXXXXXX-updates
No such file or directory @ rb_file_s_stat - /var/lib/pulp/published/yum/master/group_export_distributor/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
hammer>

Expected outcome:
Exported content-view to /var/lib/pulp/katello-export missing

Foreman and Proxy versions:
Foreman 1.19.0

Foreman and Proxy plugin versions:
Katello 3.8

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)

logs
**25357** 2019-03-19T15:03:13 [I|kat|] POST: `https://rtdky1kat01.aws.eu-west-1.hosting.eu/pulp/api/v2/repo_groups/`: {"id":"Default_Organization-rob-centos-7-CT-x86_64-v67.0","repo_ids":["1-      rob-centos-7-CT-x86_64-v67_0-Default_Organization-CentOS7-rob","1-rob-centos-7-CT-x86_64-v67_0-Default_Organization-centos-7_3_1611-x86_64-updates","1-rob-centos-7-CT-x86_64-v67_0      -Default_Organization-centos-7_3_1611-x86_64-sclo-rh","1-rob-centos-7-CT-x86_64-v67_0-Default_Organization-centos-7_3_1611-x86_64-sclo-sclo","1-rob-centos-7-CT-x86_64-v67_0-Defaul      t_Organization-centos-7_3_1611-x86_64-epel","1-rob-centos-7-CT-x86_64-v67_0-b4ec5c08-43ba-42b0-bc60-6f2f7fde04f8","1-rob-centos-7-CT-x86_64-v67_0-80107df4-98eb-498b-bcd0-a85324404      a4a","1-rob-centos-7-CT-x86_64-v67_0-31c4feb1-18a5-4a46-bb3d-0a35401171d1","1-rob-centos-7-CT-x86_64-v67_0-dded6a50-8d81-4270-a963-18fa4a7943dc","1-rob-centos-7-CT-x86_64-v67_0-f0      e2589b-b44d-4e2f-9387-0a8d70f8891a","1-rob-centos-7-CT-x86_64-v67_0-Default_Organization-centos-7_3_1611-x86_64-os"],"display_name":"temporary group for export","distributors":[{"      http":false,"https":false,"distributor_type_id":"group_export_distributor","distributor_config":{"http":false,"https":false},"auto_publish":false,"id":"310c51cc450b5d828219"}]}: {      "content_type"=>"application/json", "accept"=>"application/json"}
**25358** Response: 201: {"scratchpad": null, "display_name": "temporary group for export", "description": null, "distributors": [{"http": false, "distributor_config": {"http": false, "http      s": false}, "auto_publish": false, "distributor_type_id": "group_export_distributor", "https": false, "id": "310c51cc450b5d828219"}], "_ns": "repo_groups", "notes": {}, "repo_ids"      : ["1-rob-centos-7-CT-x86_64-v67_0-Default_Organization-CentOS7-rob", "1-rob-centos-7-CT-x86_64-v67_0-Default_Organization-centos-7_3_1611-x86_64-updates", "1-rob-centos-7-CT-x86_      64-v67_0-Default_Organization-centos-7_3_1611-x86_64-sclo-rh", "1-rob-centos-7-CT-x86_64-v67_0-Default_Organization-centos-7_3_1611-x86_64-sclo-sclo", "1-rob-centos-7-CT-x86_64-v6      7_0-Default_Organization-centos-7_3_1611-x86_64-epel", "1-rob-centos-7-CT-x86_64-v67_0-b4ec5c08-43ba-42b0-bc60-6f2f7fde04f8", "1-rob-centos-7-CT-x86_64-v67_0-80107df4-98eb-498b-bc      d0-a85324404a4a", "1-rob-centos-7-CT-x86_64-v67_0-31c4feb1-18a5-4a46-bb3d-0a35401171d1", "1-rob-centos-7-CT-x86_64-v67_0-dded6a50-8d81-4270-a963-18fa4a7943dc", "1-rob-centos-7-CT-      x86_64-v67_0-f0e2589b-b44d-4e2f-9387-0a8d70f8891a", "1-rob-centos-7-CT-x86_64-v67_0-Default_Organization-centos-7_3_1611-x86_64-os"], "_id": {"$oid": "5c90f6a1b7291c55fcc97c2d"},       "id": "Default_Organization-rob-centos-7-CT-x86_64-v67.0", "_href": "/pulp/api/v2/repo_groups/Default_Organization-rob-centos-7-CT-x86_64-v67.0/"}
**25359** 2019-03-19T15:03:13 [I|kat|] GET: `https://rtdky1kat01.aws.eu-west-1.hosting.eu/pulp/api/v2/repo_groups/Default_Organization-rob-centos-7-CT-x86_64-v67.0/distributors/`: {"content_t      ype"=>"application/json", "accept"=>"application/json"}
25360 Response: 200: [{"scratchpad": null, "repo_group_id": "Default_Organization-rob-centos-7-CT-x86_64-v67.0", "_ns": "repo_group_distributors", "last_publish": null, "distributor_typ      e_id": "group_export_distributor", "_id": {"$oid": "5c90f6a1b7291c55fcc97c2e"}, "config": {"http": false, "https": false}, "id": "6c76adda-6552-4f14-ba3b-25b8e2eeae50", "_href": "      /pulp/api/v2/repo_groups/Default_Organization-rob-centos-7-CT-x86_64-v67.0/distributors/6c76adda-6552-4f14-ba3b-25b8e2eeae50/"}]
**25361** 2019-03-19T15:03:13 [I|kat|] POST: `https://rtdky1kat01.aws.eu-west-1.hosting.eu/pulp/api/v2/repo_groups/Default_Organization-rob-centos-7-CT-x86_64-v67.0/actions/publish/`: {"id":"      6c76adda-6552-4f14-ba3b-25b8e2eeae50","override_config":{"incremental_export_repomd":true,"export_dir":"/var/lib/pulp/published/yum/master/group_export_distributor/Default_Organiz      ation-rob-centos-7-CT-x86_64-v67.0"}}: {"content_type"=>"application/json", "accept"=>"application/json"}
25362 Response: 202: {"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/10e74789-ed38-4528-b1d8-8f001dcfd25d/", "task_id": "10e74789-ed38-4528-b1d8-8f001dcfd25d"}], "result": null, "error      ": null}
25363 2019-03-19T15:03:13 [I|kat|] GET: https://rtdky1kat01.aws.eu-west-1.hosting.eu/pulp/api/v2/tasks/10e74789-ed38-4528-b1d8-8f001dcfd25d/: {"content_type"=>"application/json", "accep      t"=>"application/json"}
**25364** Response: 200: {"exception": null, "task_type": "pulp.server.managers.repo.group.publish.publish", "_href": "/pulp/api/v2/tasks/10e74789-ed38-4528-b1d8-8f001dcfd25d/", "task_id":       "10e74789-ed38-4528-b1d8-8f001dcfd25d", "tags": ["pulp:repository_group:Default_Organization-rob-centos-7-CT-x86_64-v67.0", "pulp:repository_group_distributor:6c76adda-6552-4f14-b      a3b-25b8e2eeae50", "pulp:action:publish"], "finish_time": null, "_ns": "task_status", "start_time": null, "traceback": null, "spawned_tasks": [], "progress_report": {}, "queue": "      reserved_resource_worker-1@rtdky1kat01.aws.eu-west-1.hosting.eu.dq2", "state": "waiting", "worker_name": "reserved_resource_worker-1@rtdky1kat01.aws.eu-west-1.hosting.eu", "result      ": null, "error": null, "_id": {"$oid": "5c90f6a19e5cafb46a8bd6a5"}, "id": "5c90f6a19e5cafb46a8bd6a5"}
**25365** 2019-03-19T15:03:14 [I|kat|] GET: `https://rtdky1kat01.aws.eu-west-1.hosting.eu/pulp/api/v2/tasks/10e74789-ed38-4528-b1d8-8f001dcfd25d/`: {"content_type"=>"application/json", "accep      t"=>"application/json"}
**25366** Response: 200: {"exception": null, "task_type": "pulp.server.managers.repo.group.publish.publish", "_href": "/pulp/api/v2/tasks/10e74789-ed38-4528-b1d8-8f001dcfd25d/", "task_id":       "10e74789-ed38-4528-b1d8-8f001dcfd25d", "tags": ["pulp:repository_group:Default_Organization-rob-centos-7-CT-x86_64-v67.0", "pulp:repository_group_distributor:6c76adda-6552-4f14-b      a3b-25b8e2eeae50", "pulp:action:publish"], "finish_time": null, "_ns": "task_status", "start_time": "2019-03-19T14:03:13Z", "traceback": null, "spawned_tasks": [], "progress_repor      t": {}, "queue": "reserved_resource_worker-1@rtdky1kat01.aws.eu-west-1.hosting.eu.dq2", "state": "running", "worker_name": "reserved_resource_worker-1@rtdky1kat01.aws.eu-west-1.ho      sting.eu", "result": null, "error": null, "_id": {"$oid": "5c90f6a19e5cafb46a8bd6a5"}, "id": "5c90f6a19e5cafb46a8bd6a5"}
**25367** 2019-03-19T15:03:15 [I|kat|] GET: `https://rtdky1kat01.aws.eu-west-1.hosting.eu/pulp/api/v2/tasks/10e74789-ed38-4528-b1d8-8f001dcfd25d/`: {"content_type"=>"application/json", "accep      t"=>"application/json"}
**25368** Response: 200: {"exception": null, "task_type": "pulp.server.managers.repo.group.publish.publish", "_href": "/pulp/api/v2/tasks/10e74789-ed38-4528-b1d8-8f001dcfd25d/", "task_id":       "10e74789-ed38-4528-b1d8-8f001dcfd25d", "tags": ["pulp:repository_group:Default_Organization-rob-centos-7-CT-x86_64-v67.0", "pulp:repository_group_distributor:6c76adda-6552-4f14-b      a3b-25b8e2eeae50", "pulp:action:publish"], "finish_time": "2019-03-19T14:03:14Z", "_ns": "task_status", "start_time": "2019-03-19T14:03:13Z", "traceback": "Traceback (most recent       call last):\n  File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 382, in trace_task\n    R = retval = fun(*args, **kwargs)\n  File \"/usr/lib/python2.7/site-pack      ages/pulp/server/async/tasks.py\", line 529, in __call__\n    return super(Task, self).__call__(*args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks      .py\", line 107, in __call__\n    return super(PulpTask, self).__call__(*args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 641, in __protected      _call__\n    return self.run(*args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/managers/repo/group/publish.py\", line 59, in publish\n    conduit, call_confi      g)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/managers/repo/group/publish.py\", line 71, in _do_publish\n    report = distributor_instance.publish_group(group, conduit      , call_config)\n  File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/export_distributor/groupdistributor.py\", line 114, in publish_group\n    self.ensure_all_u      nits_downloaded(repo_group)\n  File \"/usr/lib/python2.7/site-packages/pulp/plugins/distributor.py\", line 374, in ensure_all_units_downloaded\n    repos=', '.join(bad_repo_ids))\      nPulpCodedException: The repository group cannot be exported because these repos have units that are not downloaded: 1-rob-centos-7-CT-x86_64-v67_0-Default_Organization-centos-7_3      _1611-x86_64-updates\n", "spawned_tasks": [], "progress_report": {}, "queue": "reserved_resource_worker-1@rtdky1kat01.aws.eu-west-1.hosting.eu.dq2", "state": "error", "worker_name      ": "reserved_resource_worker-1@rtdky1kat01.aws.eu-west-1.hosting.eu", "result": null, "error": {"code": "PLP0046", "data": {"repos": "1-rob-centos-7-CT-x86_64-v67_0-Default_Organi      zation-centos-7_3_1611-x86_64-updates"}, "description": "The repository group cannot be exported because these repos have units that are not downloaded: 1-rob-centos-7-CT-x86_64-v      67_0-Default_Organization-centos-7_3_1611-x86_64-updates", "sub_errors": []}, "_id": {"$oid": "5c90f6a19e5cafb46a8bd6a5"}, "id": "5c90f6a19e5cafb46a8bd6a5"}
**25369** 2019-03-19T15:03:15 [E|bac|] PLP0046: The repository group cannot be exported because these repo25368s have units that are not downloaded: 1-rob-centos-7-CT-x86_64-v67_0-Default_Organi      zation-centos-7_3_1611-x86_64-updates (Katello::Errors::PulpError)

Already done

  • All download policy changed to immediate
  • Properties foreman:foreman for /var/lib/pulp/katello-export

If you have some idea about? I will be very happy to resolve this issue.

have you synced the repo after changing it to immediate?

Of sure. I have a synchronisation process each nignt to refresh my repository.

Can you check if 1-rob-centos-7-CT-x86_64-v67_0-Default_Organization-centos-7_3 _1611-x86_64-updates repo has any broken symlinks in the published dir? I’m wondering if there is an RPM that no longer exists that it’s not downloading.

Hi Chris,

I have done check as you tells me

  • Synchronize repository with content validation
  • Regenerate repository metadata
  • Regenerate content-view metadata

But the issue is already present.