Task #7175
Updated by ttereshc over 4 years ago
To reproduce sync http://mirror.linux.duke.edu/pub/centos/8/BaseOS/x86_64/kickstart/
The `images/install.img` is not present among images but still is in contentartifact table and is published correctly.
```
pulp=> select * from rpm_image;
pulp_id | pulp_created | pulp_last_updated | name | path | platforms
| distribution_tree_id
--------------------------------------+-------------------------------+-------------------------------+-------------+---------------------------+-------------
+--------------------------------------
6fed6e01-494a-4c77-9e1c-c85c07c9e48e | 2020-07-20 18:08:35.447812+00 | 2020-07-20 18:08:35.447826+00 | boot.iso | images/boot.iso | x86_64
| b94bb596-4aa7-4920-938e-66360cbba652
593b55a2-9474-437c-83ce-34b87885fa55 | 2020-07-20 18:08:35.447857+00 | 2020-07-20 18:08:35.447865+00 | efiboot.img | images/efiboot.img | x86_64
| b94bb596-4aa7-4920-938e-66360cbba652
82677b85-e707-4a28-affe-7a933cc48dbe | 2020-07-20 18:08:35.447889+00 | 2020-07-20 18:08:35.447896+00 | initrd | images/pxeboot/initrd.img | x86_64, xen
| b94bb596-4aa7-4920-938e-66360cbba652
1d8d8515-3fc0-410d-ac02-6dd317dac708 | 2020-07-20 18:08:35.44792+00 | 2020-07-20 18:08:35.447927+00 | kernel | images/pxeboot/vmlinuz | x86_64, xen
| b94bb596-4aa7-4920-938e-66360cbba652
(4 rows)
```
```
pulp=> select * from core_contentartifact where content_id='b94bb596-4aa7-4920-938e-66360cbba652';
pulp_id | pulp_created | pulp_last_updated | relative_path | artifact_id
| content_id
--------------------------------------+-------------------------------+-------------------------------+---------------------------+---------------------------
-----------+--------------------------------------
10ecfd6e-2046-4653-9313-508d4b112976 | 2020-07-20 18:08:35.414974+00 | 2020-07-20 18:08:35.41498+00 | .treeinfo | f8d285ea-c394-4da7-a0a4-40
e61b30f443 | b94bb596-4aa7-4920-938e-66360cbba652
0bdfcf83-6d44-43aa-a299-1844d2ccee44 | 2020-07-20 18:08:35.414996+00 | 2020-07-20 18:08:35.415002+00 | images/boot.iso |
| b94bb596-4aa7-4920-938e-66360cbba652
52cd8187-02e5-4c3a-a56e-7bbb12b064f0 | 2020-07-20 18:08:35.415016+00 | 2020-07-20 18:08:35.415022+00 | images/efiboot.img |
| b94bb596-4aa7-4920-938e-66360cbba652
f960003a-9cb5-4d19-a4b2-a72a0bcaa07d | 2020-07-20 18:08:35.415036+00 | 2020-07-20 18:08:35.415042+00 | images/pxeboot/initrd.img |
| b94bb596-4aa7-4920-938e-66360cbba652
78d19586-663a-4de3-81d7-811d8490eaad | 2020-07-20 18:08:35.415056+00 | 2020-07-20 18:08:35.415062+00 | images/pxeboot/vmlinuz |
| b94bb596-4aa7-4920-938e-66360cbba652
cd5c5408-f76e-482f-8cd3-8b941c412588 | 2020-07-20 18:08:35.415076+00 | 2020-07-20 18:08:35.415081+00 | images/install.img |
| b94bb596-4aa7-4920-938e-66360cbba652
(6 rows)
```
My guess is that images and content artifacts are created based on different source of information. Probably similar to [this](https://github.com/pulp/pulp-2to3-migration/commit/e89b4d47b1ec42bf8bc1d16bda2a2c12bec4032c)(read the commit message), one needs to use `download` list and not `images`.
If you publish a repo, it works fine, because contentartifact is set.
However content is not listed correctly (one image missing) if you retrieve a distribution tree content and look at its json.
Data migration is needed to create missing images.