Bug 772350 - sync status fails with traceback
Summary: sync status fails with traceback
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jason Connor
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 753128 757825 826628
TreeView+ depends on / blocked
 
Reported: 2012-01-06 21:56 UTC by Preethi Thomas
Modified: 2014-03-31 01:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:15:11 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2012-01-06 21:56:22 UTC
Description of problem:

Running sync status command seems to be failing with attribute error

In my case it seems to be failing for sync status on repos with scheduled syncs

Version-Release number of selected component (if applicable):
[root@preethi ~]# rpm -q pulp
pulp-0.0.256-1.fc15.noarch


How reproducible:


Steps to Reproduce:
1.Run repo sync status on repo (which has schedules in my case)

  
Actual results:

[root@preethi ~]# pulp-admin repo status --id=f15
+------------------------------------------+
               Status for f15
+------------------------------------------+
Repository: f15
Number of Packages: 2935
Last Sync: 2012-01-04 15:04:30-05:00
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 23, in <module>
    admin.main()
  File "/usr/lib/python2.7/site-packages/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/pluginlib/command.py", line 213, in main
    self.run()
  File "/usr/lib/python2.7/site-packages/pulp/client/admin/plugins/repo.py", line 315, in run
    error_details = self.form_error_details(syncs[0]["progress"])
  File "/usr/lib/python2.7/site-packages/pulp/client/admin/plugins/repo.py", line 153, in form_error_details
    if not progress.has_key("error_details"):
AttributeError: 'NoneType' object has no attribute 'has_key'
[root@preethi ~]# pulp-admin repo info --id=f15

Id                 	f15                      
Name               	f15                      
Repo URL           	https://preethi.usersys.redhat.com/pulp/repos/released/F-15/GOLD/Fedora/x86_64/os/
Feed URL           	http://download.devel.redhat.com/released/F-15/GOLD/Fedora/x86_64/os
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	2012-01-07T14:00:00-05:00/PT5M
Packages           	2935                     
Files              	0                        
Distributions      	ks-Fedora-Fedora-15-x86_64
Publish            	True                     
Clones             	[u'f15-clone', u'f15-clone1']
Groups             	None                     
Filters            	[]                       
Notes              	{}                       
Preserve Metadata  	True                     
Checksum Type      	sha256                  


Expected results:


Additional info:

Comment 1 Jason Connor 2012-01-06 22:02:05 UTC
[jconnor@localhost pulp]$ pulp-admin repo status --id kernel
+------------------------------------------+
              Status for kernel
+------------------------------------------+
Repository: kernel
Number of Packages: 24
Last Sync: 2012-01-06 10:26:04-07:00
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 7, in <module>
    execfile(__file__)
  File "/home/jconnor/Workspace/pulp/bin/pulp-admin", line 23, in <module>
    admin.main()
  File "/home/jconnor/Workspace/pulp/src/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/home/jconnor/Workspace/pulp/src/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/home/jconnor/Workspace/pulp/src/pulp/client/pluginlib/command.py", line 213, in main
    self.run()
  File "/home/jconnor/Workspace/pulp/src/pulp/client/admin/plugins/repo.py", line 315, in run
    error_details = self.form_error_details(syncs[0]["progress"])
  File "/home/jconnor/Workspace/pulp/src/pulp/client/admin/plugins/repo.py", line 153, in form_error_details
    if not progress.has_key("error_details"):
AttributeError: 'NoneType' object has no attribute 'has_key'
[jconnor@localhost pulp]$ pulp-admin repo create --id fedora-16-updates --feed http://download.fedoraproject.org/pub/fedora/linux/updates/16/x86_64/
Successfully created repository [ fedora-16-updates ]

[jconnor@localhost pulp]$ pulp-admin repo sync --id fedora-16-updates -F
Sync for repository fedora-16-updates started
Step: Purging Orphaned Packages
Waiting \
Task not found: 3fdbf8dc-388c-11e1-a86a-525400fdc2eb
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 7, in <module>
    execfile(__file__)
  File "/home/jconnor/Workspace/pulp/bin/pulp-admin", line 23, in <module>
    admin.main()
  File "/home/jconnor/Workspace/pulp/src/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/home/jconnor/Workspace/pulp/src/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/home/jconnor/Workspace/pulp/src/pulp/client/pluginlib/command.py", line 213, in main
    self.run()
  File "/home/jconnor/Workspace/pulp/src/pulp/client/admin/plugins/repo.py", line 792, in run
    final_task = self._foreground(task)
  File "/home/jconnor/Workspace/pulp/src/pulp/client/admin/plugins/repo.py", line 938, in _foreground
    while not task_end(task):
  File "/home/jconnor/Workspace/pulp/src/pulp/client/api/task.py", line 19, in task_end
    return task['state'] in ('finished', 'error', 'canceled', 'timed_out')
TypeError: 'NoneType' object is not subscriptable

Comment 2 Jason Connor 2012-01-09 17:47:52 UTC
We weren't properly handling tasks or task progress of None
Fix pushed in c54587e29439ef2eaf9dd6d5dceeeacaaf4ced61

Comment 3 Jeff Ortel 2012-01-10 16:33:30 UTC
build: 0.257

Comment 4 Preethi Thomas 2012-01-10 19:33:33 UTC
fails_qa

the status seems to be working for the mostly, but there is one case that is failing for me.

Steps to reproduce

1. Create a repo with a wrong feed
2. Try to sync the repo. (sync fails with RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again
)
3. delete the repo
4. Create a repo with same name as in step 1 but with a valid feed.
5. Sync the repo
6. Now run repo status.

See that you still get error from step 2

Comment 5 Jason Connor 2012-01-11 23:31:22 UTC
Can you re-verify this?

I followed the steps in comment 4, and it worked just fine.


[jconnor@localhost pulp]$ pulp-admin repo create --id D --feed http://phony.com/repos/D/x86_64/
Successfully created repository [ D ]

[jconnor@localhost pulp]$ pulp-admin repo sync --id D -F
Sync for repository D started
Sync: Error

Item Details: 
error:  Exception: Traceback (most recent call last):

  File "/home/jconnor/Workspace/grinder/src/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/home/jconnor/Workspace/grinder/src/grinder/YumInfo.py", line 96, in getDownloadItems
    self.__getRepoData()

  File "/home/jconnor/Workspace/grinder/src/grinder/YumInfo.py", line 169, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

  File "/home/jconnor/Workspace/grinder/src/grinder/YumInfo.py", line 156, in __getRepoXmlFileTypes
    return self.repo.repoXML.fileTypes()

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1463, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1459, in _getRepoXML
    raise Errors.RepoError, msg

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again


[jconnor@localhost pulp]$ pulp-admin repo delete --id D
Repository [ D ] being deleted

[jconnor@localhost pulp]$ pulp-admin repo create --id D --feed http://repos.fedorapeople.org/repos/bioinfornatics/D/fedora-16/x86_64/
Successfully created repository [ D ]

[jconnor@localhost pulp]$ pulp-admin repo sync --id D
Sync for repository D started
Use "repo status" to check on the progress
[jconnor@localhost pulp]$ pulp-admin repo sync --id D -F
Sync for repository D already in progress
Sync: Finished
40/40 new items downloaded
0/40 existing items processed

Item Details: 
RPMs: 40/40

Comment 6 Jeff Ortel 2012-01-16 22:47:53 UTC
build: 0.258

Comment 7 Preethi Thomas 2012-01-20 19:04:47 UTC
Still seeing the same issue with 258

[root@preethi ~]# rpm -q pulp
pulp-0.0.258-1.fc15.noarch


[root@preethi ~]# pulp-admin repo create --id=test --feed=http://repos.fedorapeople.org/repos/pulp/pulp/testing/
Successfully created repository [ test ]

[root@preethi ~]# pulp-admin repo sync --id=test -F
Sync for repository test started
Sync: Error

Item Details: 
error:  Exception: Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 96, in getDownloadItems
    self.__getRepoData()

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 169, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 156, in __getRepoXmlFileTypes
    return self.repo.repoXML.fileTypes()

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1454, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1450, in _getRepoXML
    raise Errors.RepoError, msg

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again


[root@preethi ~]# pulp-admin repo status --id=test
+------------------------------------------+
               Status for test
+------------------------------------------+
Repository: test
Number of Packages: 0
Last Sync: never
Last Error: 2012-01-20 14:15:04-05:00
Exception: Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 96, in getDownloadItems
    self.__getRepoData()

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 169, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

Comment 8 Jason Connor 2012-01-24 03:12:14 UTC
Ok, so I'm still not seeing this. Here's what I did:

1. created repo 'cr' whose feed was: http://boloney.sandwhich.com/cheese/
2. tried to sync
3. expected error in repo status
4. deleted repo 'cr'
5. created repo 'cr' whose feed was: http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-16/x86_64/
6. tried to sync
7. informed of progress in repo status

Here's the actual output:

