Project

Profile

Help

Issue #1901

closed

Fix error handling during the erratum update

Added by ttereshc over 8 years ago. Updated almost 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.8.5
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Sprint 2
Quarter:

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

photoadking.jpg (11.7 KB) photoadking.jpg Anonymous, 06/03/2020 07:42 AM

Also available in: Atom PDF