Bug 713742 - "pulp-admin repo metadata" broken
Summary: "pulp-admin repo metadata" broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 25
Assignee: Jason Connor
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: pulp-verified
TreeView+ depends on / blocked
 
Reported: 2011-06-16 13:04 UTC by Chris St. Pierre
Modified: 2014-03-31 01:39 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 14:00:58 UTC
Embargoed:


Attachments (Terms of Use)
Patch to fix (493 bytes, application/octet-stream)
2011-06-16 13:04 UTC, Chris St. Pierre
no flags Details

Description Chris St. Pierre 2011-06-16 13:04:47 UTC
Created attachment 505033 [details]
Patch to fix

Description of problem:

"pulp-admin repo metadata" produces the following error:

% pulp-admin repo metadata --id generic-5-x86_64-epel
error: operation failed: isinstance() arg 2 must be a class, type, or tuple of classes and types

And the following stack trace in the logs:

2011-06-16 08:48:53,048 [ERROR][Dummy-23] @ base.py:57 - Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/pulp/server/webservices/controllers/base.py", line 53, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/pulp/server/webservices/controllers/base.py", line 132, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/pulp/server/webservices/controllers/repositories.py", line 1264, in POST
    return action(id)
  File "/usr/lib/python2.4/site-packages/pulp/server/webservices/controllers/repositories.py", line 647, in metadata
    task = api.metadata(id)
  File "/usr/lib/python2.4/site-packages/pulp/server/api/repo.py", line 1929, in metadata
    task = run_async(self._metadata, [id], {})
  File "/usr/lib/python2.4/site-packages/pulp/server/async.py", line 77, in run_async
    return enqueue(task, unique)
  File "/usr/lib/python2.4/site-packages/pulp/server/async.py", line 48, in enqueue
    _queue.enqueue(task, unique)
  File "/usr/lib/python2.4/site-packages/pulp/server/tasking/taskqueue/queue.py", line 245, in enqueue
    self.__storage.enqueue_waiting(task)
  File "/usr/lib/python2.4/site-packages/pulp/server/tasking/taskqueue/storage.py", line 229, in enqueue_waiting
    self._snapshot_task(task)
  File "/usr/lib/python2.4/site-packages/pulp/server/tasking/taskqueue/storage.py", line 219, in _snapshot_task
    snapshot = task.snapshot()
  File "/usr/lib/python2.4/site-packages/pulp/server/tasking/task.py", line 228, in snapshot
    data[field] = pickle.dumps(getattr(self, field))
  File "/usr/lib64/python2.4/pickle.py", line 1386, in dumps
    Pickler(file, protocol, bin).dump(obj)
  File "/usr/lib64/python2.4/pickle.py", line 231, in dump
    self.save(obj)
  File "/usr/lib64/python2.4/pickle.py", line 338, in save
    self.save_reduce(obj=obj, *rv)
  File "/usr/lib64/python2.4/pickle.py", line 415, in save_reduce
    save(args)
  File "/usr/lib64/python2.4/pickle.py", line 293, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib64/python2.4/pickle.py", line 576, in save_tuple
    save(element)
  File "/usr/lib64/python2.4/pickle.py", line 313, in save
    rv = reduce(self.proto)
  File "/usr/lib64/python2.4/copy_reg.py", line 83, in _reduce_ex
    dict = getstate()
  File "/usr/lib/python2.4/site-packages/pulp/server/api/repo.py", line 101, in __getstate__
    if not isinstance(v, threading.RLock):
SnapshotFailure: Snapshot of Task fd72bfcf-9816-11e0-bb05-000c291a4507: RepoApi._metadata(generic-5-x86_64-epel, ) failed error pickling field: callable
isinstance() arg 2 must be a class, type, or tuple of classes and types

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

0.0.190, HEAD

How reproducible:

Always

Steps to Reproduce:

1. Run "pulp-admin repo metadata" against any repo.
  
Actual results:

Borks!

Expected results:

Rebuilds metadata.

Additional info:

Patch is attached.

Comment 1 Jason Connor 2011-06-22 16:47:10 UTC
applied patch, revision 0ffce57cd6da03c91f407741dad699905e573464

Comment 2 Jeff Ortel 2011-06-22 21:12:18 UTC
build: 0.196

Comment 3 Preethi Thomas 2011-07-08 16:37:33 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.202-1.fc14.noarch



The option repo metadata has been replaced with generate_metadata

[root@preethi ~]# pulp-admin repo generate_metadata --id=metadata
Metadata generation has been successfully scheduled for repo id [metadata]. Use --status to check the status.
[root@preethi ~]# pulp-admin repo generate_metadata --id=metadata --status

Task Id          	ceb7a919-a97f-11e0-adef-002564a85a58
Status           	finished                 
Start Time       	2011-07-08 12:32:01-04:00
Finish Time      	2011-07-08 12:32:02-04:00

Comment 4 Preethi Thomas 2011-08-16 14:00:58 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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