Bug 769381 - RFE: repository delete needs new error when the action is already enqueued
Summary: RFE: repository delete needs new error when the action is already enqueued
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 2.0.6
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: Sprint 42
Assignee: Jay Dobies
QA Contact: Preethi Thomas
URL:
Whiteboard:
: 771697 (view as bug list)
Depends On: 883899
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-20 16:54 UTC by dgao
Modified: 2013-09-09 16:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-09 17:08:08 UTC


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.