[jconnor@localhost ~]$ pulp-admin repo create --id cr --feed http://boloney.sandwhich.com/cheese/
Successfully created repository [ cr ]


[jconnor@localhost ~]$ pulp-admin repo sync --id cr
Sync for repository cr started
Use "repo status" to check on the progress


[jconnor@localhost ~]$ pulp-admin repo status --id cr
+------------------------------------------+
                Status for cr
+------------------------------------------+
Repository: cr
Number of Packages: 0
Last Sync: never
Currently syncing: Downloading Metadata (0 of 0 items downloaded. 0.0 bytes remaining)

[jconnor@localhost ~]$ pulp-admin repo status --id cr
+------------------------------------------+
                Status for cr
+------------------------------------------+
Repository: cr
Number of Packages: 0
Last Sync: never
Last Error: 2012-01-23 19:53:17-07:00
Exception: Traceback (most recent call last):

  File "/home/jconnor/Workspace/grinder/src/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/home/jconnor/Workspace/grinder/src/grinder/YumInfo.py", line 96, in getDownloadItems
    self.__getRepoData()

  File "/home/jconnor/Workspace/grinder/src/grinder/YumInfo.py", line 169, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

  File "/home/jconnor/Workspace/grinder/src/grinder/YumInfo.py", line 156, in __getRepoXmlFileTypes
    return self.repo.repoXML.fileTypes()

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1463, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1459, in _getRepoXML
    raise Errors.RepoError, msg

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again



[jconnor@localhost ~]$ pulp-admin repo delete --id cr
Repository [ cr ] being deleted

[jconnor@localhost ~]$ pulp-admin repo create --id cr --feed http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-16/x86_64/
Successfully created repository [ cr ]


[jconnor@localhost ~]$ pulp-admin repo sync --id cr
Sync for repository cr started
Use "repo status" to check on the progress

[jconnor@localhost ~]$ pulp-admin repo status --id cr
+------------------------------------------+
                Status for cr
+------------------------------------------+
Repository: cr
Number of Packages: 0
Last Sync: never
Currently syncing: Downloading Items or Verifying (1 of 30 items downloaded. 493853921.0 bytes remaining)

[jconnor@localhost ~]$ pulp-admin repo status --id cr
+------------------------------------------+
                Status for cr
+------------------------------------------+
Repository: cr
Number of Packages: 0
Last Sync: never
Currently syncing: Downloading Items or Verifying (20 of 30 items downloaded. 400479050.0 bytes remaining)

Comment 9 Jason Connor 2012-01-24 03:14:44 UTC
One thing to note: I did create a repo cr that pointed to the Fedora 17 repository, which was a valid path, but ended up being empty. When I did a status for the sync, it showed me the failure on the bogus feed instead of on the new feed (I could tell because the times hadn't changed on the Last Error field).

Make sure that the good feed is actually good.

Comment 10 Preethi Thomas 2012-01-24 13:55:15 UTC
From the results you have posted above I couldn't tell if you did a repo status after the syncing completed.

I can still reproduces problem easily with the latest qe build

the repo status during the sync correctly shows the result, but once the sync is completed if you did repo status once the sync is completed it will go back to the status from before 

[root@preethi ~]# pulp-admin repo sync --id=test1
Sync for repository test1 started
Use "repo status" to check on the progress
[root@preethi ~]# pulp-admin repo status --id=test1
+------------------------------------------+
              Status for test1
+------------------------------------------+
Repository: test1
Number of Packages: 20
Last Sync: 2012-01-24 08:47:11-05:00
Currently syncing: Downloading Metadata (0 of 0 items downloaded. 0.0 bytes remaining)

[root@preethi ~]# pulp-admin repo status --id=test1
+------------------------------------------+
              Status for test1
+------------------------------------------+
Repository: test1
Number of Packages: 20
Last Sync: 2012-01-24 08:53:58-05:00
Last Error: 2012-01-24 08:45:46-05:00
Exception: Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 96, in getDownloadItems
    self.__getRepoData()

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 169, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 156, in __getRepoXmlFileTypes
    return self.repo.repoXML.fileTypes()

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1454, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1450, in _getRepoXML
    raise Errors.RepoError, msg

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again

Comment 11 Jason Connor 2012-01-24 17:31:38 UTC
ok, looks like I needed to let sync finish to have the traceback show back up
fix pushed and requires the following commits:
a28ece0647594b4631efb0b713da668144485c57
79b7518008b53d0f3fdaf53ea8ea73d50a6b1c44
f422fa1754d7a5ce65c1a4f91dec7e3546bec13f
7952030cdea5d63f352459d661069460106cb977

Comment 12 Jeff Ortel 2012-01-26 13:56:25 UTC
build: 0.262

Comment 13 Preethi Thomas 2012-01-27 16:28:07 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.262-1.fc15.noarch

[root@preethi ~]# pulp-admin repo status --id=spacewalk
+------------------------------------------+
            Status for spacewalk
+------------------------------------------+
Repository: spacewalk
Number of Packages: 130
Last Sync: 2012-01-27 10:35:25-05:00

[root@preethi ~]# pulp-admin repo create --id=test --feed=http://repos.fedorapeople.org/repos/pulp/pulp/testing/
Successfully created repository [ test ]

[root@preethi ~]# pulp-admin repo sync --id=test -F
Sync for repository test started
Sync: Error

Item Details: 
error:  Exception: Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 96, in getDownloadItems
    self.__getRepoData()

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 169, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 156, in __getRepoXmlFileTypes
    return self.repo.repoXML.fileTypes()

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1454, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1450, in _getRepoXML
    raise Errors.RepoError, msg

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again


[root@preethi ~]# pulp-admin repo status --id=test
+------------------------------------------+
               Status for test
+------------------------------------------+
Repository: test
Number of Packages: 0
Last Sync: never
Last Error: 2012-01-27 11:21:12-05:00
Exception: Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 96, in getDownloadItems
    self.__getRepoData()

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 169, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 156, in __getRepoXmlFileTypes
    return self.repo.repoXML.fileTypes()

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1454, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1450, in _getRepoXML
    raise Errors.RepoError, msg

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again



[root@preethi ~]# pulp-admin repo delete --id=test
Repository [ test ] being deleted

[root@preethi ~]# pulp-admin repo status --id=test
error:  operation failed: No repository test
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# pulp-admin repo create --id=test --feed=http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-16/x86_64/
Successfully created repository [ test ]

[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# pulp-admin repo sync --id=test -FSync for repository test started
Sync: Finished
20/20 new items downloaded
0/20 existing items processed

Item Details: 
RPMs: 20/20

[root@preethi ~]# pulp-admin repo status --id=test+------------------------------------------+
               Status for test
+------------------------------------------+
Repository: test
Number of Packages: 20
Last Sync: 2012-01-27 11:23:23-05:00

[root@preethi ~]# pulp-admin repo delete --id=testRepository [ test ] being deleted

[root@preethi ~]# pulp-admin repo create --id=test --feed=http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-16/x86_64/
Successfully created repository [ test ]

[root@preethi ~]# pulp-admin repo status --id=test+------------------------------------------+
               Status for test
+------------------------------------------+
Repository: test
Number of Packages: 0
Last Sync: never

[root@preethi ~]#

Comment 14 Shannon Hughes 2012-01-30 20:58:24 UTC
opening this one back up as we are seeing it on katello with build 263. preethi and I both confirmed on separate systems. 

on katello side we are:
1) create repo with bad feed url
2) sync and receive error
3) delete the repo, then create with same name
4) check the sync history on the new repo, shows old sync history info

looks like the repo sync history is not getting deleted when a repo is deleted

Comment 15 Preethi Thomas 2012-01-30 21:03:56 UTC
I do see that as well,

in my case above, I was getting the sync status after I finish the successful sync. But see the following if I create the repo and get a status call before the sync

[root@preethi ~]# pulp-admin repo create --id=test --feed=http://repos.fedorapeople.org/repos/pulp/pulp/testing/
Successfully created repository [ test ]

