Project

Profile

Help

Issue #7924

Sync doesn't create RemoteArtifacts

Added by bmbouter 10 months ago. Updated 4 months ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

It's expected that content even sync'd with immediate will have a RemoteArtifact created for it. It seems pulp_ansible (tested at commit dba80be7048c946dc9a4d631410c85e7b3e315bc) does not.

To Reproduce

  1. Use pulp_ansible at commit dba80be7048c946dc9a4d631410c85e7b3e315bc
  2. Sync basic content using a functional test: pytest -v -r sx --color=yes --pyargs pulp_ansible.tests.functional.api.collection.v2.test_sync::SyncTestCase::test_sync_simple_collections_file.
  3. Go into pulpcore-manager shell_plus.
  4. Observe that there are RemoteArtifact objects created with:
In [1]: RemoteArtifact.objects.count()
Out[1]: 0
  1. Observe that the Artifact and ContentArtifact are created successful, but no corresponding RemoteArtifact.
In [3]: Artifact.objects.count()
Out[3]: 1

In [4]: a = Artifact.objects.first()

In [5]: a.content_memberships.count()
Out[5]: 1

In [6]: ca = a.content_memberships.first()

In [7]: ca.remoteartifact_set.count()
Out[7]: 0

Why does this matter?

If content becomes corrupted for example, the repair command or the handle-content-checksums command won't be able to automatically re-download content.


Related issues

Is duplicate of Pulp - Issue #8305: Deleting a remote used as source for live content corrupts ContentArtifact recordsNEW<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by bmbouter 10 months ago

  • Description updated (diff)

#2 Updated by bmbouter 10 months ago

  • Description updated (diff)

#3 Updated by fao89 9 months ago

I tested it locally, if you put a pdb at the end of the test you will see the RemoteArtifacts

In [1]: Artifact.objects.count()                                                                                                                                                              
Out[1]: 1                                                                                                                                                                                     
                                                                                                                                                                                              
In [2]: RemoteArtifact.objects.count()                                                                                                                                                        
Out[2]: 1      

#4 Updated by dalley 4 months ago

  • Related to Issue #8305: Deleting a remote used as source for live content corrupts ContentArtifact records added

#5 Updated by dalley 4 months ago

I'm pretty sure this is a duplicate of https://pulp.plan.io/issues/8305

I bet that once the test completes, the RemoteArtifacts are deleted when the remote is cleaned up. Which is why they're still there if you pause it before the cleanup happens.

#6 Updated by bmbouter 4 months ago

  • Status changed from NEW to CLOSED - DUPLICATE

I agree. Let's close as a duplicate. It makes sense reasoning-wise and there is evidence in Comment 3 too.

#7 Updated by bmbouter 4 months ago

  • Related to deleted (Issue #8305: Deleting a remote used as source for live content corrupts ContentArtifact records)

#8 Updated by bmbouter 4 months ago

  • Is duplicate of Issue #8305: Deleting a remote used as source for live content corrupts ContentArtifact records added

Please register to edit this issue

Also available in: Atom PDF