Issue #1901
closedFix error handling during the erratum update
Description
If it is not possible to update the erratum due to the bad date/time format, make error message more descriptive and do not show any traceback.
Try to update all errata, then list all failed ones in the error message.
To reproduce:
- create and sync repo https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm/
- create and sync repo which contains at least one erratum with the same id and with the bad date/time format in the `updated` field.
[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
Files
Updated by mhrivnak over 8 years ago
Raising a PulpCodedException would likely cause the error message to be displayed to the user instead of "Importer indicated a failed response".
Added by ttereshc over 8 years ago
Updated by ttereshc over 8 years ago
- Description updated (diff)
- Status changed from ASSIGNED to POST
- Platform Release set to 2.8.4
- Tags Easy Fix added
Updated by semyers over 8 years ago
- Platform Release changed from 2.8.4 to 2.8.5
Updated by ttereshc over 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset d82c5f77d8136dd92fc0a6905fe6a1d80dbece6d.
Updated by semyers over 8 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Updated by marywagner about 5 years ago
- File 71738442_1329442000550340_4121201676642156544_n.png added
Updated by ttereshc over 4 years ago
- File deleted (
71738442_1329442000550340_4121201676642156544_n.png)
Updated by Anonymous over 4 years ago
- File photoadking.jpg photoadking.jpg added
Updated by IPTVSMARTERPRO about 3 years ago
If you want unlimited entertainment so you are at right place. We have so much for your entertainment. IPTV SMARTERS PRO is a an platform which provide you a lot of fun .IPTV SMARTERS PRO is a best entertainment platform. IPTV SMARTERS PRO is provide you different packages. Please Visit Our site for more. Thank You
Updated by cogat67967@videour.com almost 3 years ago
Long haired Dalmatians Pets are most demanding pet all over the world . Long haired Dalmatians Love to play and Run. Long haired Dalmatians available at over online store . Please Visit our website for more details.
Fix error handling for errata update
closes #1901 https://pulp.plan.io/issues/1901