https://pulp.plan.io/https://pulp.plan.io/favicon.ico2021-11-02T19:35:41ZPulpRPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=769522021-11-02T19:35:41Zwibbit
<ul></ul><p>For reference this RPM is 1.5GB in size.</p> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=770792021-11-11T15:29:58Zttereshcttereshc@redhat.com
<ul><li><strong>Project</strong> changed from <i>Pulp</i> to <i>RPM Support</i></li><li><strong>Description</strong> updated (<a title="View differences" href="/journals/77079/diff?detail_id=77429">diff</a>)</li></ul> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=770802021-11-11T18:29:00Zttereshcttereshc@redhat.com
<ul></ul><p>Pulp needs to show the real issue or at least log the traceback and not hide the root cause.</p>
<p>In the meantime, you can patch your setup to see the full traceback by removing try-except block :</p>
<pre><code class="diff syntaxhl" data-language="diff"><span class="gh">diff --git a/pulp_rpm/app/serializers/package.py b/pulp_rpm/app/serializers/package.py
index 3d7660f7..b6628da2 100644
</span><span class="gd">--- a/pulp_rpm/app/serializers/package.py
</span><span class="gi">+++ b/pulp_rpm/app/serializers/package.py
</span><span class="p">@@ -234,11 +234,7 @@</span> class PackageSerializer(SingleArtifactContentUploadSerializer, ContentChecksumSe
"""
data = super().deferred_validate(data)
# export META from rpm and prepare dict as saveable format
<span class="gd">- try:
- new_pkg = _prepare_package(data["artifact"], data["relative_path"])
- except OSError:
- raise NotAcceptable(detail="RPM file cannot be parsed for metadata.")
-
</span><span class="gi">+ new_pkg = _prepare_package(data["artifact"], data["relative_path"])
</span> attrs = {key: new_pkg[key] for key in Package.natural_key_fields()}
package = Package.objects.filter(**attrs)
</code></pre> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=771112021-11-15T13:28:47Zttereshcttereshc@redhat.com
<ul></ul><p>The issue was running out of disc space but it is unexpected.
The suspicion is that the /tmp is used instead of the worker working directory.</p>
<p>Please give this patch a try</p>
<pre><code class="diff syntaxhl" data-language="diff"><span class="gh">diff --git a/pulp_rpm/app/shared_utils.py b/pulp_rpm/app/shared_utils.py
index 8771c1de..fc52aae1 100644
</span><span class="gd">--- a/pulp_rpm/app/shared_utils.py
</span><span class="gi">+++ b/pulp_rpm/app/shared_utils.py
</span><span class="p">@@ -23,7 +23,7 @@</span> def _prepare_package(artifact, filename):
filename: name of file uploaded by user
"""
artifact_file = storage.open(artifact.file.name)
<span class="gd">- with tempfile.NamedTemporaryFile("wb", suffix=filename) as temp_file:
</span><span class="gi">+ with tempfile.NamedTemporaryFile("wb", dir=".", suffix=filename) as temp_file:
</span> shutil.copyfileobj(artifact_file, temp_file)
temp_file.flush()
cr_pkginfo = createrepo_c.package_from_rpm(temp_file.name)
</code></pre> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=771122021-11-15T13:41:54Zttereshcttereshc@redhat.com
<ul><li><strong>Status</strong> changed from <i>NEW</i> to <i>ASSIGNED</i></li><li><strong>Assignee</strong> set to <i>ttereshc</i></li><li><strong>Sprint</strong> set to <i>Sprint 109</i></li></ul> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=771132021-11-15T13:42:12Zwibbit
<ul></ul><p>I can confirm that this was the issue, and by including the dir="." allowed the package to get uploaded and the rest of the process to complete as expected.</p> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=771152021-11-15T18:11:09Zpulpbot
<ul><li><strong>Status</strong> changed from <i>ASSIGNED</i> to <i>POST</i></li></ul><p>PR: <a href="https://github.com/pulp/pulp_rpm/pull/2178" class="external">https://github.com/pulp/pulp_rpm/pull/2178</a></p> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=771182021-11-15T19:13:58Zttereshcttereshc@redhat.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-12 priority-6 priority-default closed" href="/issues/9569">Task #9569</a>: Eliminate all instances when Pulp writes to /tmp and always use the worker working directory</i> added</li></ul> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=773102021-11-19T20:40:16Zrchan
<ul><li><strong>Sprint</strong> changed from <i>Sprint 109</i> to <i>Sprint 110</i></li></ul> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=773432021-11-23T15:11:45Zttereshcttereshc@redhat.com
<ul><li><strong>Status</strong> changed from <i>POST</i> to <i>MODIFIED</i></li></ul><p>Applied in changeset <a class="changeset" title="Ensure that /tmp is not used but the current worker working directory. Also log the real traceba..." href="https://pulp.plan.io/projects/pulp_rpm/repository/9/revisions/fdcc1b4bb05c94829d17a9e8c43250bea76bddf2">fdcc1b4bb05c94829d17a9e8c43250bea76bddf2</a>.</p> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=773442021-11-23T15:12:09Zdalleydalley@redhat.com
<ul><li><strong>Sprint/Milestone</strong> set to <i>3.17.0</i></li></ul> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=777022021-12-10T00:04:00Zdalleydalley@redhat.com
<ul><li><strong>Copied to</strong> <i><a class="issue tracker-7 status-11 priority-6 priority-default closed" href="/issues/9629">Backport #9629</a>: Backport #9551 "Error passing upload RPM" to 3.16.2</i> added</li></ul> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=777052021-12-10T00:08:05Zdalleydalley@redhat.com
<ul><li><strong>Copied to</strong> <i><a class="issue tracker-7 status-11 priority-6 priority-default closed" href="/issues/9630">Backport #9630</a>: Backport #9551 "Error passing upload RPM" to 3.14.9</i> added</li></ul> RPM Support - Issue #9551: Error passing upload RPMhttps://pulp.plan.io/issues/9551?journal_id=781502021-12-22T16:20:01Zfao89
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/78150/diff?detail_id=78818">diff</a>)</li><li><strong>Status</strong> changed from <i>MODIFIED</i> to <i>CLOSED - DUPLICATE</i></li></ul>