Project

Profile

Help

Issue #1747

closed

Import upload task has unexpected/missing information on error

Added by daviddavis about 8 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
2.8.3
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

When I upload a text file to an rpm repo, I get the following task information. It doesn't conform to what we expect (we expect the state to be "error" and either error or exception to be populated). Also, the error it does report isn't that helpful ("unexpected error occurred importing uploaded file").

 {
  "exception": null, 
  "task_type": "pulp.server.managers.content.upload.import_uploaded_unit", 
  "_href": "/pulp/api/v2/tasks/74df89f9-e7f9-4a85-82d9-e06384057023/", 
  "task_id": "74df89f9-e7f9-4a85-82d9-e06384057023", 
  "tags": [
    "pulp:repository:Default_Organization-Test-foo", 
    "pulp:action:import_upload"
  ], 
  "finish_time": "2016-03-04T19:45:13Z", 
  "_ns": "task_status", 
  "start_time": "2016-03-04T19:45:13Z", 
  "traceback": null, 
  "spawned_tasks": [], 
  "progress_report": {}, 
  "queue": "reserved_resource_worker-0@centos7-devel.example.com.dq", 
  "state": "finished", 
  "worker_name": "reserved_resource_worker-0@centos7-devel.example.com", 
  "result": {
    "details": {
      "errors": [
        "unexpected error occurred importing uploaded file"
      ]
    }, 
    "success_flag": false, 
    "summary": ""
  }, 
  "error": null, 
  "_id": {
    "$oid": "56d9e5c9f2da5c2f93d8391d"
  }, 
  "id": "56d9e5c9f2da5c2f93d8391d"
}

Related issues

Related to Pulp - Issue #913: CLI shows a puppet upload is successful even though server side has an exceptionCLOSED - DUPLICATEttereshcActions
Has duplicate Puppet Support - Issue #1189: Puppet module upload failure error reporting is inconsistent with other tasksCLOSED - DUPLICATEActions
Actions #1

Updated by daviddavis about 8 years ago

pulp-admin also seems to think the task was successful (I'm guessing because of the state):

$ pulp-admin tasks list

Operations:  import_upload
Resources:   Default_Organization-Test-foo (repository)
State:       Successful
Start Time:  2016-03-04T19:45:13Z
Finish Time: 2016-03-04T19:45:13Z
Task Id:     74df89f9-e7f9-4a85-82d9-e06384057023
Actions #2

Updated by daviddavis about 8 years ago

  • Subject changed from Import upload task has unexpected/missing information to Import upload task has unexpected/missing information on error
Actions #3

Updated by ipanova@redhat.com about 8 years ago

  • Related to Issue #913: CLI shows a puppet upload is successful even though server side has an exception added
Actions #4

Updated by ipanova@redhat.com about 8 years ago

We have to properly raise the exception, as in the logs it does complain that package header is not readable:

Mar  7 14:59:39 ina pulp: celery.worker.strategy:INFO: Received task: pulp.server.managers.content.upload.import_uploaded_unit[491aa585-007c-4cbf-9e5e-3b658df3e3df]
Mar  7 14:59:39 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (29432-76128) Error extracting RPM metadata for [/var/lib/pulp/uploads/3557b2e6-d661-4691-95c8-c96398df8daf]
Mar  7 14:59:39 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (29432-76128) Traceback (most recent call last):
Mar  7 14:59:39 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (29432-76128)   File "/home/ipanova/pulp_development/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/upload.py", line 3
39, in _handle_package
Mar  7 14:59:39 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (29432-76128)     :raises PulpCodedException PLP1013: if the checksum value from the user does not validate
Mar  7 14:59:39 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (29432-76128)   File "/home/ipanova/pulp_development/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/upload.py", line 4
87, in _extract_rpm_data
Mar  7 14:59:39 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (29432-76128)     ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
Mar  7 14:59:39 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (29432-76128)   File "/usr/lib64/python2.7/site-packages/rpm/transaction.py", line 170, in hdrFromFdno
Mar  7 14:59:39 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (29432-76128)     raise rpm.error("error reading package header")
Mar  7 14:59:39 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (29432-76128) error: error reading package header
Mar  7 14:59:39 ina pulp: pulp_rpm.plugins.importers.yum.upload:ERROR: (29432-76128) unexpected error occurred importing uploaded file

In addition to that we have to fix the task state to be in state 'error' and not 'finished'

Actions #5

Updated by ipanova@redhat.com about 8 years ago

In addition to that i think we have a regression https://bugzilla.redhat.com/show_bug.cgi?id=1096883#c6

Actions #6

Updated by mhrivnak about 8 years ago

  • Priority changed from Normal to High
  • Platform Release set to 2.8.1
  • Triaged changed from No to Yes
Actions #7

Updated by ttereshc about 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc
Actions #8

Updated by ttereshc about 8 years ago

  • Status changed from ASSIGNED to POST
Actions #9

Updated by semyers about 8 years ago

  • Platform Release changed from 2.8.1 to 2.8.2

Added by ttereshc about 8 years ago

Revision fde26257 | View on GitHub

Add error message to the upload report

re #1747 https://pulp.plan.io/issues/1747

Actions #10

Updated by semyers about 8 years ago

  • Platform Release changed from 2.8.2 to 2.8.3

Added by ttereshc about 8 years ago

Revision 541e3ce7 | View on GitHub

Fix return value of upload_unit() to be consistent with plugin API

re #1747 https://pulp.plan.io/issues/1747

Added by ttereshc about 8 years ago

Revision 657b7687 | View on GitHub

Fix return value of upload_unit() to be consistent with plugin API

re #1747 https://pulp.plan.io/issues/1747

Added by ttereshc about 8 years ago

Revision 657b7687 | View on GitHub

Fix return value of upload_unit() to be consistent with plugin API

re #1747 https://pulp.plan.io/issues/1747

Added by ttereshc about 8 years ago

Revision 657b7687 | View on GitHub

Fix return value of upload_unit() to be consistent with plugin API

re #1747 https://pulp.plan.io/issues/1747

Added by ttereshc about 8 years ago

Revision 657b7687 | View on GitHub

Fix return value of upload_unit() to be consistent with plugin API

re #1747 https://pulp.plan.io/issues/1747

Actions #14

Updated by mhrivnak almost 8 years ago

  • Has duplicate Issue #1189: Puppet module upload failure error reporting is inconsistent with other tasks added
Actions #15

Updated by semyers almost 8 years ago

  • Platform Release changed from 2.8.3 to 2.8.4

Added by ttereshc almost 8 years ago

Revision 44802e51 | View on GitHub

Raise an exception if upload report indicates failure

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

Added by ttereshc almost 8 years ago

Revision 44802e51 | View on GitHub

Raise an exception if upload report indicates failure

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

Actions #16

Updated by ttereshc almost 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #18

Updated by semyers almost 8 years ago

  • Platform Release changed from 2.8.4 to 2.8.3
Actions #19

Updated by semyers almost 8 years ago

  • Status changed from MODIFIED to 5
Actions #20

Updated by pthomas@redhat.com almost 8 years ago

  • Status changed from 5 to 6

verified
[root@ibm-x3550m3-09 ~]# rpm -qa pulp-server
pulp-server-2.8.3-0.2.beta.el7.noarch
[root@ibm-x3550m3-09 ~]#

[root@ibm-x3550m3-09 ~]# pulp-admin rpm repo uploads rpm --repo-id upload -f test.txt  -v
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: test.txt
... completed

Files to be uploaded:
  test.txt

Creating upload requests on the server...
[==================================================] 100%
Initializing: test.txt
... completed

Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
canceled entirely using the cancel command.

Uploading: test.txt
[==================================================] 100%
19/19 bytes
... completed

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

[\]
Running...

Task Failed

The importer yum_importer indicated a failed response when uploading rpm unit to
repository upload.

Deleting the upload request...
... completed

[root@ibm-x3550m3-09 ~]# pulp-admin tasks details --task-id 79babe70-0f64-4a42-8c32-204437cad540
+----------------------------------------------------------------------+
                              Task Details
+----------------------------------------------------------------------+

Operations:       import_upload
Resources:        upload (repository)
State:            Failed
Start Time:       2016-05-11T15:36:55Z
Finish Time:      2016-05-11T15:36:55Z
Result:           N/A
Task Id:          79babe70-0f64-4a42-8c32-204437cad540
Progress Report:  
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/managers/content
                  /upload.py", line 223, in import_uploaded_unit    
                  unit_type=unit_type_id, summary=result['summary'],
                  details=result['details'] PulpCodedException: The importer
                  yum_importer indicated a failed response when uploading rpm
                  unit to repository upload. 
Actions #21

Updated by semyers almost 8 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #24

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added
Actions #25

Updated by bmbouter almost 4 years ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Also available in: Atom PDF