Issue #1899
closedRepo sync failure with "time data '' does not match format '%Y-%m-%d %H:%M:%S'"
Description
Repository sync failing for the new rpm repo in fixture
[jenkins@rhel7-vanilla-np-qeos-107173 ~]$ pulp-admin rpm repo create --repo-id zoo --feed https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm/
Successfully created repository [zoo]
[jenkins@rhel7-vanilla-np-qeos-107173 ~]$ pulp-admin rpm repo sync run --repo-id zoo
+----------------------------------------------------------------------+
Synchronizing Repository [zoo]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Downloading metadata...
[|]
... completed
Downloading repository content...
[\]
[==================================================] 100%
RPMs: 0/0 items
Delta RPMs: 0/0 items
... completed
Downloading distribution files...
[==================================================] 100%
Distributions: 0/0 items
Task Failed
Importer indicated a failed response
[jenkins@rhel7-vanilla-np-qeos-107173 ~]$ pulp-admin tasks details --task-id c8dfce8e-a626-4c23-8517-e7bc7e05f2dc
+----------------------------------------------------------------------+
Task Details
+----------------------------------------------------------------------+
Operations: sync
Resources: zoo (repository)
State: Failed
Start Time: 2016-05-05T19:32:08Z
Finish Time: 2016-05-05T19:32:15Z
Result: N/A
Task Id: c8dfce8e-a626-4c23-8517-e7bc7e05f2dc
Progress Report:
Yum Importer:
Comps:
State: NOT_STARTED
Content:
Details:
Drpm Done: 0
Drpm Total: 0
Rpm Done: 0
Rpm Total: 0
Error Details:
Items Left: 0
Items Total: 0
Size Left: 0
Size Total: 0
State: FINISHED
Distribution:
Error Details:
Items Left: 0
Items Total: 0
State: FINISHED
Errata:
Error: ("time data '' does not match format '%Y-%m-%d %H:%M:%S'",
u'Unknown format: unable to convert "" to the datetime object',
u'Fail to update the existing erratum RHEA-2012:0055: Unable to
parse the `updated` field')
State: FAILED
Metadata:
State: FINISHED
Purge Duplicates:
State: NOT_STARTED
Traceback: Traceback (most recent call last): File
"/usr/lib/python2.7/site-packages/celery/app/trace.py", line
240, in trace_task R = retval = fun(*args, **kwargs)
File
"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py",
line 473, in __call__ return super(Task,
self).__call__(*args, **kwargs) File
"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py",
line 103, in __call__ return super(PulpTask,
self).__call__(*args, **kwargs) File
"/usr/lib/python2.7/site-packages/celery/app/trace.py", line
437, in __protected_call__ return self.run(*args,
**kwargs) File
"/usr/lib/python2.7/site-packages/pulp/server/controllers/repo
sitory.py", line 810, in sync raise
pulp_exceptions.PulpExecutionException(_('Importer indicated a
failed response')) PulpExecutionException: Importer indicated
a failed response
May 05 15:32:14 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: requests.packages.urllib3.connectionpool:INFO: Starting new HTTPS connection (1): repos.fedorapeople.org
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) ("time data '' does not match format '%Y-%m-%d %H:%M:%S'", u'Unknown format: unable to convert "" to the datetime object', u'Fail to update the existing erratum RHEA-2012:0055: Unable to parse the `updated` field')
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) Traceback (most recent call last):
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 232, in run
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) self.get_errata(metadata_files)
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 734, in get_errata
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) updateinfo.process_package_element, additive_type=True)
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 825, in save_fileless_units
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) model = self._concatenate_units(existing_unit, model)
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 854, in _concatenate_units
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) existing_unit.merge_errata(new_unit)
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/db/models.py", line 826, in merge_errata
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) if self.update_needed(other):
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/db/models.py", line 848, in update_needed
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) existing_updated_dt = util.errata_format_to_datetime(self.updated, msg=existing_err_msg)
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) File "/usr/lib/python2.7/site-packages/pulp_rpm/yum_plugin/util.py", line 205, in errata_format_to_datetime
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) datetime_obj = datetime.datetime.strptime(datetime_str, strptime_pattern)
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) File "/usr/lib64/python2.7/_strptime.py", line 325, in _strptime
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) (data_string, format))
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp_rpm.plugins.importers.yum.sync:ERROR: (25199-16384) ValueError: ("time data '' does not match format '%%Y-%%m-%%d %%H:%%M:%%S'", u'Unknown format: unable to convert "" to the datetime object', u'Fail to update the existing erratum RHEA-2012:0055: Unable to parse the `updated` field')
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[25199]: pulp.server.async.tasks:INFO: Task failed : [c8dfce8e-a626-4c23-8517-e7bc7e05f2dc]
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) Task pulp.server.managers.repo.sync.sync[c8dfce8e-a626-4c23-8517-e7bc7e05f2dc] raised unexpected: PulpExecutionException('Importer indicated a failed response',)
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) Traceback (most recent call last):
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) R = retval = fun(*args, **kwargs)
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 473, in __call__
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) return super(Task, self).__call__(*args, **kwargs)
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 103, in __call__
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) return super(PulpTask, self).__call__(*args, **kwargs)
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) return self.run(*args, **kwargs)
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 810, in sync
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) raise pulp_exceptions.PulpExecutionException(_('Importer indicated a failed response'))
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:ERROR: (24988-16384) PulpExecutionException: Importer indicated a failed response
May 05 15:32:15 rhel7-vanilla-np-qeos-107173.novalocal pulp[24988]: celery.worker.job:INFO: Task pulp.server.async.tasks._release_resource[0a3e7b92-139c-4cca-a7d6-252050116dfa] succeeded in 0.0127214499953s: None
Updated by ttereshc almost 8 years ago
This error occurs, because you have already had the erratum RHEA-2012:0055 in your database and you are syncing another repo which contains the same erratum.
Pulp tries to update the erratum RHEA-2012:0055 and fails because fixtures repo does not contain `updated` field for errata at all.
PR to fix the fixtures repo: https://github.com/PulpQE/pulp-fixtures/pull/3
Updated by ttereshc almost 8 years ago
- Status changed from NEW to CLOSED - NOTABUG
It is not a bug in Pulp, it was an issue in the demo repository and now it is fixed.
But the error handling should be improved in case erratum `updated` field is malformed and here is an issue to track that https://pulp.plan.io/issues/1901
Updated by dkliban@redhat.com almost 8 years ago
- Status changed from CLOSED - NOTABUG to NEW
I just experienced this bug. Here is the reproduction steps:
pulp-admin -u admin -p admin rpm repo create --repo-id zoo --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
pulp-admin rpm repo sync run --repo-id zoo
pulp-admin rpm repo delete --repo-id zoo
pulp-admin -u admin -p admin rpm repo create --repo-id zoo --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
pulp-admin rpm repo sync run --repo-id zoo
Updated by ttereshc almost 8 years ago
Dennis, this is a wrong repo to test :), there is no `updated` field for errata in it.
The right one is here https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm/
Updated by dkliban@redhat.com almost 8 years ago
- Status changed from NEW to CLOSED - NOTABUG