https://pulp.plan.io/https://pulp.plan.io/favicon.ico2019-03-13T11:24:17ZPulpRPM Support - Issue #4537: Pulp returns 200 when it fails to create rpm contenthttps://pulp.plan.io/issues/4537?journal_id=347412019-03-13T11:24:17Zbherring
<ul><li><strong>Copied from</strong> <i><a class="issue tracker-1 status-11 priority-6 priority-default closed" href="/issues/4471">Issue #4471</a>: Pulp returns 200 when it fails to create rpm content</i> added</li></ul> RPM Support - Issue #4537: Pulp returns 200 when it fails to create rpm contenthttps://pulp.plan.io/issues/4537?journal_id=419862019-04-26T20:31:29Zbmbouterbmbouter@redhat.com
<ul><li><strong>Tags</strong> deleted (<del><i>Pulp 3</i></del>)</li></ul> RPM Support - Issue #4537: Pulp returns 200 when it fails to create rpm contenthttps://pulp.plan.io/issues/4537?journal_id=656552020-12-10T16:25:02Zdalleydalley@redhat.com
<ul><li><strong>Tracker</strong> changed from <i>Test</i> to <i>Issue</i></li><li><strong>Severity</strong> set to <i>2. Medium</i></li><li><strong>Triaged</strong> set to <i>No</i></li><li><strong>Groomed</strong> set to <i>No</i></li><li><strong>Sprint Candidate</strong> set to <i>No</i></li></ul> RPM Support - Issue #4537: Pulp returns 200 when it fails to create rpm contenthttps://pulp.plan.io/issues/4537?journal_id=656812020-12-10T18:56:05Zggainey
<ul><li><strong>Status</strong> changed from <i>NEW</i> to <i>CLOSED - WONTFIX</i></li></ul><p>I think things have changed since this was opened. <code>POST /pulp/api/v3/content/rpm/packages/</code> now returns a task-href; following the scenario above now looks like the below, which is Working As Designed I believe. Closing.</p>
<pre><code>(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ echo "blah" > foo-4.1-1.noarch.rpm
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ http --form POST :/pulp/api/v3/artifacts/ file@./foo-4.1-1.noarch.rpm
HTTP/1.1 201 Created
{
"file": "artifact/41/af286dc0b172ed2f1ca934fd2278de4a1192302ffa07087cea2682e7d372e3",
...
"pulp_href": "/pulp/api/v3/artifacts/117fa591-fcc9-431e-969c-db9fe9b035c8/",
...
}
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ http POST :/pulp/api/v3/content/rpm/packages/ relative_path=foo.rpm artifact="/pulp/api/v3/artifacts/117fa591-fcc9-431e-969c-db9fe9b035c8/"
HTTP/1.1 202 Accepted
{
"task": "/pulp/api/v3/tasks/9c406b26-19dd-4201-8980-0fa2c66e5691/"
}
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ http :/pulp/api/v3/tasks/9c406b26-19dd-4201-8980-0fa2c66e5691/
HTTP/1.1 200 OK
{
"child_tasks": [],
"created_resources": [],
"error": {
"description": "RPM file cannot be parsed for metadata.",
"traceback": " File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py\", line 975, in perform_job\n rv = job.perform()\n File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 696, in perform\n self._result = self._execute()\n File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 719, in _execute\n return self.func(*self.args, **self.kwargs)\n File \"/home/vagrant/devel/pulpcore/pulpcore/app/tasks/base.py\", line 34, in general_create\n serializer.is_valid(raise_exception=True)\n File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py\", line 220, in is_valid\n self._validated_data = self.run_validation(self.initial_data)\n File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py\", line 422, in run_validation\n value = self.validate(value)\n File \"/home/vagrant/devel/pulpcore/pulpcore/plugin/serializers/content.py\", line 104, in validate\n data = self.deferred_validate(data)\n File \"/home/vagrant/devel/pulp_rpm/pulp_rpm/app/serializers/package.py\", line 240, in deferred_validate\n raise NotAcceptable(detail=\"RPM file cannot be parsed for metadata.\")\n"
},
"finished_at": "2020-12-10T18:17:35.345693Z",
"logging_cid": "68e10e3bbc3a4d86b57c4472b8a80461",
"name": "pulpcore.app.tasks.base.general_create",
"parent_task": null,
"progress_reports": [],
"pulp_created": "2020-12-10T18:17:35.013049Z",
"pulp_href": "/pulp/api/v3/tasks/9c406b26-19dd-4201-8980-0fa2c66e5691/",
"reserved_resources_record": [
"/pulp/api/v3/artifacts/117fa591-fcc9-431e-969c-db9fe9b035c8/"
],
"started_at": "2020-12-10T18:17:35.167444Z",
"state": "failed",
"task_group": null,
"worker": "/pulp/api/v3/workers/afa23f04-3490-4c49-a375-fed6153cdacb/"
}
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$
</code></pre>