Project

Profile

Help

Issue #2240

closed

Can't export rpm repo

Added by cristi.falcas@gmail.com over 5 years ago. Updated about 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.9.2
Platform Release:
2.12.2
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 17
Quarter:

Description

When we try to export an rpm repo as iso, we get the following error:

        # pulp-admin rpm repo export run --repo-id=company_puppet_el6
        +----------------------------------------------------------------------+
                    Publishing Repository [company_puppet_el6]
        +----------------------------------------------------------------------+

        This command may be exited via ctrl+c without affecting the request.

        Task Failed

        can't compare datetime.datetime to NoneType

Those are the logs from journalctl:

sep 08 03:55:55 v-so-repo-01.company.net pulp[949]: pulp.server.async.tasks:INFO: Task failed : [fe4745a6-a772-47dd-9de9-b4611e7135e3]
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296) Task pulp.server.managers.repo.publish.publish[fe4745a6-a772-47dd-9de9-b4611e7135e3] raised unexpected: TypeError("can't compare datetime.datetime to NoneType",)
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296) Traceback (most recent call last):
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)     R = retval = fun(*args, **kwargs)
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 484, in __call__
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)     return super(Task, self).__call__(*args, **kwargs)
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 103, in __call__
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)     return super(PulpTask, self).__call__(*args, **kwargs)
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)     return self.run(*args, **kwargs)
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)   File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 971, in publish
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)     result = check_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)   File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1008, in check_publish
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296)     dist_updated = dist.last_updated > last_published
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:ERROR: (803-99296) TypeError: can't compare datetime.datetime to NoneType
sep 08 03:55:55 v-so-repo-01.company.net pulp[803]: celery.worker.job:INFO: Task pulp.server.async.tasks._release_resource[ec4ba480-0f0a-4c0d-8932-75070be6ce67] succeeded in 0.00981830619276s: None
Actions #1

Updated by cristi.falcas@gmail.com over 5 years ago

It seems that the error is thrown only for repos without a feed.

We have some local repos managed internally, which don't have a feed url. For all of those, the export fails.

Actions #2

Updated by bmbouter over 5 years ago

I had known about the inability to sync if a feed is not specified, but I did not know about the inability to export. The former I can understand but the latter (this bug) seems like a problem.

Actions #3

Updated by amacdona@redhat.com over 5 years ago

  • Priority changed from Normal to High
  • Severity changed from 2. Medium to 3. High
  • Triaged changed from No to Yes
Actions #4

Updated by ipanova@redhat.com over 5 years ago

I tested on 2.9.3 and was not able to reproduce.

1 created an rpm repo
2 uploaded some content
3 triggered export
4 export succeeded

Looking at the code and your traceback, is seems like dist.last_updated is none, which cannot be true unless you did not forget to run migrations. Because there was a separate migration written to populate last_updated field. Can you confirm that after running the migrations you still have the issue?

Actions #5

Updated by mihai.ibanescu@gmail.com over 5 years ago

I am occasionally seeing the same exact traceback (one line off) on pulp 2.10.3.

Under certain circumstances, which I cannot explain, distributors end up having last_publish set, but last_updated unset:

  Last Publish:         2017-01-04T11:34:41Z
  Last Updated:         None

Subsequent publishes fail with:

Task Failed

can't compare datetime.datetime to NoneType

Full traceback:

Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912) Task pulp.server.managers.repo.publish.publish[fbcf3910-2ddb-4699-b432-6709c35b9936] raised unexpected: TypeError("can't compare datetime.datetime to NoneType",)
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912) Traceback (most recent call last):
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)     R = retval = fun(*args, **kwargs)
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 488, in __call__
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)     return super(Task, self).__call__(*args, **kwargs)
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 103, in __call__
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)     return super(PulpTask, self).__call__(*args, **kwargs)
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)     return self.run(*args, **kwargs)
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)   File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 971, in publish
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)     result = check_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)   File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1007, in check_publish
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912)     dist_updated = dist.last_updated > last_published
Jan 04 17:33:38 repulpmaster03 pulp[18362]: celery.worker.job:ERROR: (18362-82912) TypeError: can't compare datetime.datetime to NoneType

Added by ttereshc about 5 years ago

Revision 2a012b1d

Set last_updated for distributor if it is absent or None

closes #2240 https://pulp.plan.io/issues/2240

Added by ttereshc about 5 years ago

Revision 2a012b1d

Set last_updated for distributor if it is absent or None

closes #2240 https://pulp.plan.io/issues/2240

Actions #7

Updated by ttereshc about 5 years ago

  • Status changed from NEW to POST
  • Assignee set to ttereshc
  • Sprint/Milestone set to 36
Actions #8

Updated by ttereshc about 5 years ago

  • Status changed from POST to MODIFIED
Actions #9

Updated by bizhang about 5 years ago

  • Platform Release set to 2.12.2
Actions #10

Updated by bizhang about 5 years ago

  • Status changed from MODIFIED to 5
Actions #11

Updated by bizhang about 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #12

Updated by bmbouter about 4 years ago

  • Sprint set to Sprint 17
Actions #13

Updated by bmbouter about 4 years ago

  • Sprint/Milestone deleted (36)
Actions #14

Updated by bmbouter about 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF