Bug 866491 - Error handling needed repo copy rpm when --to-repo-id/from-repo-id doesn't exist
Error handling needed repo copy rpm when --to-repo-id/from-repo-id doesn't exist
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.0.6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 42
Assigned To: Jay Dobies
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-15 09:44 EDT by Preethi Thomas
Modified: 2013-09-09 12:27 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 12:05:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Preethi Thomas 2012-10-15 09:44:12 EDT
Description of problem:

When you use non existing repo-id for for --to-repo-id/from-repo-id  for repo copy, it will look like its copying but the missing resource error can be traced in the log
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

[root@pulp-master ~]# pulp-admin rpm repo copy rpm --from-repo-id pulp-f17 --to-repo-id dest -d --match "name=^p.*" --match "arch=noarch"
Progress on this task can be viewed using the commands under "repo tasks".

[root@pulp-master ~]# pulp-admin tasks list
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  associate
Resources:   dest (repository), pulp-f17 (repository)
State:       Failed
Start Time:  Unstarted
Finish Time: 2012-10-15T13:20:20Z
Result:      Incomplete
Task Id:     11d3154a-16cb-11e2-8d27-54520075d18e



1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Jay Dobies 2012-11-28 15:07:21 EST
Changed to run the repo validation before the task is kicked off:

╭─[jdob]─[hinterlands]─[~]─[]─●
╰─➤ pulp-admin rpm repo copy rpm --to-repo-id fake --from-repo-id test-repo
The following resource(s) could not be found:

  fake (repo_id)


╭─[jdob]─[hinterlands]─[~]─[]─●
╰─➤ pulp-admin rpm repo copy rpm --to-repo-id test-repo --from-repo-id fake
The following resource(s) could not be found:

  fake (repo_id)
Comment 2 Jay Dobies 2012-11-28 15:45:18 EST
Correction, it's not REST-y to say the source repo is missing, so instead it will indicate bad data, which will look like:


╭─[jdob]─[hinterlands]─[~]─[]─●
╰─➤ pulp-admin rpm repo copy rpm --to-repo-id test-repo --from-repo-id fake
The values for the following properties were invalid: from-repo-id
Comment 3 Jay Dobies 2012-11-28 15:59:37 EST
Git Commits:

Pulp:412564388f1946e1724902f9811f7224ceb1eeab
     7560ec3a45410d34ca8554f6390f66b9265da99a
Pulp RPM: 2a37f5272d712a82fa98b868f44611948a07e6a0
Pulp Puppet: ad7d365b1a737f1a326e6d4d077da7771e0d0e4d
Comment 4 Jeff Ortel 2012-11-29 16:30:12 EST
build: 2.0.6-0.10.beta
Comment 5 Preethi Thomas 2012-12-03 20:51:25 EST
[root@preethi-el6-pulp ~]# rpm -q pulp-server
pulp-server-2.0.6-0.11.beta.noarch
[root@preethi-el6-pulp ~]# 


[root@preethi-el6-pulp ~]# pulp-admin repo list
+----------------------------------------------------------------------+
                              Repositories
+----------------------------------------------------------------------+

Id:                 zoo1
Display Name:       zoo1
Description:        None
Content Unit Count: 39

Id:                 zoo
Display Name:       zoo
Description:        None
Content Unit Count: 39

[root@preethi-el6-pulp ~]# rpm -q pulp-server
pulp-server-2.0.6-0.11.beta.noarch
[root@preethi-el6-pulp ~]# 

[root@preethi-el6-pulp ~]# pulp-admin rpm repo copy rpm --to-repo-id fake --from-repo-id zoo
The following resource(s) could not be found:

  fake (repo_id)


[root@preethi-el6-pulp ~]# pulp-admin tasks list
+----------------------------------------------------------------------+
                                 Tasks
+----------------------------------------------------------------------+

Operations:  
Resources:   
State:       Failed
Start Time:  Unstarted
Finish Time: 2012-12-03T19:46:05Z
Result:      Incomplete
Task Id:     5a93d536-55a6-4497-8a23-a1ef88e6e5fc


[root@preethi-el6-pulp ~]# pulp-admin rpm repo copy rpm --to-repo-id zoo --from-repo-id fake
The values for the following properties were invalid: from-repo-id
Comment 6 Preethi Thomas 2013-01-09 12:05:30 EST
Pulp v2.0 released

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