Bug 695470 - Error retrieving a repo that has a schedule on it
Summary: Error retrieving a repo that has a schedule on it
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
urgent
unspecified
Target Milestone: ---
: ---
Assignee: Jason Connor
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 688298
TreeView+ depends on / blocked
 
Reported: 2011-04-11 19:44 UTC by Jay Dobies
Modified: 2014-03-31 01:39 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Jay Dobies 2011-04-11 19:44:20 UTC
I created a repo with a sync_schedule and when I called GET on a single repository. pulp-admin repo list works.


2011-04-11 15:43:11,976 [ERROR][Dummy-5] report_error() @ base.py:56 - Traceback (most recent call last):
  File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/base.py", line 52, in report_error
    return method(self, *args, **kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/base.py", line 131, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/webservices/controllers/repositories.py", line 273, in GET
    task = scheduled_sync.find_repo_scheduled_task(repo)
  File "/home/jdob/code/pulp/src/pulp/server/api/scheduled_sync.py", line 151, in find_repo_scheduled_task
    for task in async.find_async(method_name='_sync'):
  File "/home/jdob/code/pulp/src/pulp/server/async.py", line 73, in find_async
    return _queue.find(**kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/tasking/taskqueue/queue.py", line 285, in find
    return self.__storage.find(kwargs)
  File "/home/jdob/code/pulp/src/pulp/server/tasking/taskqueue/storage.py", line 86, in find
    for task in reversed(list(self._all_tasks())):
  File "/home/jdob/code/pulp/src/pulp/server/tasking/taskqueue/storage.py", line 80, in _all_tasks
    sorted(self.__waiting_tasks[:]))
  File "/home/jdob/code/pulp/src/pulp/server/tasking/task.py", line 139, in __cmp__
    return cmp(self.scheduled_time, other.scheduled_time)
TypeError: can't compare datetime.datetime to NoneType

Comment 1 Jason Connor 2011-04-13 15:41:16 UTC
Added comparisons between tasks with None scheduled_time

Comment 2 Jay Dobies 2011-04-13 19:22:51 UTC
Fixed in build 0.163.

Comment 3 Preethi Thomas 2011-09-01 15:21:28 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.229-1.fc15.noarch

[root@preethi ~]#  curl -k -u admin:admin --request GET  --header 'accept: application/json' --header 'content-type: application/json' https://localhost/pulp/api/repositories/f14/
{"use_symlinks": false, "package_count": 2766, "distributionid": ["ks-f14-noarch"], "consumer_cert": null, "consumer_ca": null, "filters": [], "id": "f14", "publish": true, "source": {"url": "http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os", "type": "remote"}, "groupid": [], "files": "/pulp/api/repositories/f14/files/", "relative_path": "released/F-14/GOLD/Fedora/x86_64/os", "sync_schedule": "PT1H", "arch": "noarch", "feed_cert": null, "name": "f14", "feed_ca": null, "notes": {}, "last_sync": "2011-09-01T11:21:01-04:00", "content_types": "yum", "clone_ids": ["f14-clone-parent"], "checksum_type": "sha256", "_id": "f14", "packages": "/pulp/api/repositories/f14/packages/", "packagegroups": "/pulp/api/repositories/f14/packagegroups/", "packagegroupcategories": "/pulp/api/repositories/f14/packagegroupcategories/", "errata": "/pulp/api/repositories/f14/errata/", "distribution": "/pulp/api/repositories/f14/distribution/", "keys": "/pulp/api/repositories/f14/keys/", "comps": "/pulp/api/repositories/f14/comps/", "uri_ref": "/pulp/api/repositories/f14/", "files_count": 33, "next_scheduled_time": null, "next_scheduled_sync": "2011-09-01T16:18:13Z"}[root@preethi ~]#

Comment 4 Preethi Thomas 2012-02-24 20:10:47 UTC
Pulp v1.0 is released
Closed Current Release.


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