[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# pulp-admin repo create --id=test --feed=http://repos.fedorapeople.org/repos/pulp/pulp/testing/
error:  operation failed: A repository with the id, test, already exists
[root@preethi ~]# pulp-admin repo sync --id=test -FSync for repository test started
Sync: Error

Item Details: 
error:  Exception: Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 96, in getDownloadItems
    self.__getRepoData()

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 169, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 156, in __getRepoXmlFileTypes
    return self.repo.repoXML.fileTypes()

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1454, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1450, in _getRepoXML
    raise Errors.RepoError, msg

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again


[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# pulp-admin repo delete --id=testRepository [ test ] being deleted

[root@preethi ~]# pulp-admin repo create --id=test --feed=http://repos.fedorapeople.org/repos/pulp/pulp/testing/6Server/x86_64/
Successfully created repository [ test ]

[root@preethi ~]# pulp-admin repo status --id=test+------------------------------------------+
               Status for test
+------------------------------------------+
Repository: test
Number of Packages: 0
Last Sync: never
Last Error: 2012-01-30 16:02:46-05:00
Exception: Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 96, in getDownloadItems
    self.__getRepoData()

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 169, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 156, in __getRepoXmlFileTypes
    return self.repo.repoXML.fileTypes()

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1454, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1450, in _getRepoXML
    raise Errors.RepoError, msg

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again



[root@preethi ~]# pulp-admin repo sync --id=test -FSync for repository test started
Sync: Finished
20/20 new items downloaded
0/20 existing items processed

Item Details: 
RPMs: 20/20

[root@preethi ~]# pulp-admin repo status --id=test
+------------------------------------------+
               Status for test
+------------------------------------------+
Repository: test
Number of Packages: 20
Last Sync: 2012-01-30 16:04:05-05:00

[root@preethi ~]#

Comment 16 Jason Connor 2012-01-31 22:31:05 UTC
Added code that removes tasks and task history related to the repo when it is deleted
fix pushed in ff47fa42337f6a2f4b4ff825751d864593653591

Comment 17 Jason Connor 2012-02-01 17:50:45 UTC
actually had to re-work the task removal to only remove complete tasks
fix also requires commit f7c20c905cd5772c2dafd08186288e2b111d88c0

Comment 18 Jeff Ortel 2012-02-01 21:35:20 UTC
build: 0.264

Comment 19 Preethi Thomas 2012-02-06 14:28:08 UTC
[root@pulp-f16 ~]# rpm -q pulp
pulp-0.0.264-1.fc16.noarch

[root@pulp-f16 ~]# pulp-admin repo create --id=test --feed=http://repos.fedorapeople.org/repos/pulp/pulp/testing/6Server/x86_64/
Successfully created repository [ test ]

[root@pulp-f16 ~]# pulp-admin repo sync --id=test -FSync for repository test started
Sync: Finished
20/20 new items downloaded
0/20 existing items processed

Item Details: 
RPMs: 20/20

[root@pulp-f16 ~]# pulp-admin repo status --id=test+------------------------------------------+
               Status for test
+------------------------------------------+
Repository: test
Number of Packages: 20
Last Sync: 2012-02-06 09:23:28-05:00

[root@pulp-f16 ~]# pulp-admin repo delete --id=testRepository [ test ] being deleted

[root@pulp-f16 ~]# pulp-admin repo create --id=test --feed=http://repos.fedorapeople.org/repos/pulp/pulp/testing/
Successfully created repository [ test ]

[root@pulp-f16 ~]# pulp-admin repo status --id=test+------------------------------------------+
               Status for test
+------------------------------------------+
Repository: test
Number of Packages: 0
Last Sync: never

[root@pulp-f16 ~]# pulp-admin repo sync --id=test
Sync for repository test started
Use "repo status" to check on the progress
[root@pulp-f16 ~]# pulp-admin repo status --id=test
+------------------------------------------+
               Status for test
+------------------------------------------+
Repository: test
Number of Packages: 0
Last Sync: never
Currently syncing: Downloading Metadata (0 of 0 items downloaded. 0.0 bytes remaining)

[root@pulp-f16 ~]# pulp-admin repo status --id=test
+------------------------------------------+
               Status for test
+------------------------------------------+
Repository: test
Number of Packages: 0
Last Sync: never
Last Error: 2012-02-06 09:24:10-05:00
Exception: Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 96, in getDownloadItems
    self.__getRepoData()

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 169, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

  File "/usr/lib/python2.7/site-packages/grinder/YumInfo.py", line 156, in __getRepoXmlFileTypes
    return self.repo.repoXML.fileTypes()

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1463, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1459, in _getRepoXML
    raise Errors.RepoError, msg

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again



[root@pulp-f16 ~]# pulp-admin repo delete --id=testRepository [ test ] being deleted

[root@pulp-f16 ~]# pulp-admin repo status --id=test
error:  operation failed: No repository test
[root@pulp-f16 ~]# pulp-admin repo delete --id=test
error:  operation failed: No repository test
[root@pulp-f16 ~]# pulp-admin repo create --id=test --feed=http://repos.fedorapeople.org/repos/pulp/pulp/testing/6Server/x86_64/
Successfully created repository [ test ]

[root@pulp-f16 ~]# pulp-admin repo status --id=test+------------------------------------------+
               Status for test
+------------------------------------------+
Repository: test
Number of Packages: 0
Last Sync: never

[root@pulp-f16 ~]#

Comment 20 Preethi Thomas 2012-02-24 20:15:11 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 21 Preethi Thomas 2012-02-24 20:16:51 UTC
Pulp v1.0 is released.


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