Project

Profile

Help

Issue #1381

HTTP 500 when attempting to create a sync schedule

Added by jcline@redhat.com almost 6 years ago. Updated over 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
2.8.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

  1. pulp-admin rpm repo create --repo-id zoo
  2. pulp-admin rpm repo sync schedules create --schedule 2014-06-24T12:00:00Z/P1M --repo-id zoo
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: Unhandled Exception
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920) Cannot encode object: <User: User object>
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920) Traceback (most recent call last):
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)     response = wrapped_callback(request, *callback_args, **callback_kwargs)
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)   File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)     return self.dispatch(request, *args, **kwargs)
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)   File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)     return handler(request, *args, **kwargs)
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/decorators.py", line 239, in _auth_decorat
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)     return _verify_auth(self, operation, super_user_only, method, *args, **kwargs)
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/decorators.py", line 193, in _verify_auth
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)     value = method(self, *args, **kwargs)
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/util.py", line 111, in wrapper
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)     return func(*args, **kwargs)
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)   File "/home/vagrant/devel/pulp/server/pulp/server/webservices/views/repositories.py", line 486, in post
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)     schedule, failure_threshold, enabled)
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/schedule/repo.py", line 71, in create
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)     schedule.save()
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)   File "/home/vagrant/devel/pulp/server/pulp/server/db/model/dispatch.py", line 250, in save
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)     self.get_collection().insert(as_dict)
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)   File "/usr/lib64/python2.7/site-packages/pymongo/collection.py", line 409, in insert
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920)     gen(), check_keys, self.uuid_subtype, client)
Nov 18 16:59:18 dev pulp[26167]: pulp.server.webservices.middleware.exception:ERROR: (26167-53920) InvalidDocument: Cannot encode object: <User: User object>

Related issues

Has duplicate Pulp - Issue #1491: Cannot create a repository schedule via apiCLOSED - DUPLICATE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision ff0b4311 View on GitHub
Added by Austin Macdonald almost 6 years ago

Ensure all values in ScheduledCall are serialized

closes #1381

Revision ff0b4311 View on GitHub
Added by Austin Macdonald almost 6 years ago

Ensure all values in ScheduledCall are serialized

closes #1381

History

#1 Updated by amacdona@redhat.com almost 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to amacdona@redhat.com
  • Priority changed from Normal to High
  • Platform Release set to 2.8.0

This was caused by the Users mongoengine conversion. `as_dict`: https://github.com/pulp/pulp/blob/master/server/pulp/server/db/model/dispatch.py#L216 assumes that the User object (and the SystemUser object) are dictionaries.

#2 Updated by mhrivnak almost 6 years ago

  • Triaged changed from No to Yes

#3 Updated by amacdona@redhat.com almost 6 years ago

  • Status changed from ASSIGNED to POST

#4 Updated by mhrivnak almost 6 years ago

  • Has duplicate Issue #1491: Cannot create a repository schedule via api added

#5 Updated by Anonymous almost 6 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#6 Updated by dkliban@redhat.com over 5 years ago

  • Status changed from MODIFIED to 5

#7 Updated by dkliban@redhat.com over 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#8 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF