Project

Profile

Help

Issue #1747

Import upload task has unexpected/missing information on error

Added by daviddavis over 4 years ago. Updated 5 months 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 - DUPLICATE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Has duplicate Puppet Support - Issue #1189: Puppet module upload failure error reporting is inconsistent with other tasksCLOSED - DUPLICATE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

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

Add error message to the upload report

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

Revision 541e3ce7 View on GitHub
Added by ttereshc over 4 years ago

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

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

Revision 657b7687 View on GitHub
Added by ttereshc over 4 years ago

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

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

Revision 657b7687 View on GitHub
Added by ttereshc over 4 years ago

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

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

Revision 657b7687 View on GitHub
Added by ttereshc over 4 years ago

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

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

Revision 657b7687 View on GitHub
Added by ttereshc over 4 years ago

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

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

Revision 44802e51 View on GitHub
Added by ttereshc over 4 years ago

Raise an exception if upload report indicates failure

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

Revision 44802e51 View on GitHub
Added by ttereshc over 4 years ago

Raise an exception if upload report indicates failure

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

History

#1 Updated by daviddavis over 4 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

#2 Updated by daviddavis over 4 years ago

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

#3 Updated by ipanova@redhat.com over 4 years ago

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

#4 Updated by ipanova@redhat.com over 4 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'

#5 Updated by ipanova@redhat.com over 4 years ago

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

#6 Updated by mhrivnak over 4 years ago

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

#7 Updated by ttereshc over 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc

#8 Updated by ttereshc over 4 years ago

  • Status changed from ASSIGNED to POST

#9 Updated by semyers over 4 years ago

  • Platform Release changed from 2.8.1 to 2.8.2

#10 Updated by semyers over 4 years ago

  • Platform Release changed from 2.8.2 to 2.8.3

#14 Updated by mhrivnak over 4 years ago

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

#15 Updated by semyers over 4 years ago

  • Platform Release changed from 2.8.3 to 2.8.4

#16 Updated by ttereshc over 4 years ago

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

#18 Updated by semyers over 4 years ago

  • Platform Release changed from 2.8.4 to 2.8.3

#19 Updated by semyers over 4 years ago

  • Status changed from MODIFIED to 5

#20 Updated by pthomas@redhat.com over 4 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. 

#21 Updated by semyers over 4 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#24 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

#25 Updated by bmbouter 5 months ago

  • Category deleted (14)

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

Please register to edit this issue

Also available in: Atom PDF