Project

Profile

Help

Issue #1901

Fix error handling during the erratum update

Added by ttereshc over 4 years ago. Updated 3 months 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 
photoadking.jpg (11.7 KB) photoadking.jpg Anonymous, 06/03/2020 07:42 AM
250

Associated revisions

Revision d82c5f77 View on GitHub
Added by ttereshc over 4 years ago

Fix error handling for errata update

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

History

#1 Updated by ttereshc over 4 years ago

  • Description updated (diff)

#2 Updated by dkliban@redhat.com over 4 years ago

  • Triaged changed from No to Yes

#3 Updated by mhrivnak over 4 years ago

Raising a PulpCodedException would likely cause the error message to be displayed to the user instead of "Importer indicated a failed response".

#4 Updated by ttereshc over 4 years ago

  • Assignee set to ttereshc

#5 Updated by ttereshc over 4 years ago

  • Status changed from NEW to ASSIGNED

#6 Updated by ttereshc over 4 years ago

  • Description updated (diff)
  • Status changed from ASSIGNED to POST
  • Platform Release set to 2.8.4
  • Tags Easy Fix added

#7 Updated by ttereshc over 4 years ago

  • Sprint/Milestone set to 20

#8 Updated by semyers over 4 years ago

  • Platform Release changed from 2.8.4 to 2.8.5

#9 Updated by ttereshc over 4 years ago

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

#10 Updated by semyers over 4 years ago

  • Status changed from MODIFIED to 5

#11 Updated by semyers over 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#12 Updated by bmbouter over 2 years ago

  • Sprint set to Sprint 2

#13 Updated by bmbouter over 2 years ago

  • Sprint/Milestone deleted (20)

#14 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

#15 Updated by marywagner 11 months ago

  • File 71738442_1329442000550340_4121201676642156544_n.png added

#16 Updated by ttereshc 5 months ago

  • File deleted (71738442_1329442000550340_4121201676642156544_n.png)

#17 Updated by Anonymous 5 months ago

250

Please register to edit this issue

Also available in: Atom PDF