Bug 769381

Summary: RFE: repository delete needs new error when the action is already enqueued
Product: [Retired] Pulp Reporter: dgao
Component: user-experienceAssignee: Jay Dobies <jason.dobies>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.0.6CC: jason.dobies, pthomas, skarmark
Target Milestone: ---Keywords: FutureFeature, Reopened, Triaged
Target Release: Sprint 42   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-09 17:08:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 883899    
Bug Blocks:    

Description dgao 2011-12-20 16:54:53 UTC
[root@pulp-qe pulp]# pulp-admin -u admin -p admin repo delete --id=faux_test_repo
Repository [ faux_test_repo ] being deleted

[root@pulp-qe pulp]# pulp-admin -u admin -p admin repo delete --id=faux_test_repo
error:  error: operation failed: The repository, faux_test_repo, cannot be deleted


The second error I got gives me the impression that something went wrong, not the action is already queued up.

Comment 1 Preethi Thomas 2011-12-20 18:33:54 UTC

*** This bug has been marked as a duplicate of bug 768497 ***

Comment 2 Sayli Karmarkar 2012-01-04 17:10:23 UTC
*** Bug 771697 has been marked as a duplicate of this bug. ***

Comment 3 Jay Dobies 2012-12-11 19:05:31 UTC
I think this is a non-issue. While running a sync, I queued up a delete. That was accepted (I am going to change the CLI message, however, to indicate the delete wasn't immediate but rather was queued). I tried again and got:

╭─[jdob]─[hinterlands]─[~]─[]─●
╰─➤ pulp-admin rpm repo delete --repo-id feeded
The requested operation conflicts with one or more operations already queued for
the resource. The following operations on the specified resources caused the
request to be rejected:

Resource:  repository - feeded
Operation: delete




The following tasks are present, which is correct. The sync is at unstarted because, to simulate this situation, I jacked up the weight of syncs past what the coordinator can even handle, meaning it will never run. That basically got me a permanent window in which to play with queuing up tasks.


╭─[jdob]─[hinterlands]─[~]─[]─●
╰─➤ pulp-admin repo tasks list --repo-id feeded
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  sync
Resources:   feeded (repository)
State:       Waiting
Start Time:  Unstarted
Finish Time: Incomplete
Result:      Incomplete
Task Id:     6aeac51c-e287-4c2d-af35-73ee2ecd5c37

Operations:  auto_publish, publish
Resources:   feeded (repository)
State:       Waiting
Start Time:  Unstarted
Finish Time: Incomplete
Result:      Incomplete
Task Id:     eaf84adb-7c87-4076-8c4e-4dec438cf1fa

Operations:  delete
Resources:   feeded (repository)
State:       Waiting
Start Time:  Unstarted
Finish Time: Incomplete
Result:      Incomplete
Task Id:     22613f8b-6e3f-4e71-95f6-d7ff8d5c8dea

Comment 4 Jay Dobies 2012-12-11 19:13:04 UTC
New message when a delete is issued to better reflect the fact that the delete isn't immediate:

╭─[jdob]─[hinterlands]─[~]─[]─●
╰─➤ pulp-admin rpm repo delete --repo-id feeded
The request to delete repository [feeded] has been received by the server. The
progress of the task can be viewed using the commands under "repo tasks"

Comment 5 Jeff Ortel 2012-12-13 15:17:06 UTC
build: 2.0.6-0.15.beta

Comment 6 Preethi Thomas 2012-12-14 14:18:18 UTC
[root@preethi ~]# rpm -q pulp-server
pulp-server-2.0.6-0.17.beta.noarch


[root@preethi ~]# pulp-admin rpm repo create --repo zoo --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
Successfully created repository [zoo]

[root@preethi ~]#  pulp-admin rpm repo sync run --repo-id zoo
+----------------------------------------------------------------------+
                     Synchronizing Repository [zoo]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading metadata...
[-]
^C[root@preethi ~]#  pulp-admin rpm repo delete --repo zoo 
The request to delete repository [zoo] has been received by the server. The
progress of the task can be viewed using the commands under "repo tasks"
[root@preethi ~]#  pulp-admin rpm repo delete --repo zoo 
The requested operation conflicts with one or more operations already queued for
the resource. The following operations on the specified resources caused the
request to be rejected:

Resource:  repository - zoo
Operation: delete

Comment 7 Preethi Thomas 2013-01-09 17:08:08 UTC
Pulp v2.0 released