Project

Profile

Help

Issue #463

closed

repo can be deleted before the a running sync is completed

Added by pthomas@redhat.com about 9 years ago. Updated about 5 years ago.

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

Description

Description of problem:

If you delete a repo while the sync is running, the repo delete tasks occurs before the sync is finished and that will result in sync status report missing resource

Version-Release number of selected component (if applicable):

[root@mgmt3 ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.23.beta.el6.noarch
[root@mgmt3 ~]#

How reproducible:

Steps to Reproduce:
1.create and sync a large repo
2.while the sync is running, issue a repo delete on the same repo from another window
3.

Actual results:
[root@mgmt3 ~]# pulp-admin rpm repo sync run --repo-id rhel63
--------------------------------------------------------------------
Synchronizing Repository [rhel63]
--------------------------------------------------------------------

This command may be exited via ctrl+c without affecting the request.

Downloading metadata...
[|]
... completed

Downloading repository content...
[==================================================] 100%
RPMs: 0/0 items
[==================================================] 100%
RPMs: 0/0 items
Delta RPMs: 0/0 items

... completed

Downloading distribution files...
[==================================================] 100%
Distributions: 7/7 items
... completed

Importing errata...
[|]
... completed

Importing package groups/categories...
[|]
... completed

Task Succeeded

[-]
Waiting to begin...

Task Failed

Missing resource(s): resource_id=rhel63

Expected results:

Additional info:

+ This bug was cloned from Bugzilla Bug #1115187 +

Actions #1

Updated by mhrivnak about 9 years ago

It looks like the sync completed, but the auto-publish failed because the delete ran first. "Task Succeeded" came from the sync task, and then the "Waiting to begin..." was the auto-publish waiting on the delete task to finish.

So I think this is expected and sane behavior, but we should probably figure out how to present it in a less-confusing way.

+ This comment was cloned from Bugzilla #1115187 comment 1 +

Actions #2

Updated by rbarlow about 9 years ago

I think there could be a more straightforward way to fix this. If I remember correctly (possible that this is wrong), the sync schedules the publish when it is done, if there is supposed to be a publish. Obviously as it is, there is no way for a sync to know that there is a delete in the pipe, so this is all it can do.

One improvement we might make is to have the delete calls in Pulp cancel all tasks against the resource they are deleting. This way, the sync shouldn't try to schedule the publish because the sync will know that it has been canceled. I think this also makes sense from a use case perspective. It seems unlikely that a user would want to complete a sync if they had issued a delete call. At least, I can't think of a use case. Perhaps we should make sure there is no such use case (maybe an export could be desired to finish a sync/publish before the delete goes through?)

+ This comment was cloned from Bugzilla #1115187 comment 2 +

Actions #3

Updated by bcourt about 9 years ago

+1 for deleting all the running tasks for a repo if a delete is issued.

Actions #4

Updated by bmbouter about 9 years ago

  • Severity changed from Medium to 2. Medium
Actions #5

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #6

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF