Project

Profile

Help

Issue #1254

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

Added by rbarlow about 6 years ago. Updated over 2 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 - DUPLICATE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Has duplicate Pulp - Issue #1267: Re-publish fails if content of the repo changesCLOSED - DUPLICATE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 11d4d6b1 View on GitHub
Added by Austin Macdonald about 6 years ago

ensure datetimes on distributors

closes #1254

Revision 11d4d6b1 View on GitHub
Added by Austin Macdonald about 6 years ago

ensure datetimes on distributors

closes #1254

Revision e369bc00 View on GitHub
Added by mhrivnak almost 6 years ago

adding UTCDateTimeField, which always returns datetimes with timezone UTC

re #1254 re #1267

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

Revision e369bc00 View on GitHub
Added by mhrivnak almost 6 years ago

adding UTCDateTimeField, which always returns datetimes with timezone UTC

re #1254 re #1267

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

History

#1 Updated by rbarlow about 6 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.

#2 Updated by mhrivnak about 6 years ago

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

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

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

#4 Updated by ipanova@redhat.com about 6 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

#5 Updated by amacdona@redhat.com about 6 years ago

  • Status changed from ASSIGNED to POST

#6 Updated by Anonymous almost 6 years ago

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

#7 Updated by dkliban@redhat.com almost 6 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

#8 Updated by dkliban@redhat.com almost 6 years ago

  • Status changed from MODIFIED to 5

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

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#10 Updated by bmbouter over 5 years ago

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

#11 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF