Project

Profile

Help

Issue #1254

closed

TypeError: can't compare offset-naive and offset-aware datetimes

Added by rbarlow about 8 years ago. Updated over 4 years ago.

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

Description

A user on pulp-list reported the following traceback after upgrading to Pulp 2.6.3 on RHEL 7.1:

pulp: celery.worker.job:ERROR: (1822-58784) Task pulp.server.managers.repo.publish.publish[e325dd8a-3541-4f10-a5f0-80f6a51f8a19] raised unexpected: TypeError("can't compare offset-naive and offset-aware datetimes",)
pulp: celery.worker.job:ERROR: (1822-58784) Traceback (most recent call last):
pulp: celery.worker.job:ERROR: (1822-58784)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
pulp: celery.worker.job:ERROR: (1822-58784)     R = retval = fun(*args, **kwargs)
pulp: celery.worker.job:ERROR: (1822-58784)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 395, in __call__
pulp: celery.worker.job:ERROR: (1822-58784)     return super(Task, self).__call__(*args, **kwargs)
pulp: celery.worker.job:ERROR: (1822-58784)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
pulp: celery.worker.job:ERROR: (1822-58784)     return self.run(*args, **kwargs)
pulp: celery.worker.job:ERROR: (1822-58784)   File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/publish.py", line 88, in publish
pulp: celery.worker.job:ERROR: (1822-58784)     transfer_repo, conduit, call_config)
pulp: celery.worker.job:ERROR: (1822-58784)   File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/publish.py", line 116, in _do_publish
pulp: celery.worker.job:ERROR: (1822-58784)     publish_report = publish_repo(transfer_repo, conduit, call_config)
pulp: celery.worker.job:ERROR: (1822-58784)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 567, in wrap_f
pulp: celery.worker.job:ERROR: (1822-58784)     return f(*args, **kwargs)
pulp: celery.worker.job:ERROR: (1822-58784)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/yum/distributor.py", line 170, in publish_repo
pulp: celery.worker.job:ERROR: (1822-58784)     self._publisher = publish.Publisher(repo, publish_conduit, config, TYPE_ID_DISTRIBUTOR_YUM)
pulp: celery.worker.job:ERROR: (1822-58784)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/yum/publish.py", line 257, in __init__
pulp: celery.worker.job:ERROR: (1822-58784)     ((last_deleted and last_published > last_deleted) or not last_deleted):
pulp: celery.worker.job:ERROR: (1822-58784) TypeError: can't compare offset-naive and offset-aware datetimes

We should investigate to see if we changed the format for stored dates between Pulp 2.6.3 and previous versions, or if this bug is reproducible without upgrading.


Related issues

Has duplicate Pulp - Issue #1285: pulp nodes: removing everything from a repo on the parent will not publish the repo on the childCLOSED - DUPLICATEActions
Has duplicate Pulp - Issue #1267: Re-publish fails if content of the repo changesCLOSED - DUPLICATEActions
Actions #1

Updated by rbarlow about 8 years ago

  • Version changed from 2.6.3 to 2.7.0 Beta

I misunderstood the OP and got the version wrong. The OP experienced this problem when upgrading from 2.6.3 to 2.7.0-0.5.beta.

Actions #2

Updated by mhrivnak about 8 years ago

  • Severity changed from 2. Medium to 3. High
  • Platform Release set to 2.7.0
  • Triaged changed from No to Yes
Actions #3

Updated by amacdona@redhat.com about 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to amacdona@redhat.com
Actions #4

Updated by ipanova@redhat.com about 8 years ago

today i also saw this issue on 2.7.0.0.5 beta

Here is some more information on the bug that might help https://pulp.plan.io/issues/1267

Added by Austin Macdonald about 8 years ago

Revision 11d4d6b1

ensure datetimes on distributors

closes #1254

Added by Austin Macdonald about 8 years ago

Revision 11d4d6b1

ensure datetimes on distributors

closes #1254

Actions #5

Updated by amacdona@redhat.com about 8 years ago

  • Status changed from ASSIGNED to POST
Actions #6

Updated by Anonymous about 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #7

Updated by dkliban@redhat.com about 8 years ago

  • Has duplicate Issue #1285: pulp nodes: removing everything from a repo on the parent will not publish the repo on the child added
Actions #8

Updated by dkliban@redhat.com almost 8 years ago

  • Status changed from MODIFIED to 5
Actions #9

Updated by amacdona@redhat.com almost 8 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

Added by mhrivnak almost 8 years ago

Revision e369bc00

adding UTCDateTimeField, which always returns datetimes with timezone UTC

re #1254 re #1267

https://www.redhat.com/archives/pulp-list/2015-November/msg00044.html

Added by mhrivnak almost 8 years ago

Revision e369bc00

adding UTCDateTimeField, which always returns datetimes with timezone UTC

re #1254 re #1267

https://www.redhat.com/archives/pulp-list/2015-November/msg00044.html

Actions #10

Updated by bmbouter over 7 years ago

  • Has duplicate Issue #1267: Re-publish fails if content of the repo changes added
Actions #11

Updated by bmbouter over 4 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF