-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error passing upload RPM #2317
Comments
From: wibbit (wibbit) For reference this RPM is 1.5GB in size. |
From: @goosemania (ttereshc) Pulp needs to show the real issue or at least log the traceback and not hide the root cause. In the meantime, you can patch your setup to see the full traceback by removing try-except block : diff --git a/pulp_rpm/app/serializers/package.py b/pulp_rpm/app/serializers/package.py
index 3d7660f7..b6628da2 100644
--- a/pulp_rpm/app/serializers/package.py
+++ b/pulp_rpm/app/serializers/package.py
@@ -234,11 +234,7 @@ class PackageSerializer(SingleArtifactContentUploadSerializer, ContentChecksumSe
"""
data = super().deferred_validate(data)
# export META from rpm and prepare dict as saveable format
- try:
- new_pkg = _prepare_package(data["artifact"], data["relative_path"])
- except OSError:
- raise NotAcceptable(detail="RPM file cannot be parsed for metadata.")
-
+ new_pkg = _prepare_package(data["artifact"], data["relative_path"])
attrs = {key: new_pkg[key] for key in Package.natural_key_fields()}
package = Package.objects.filter(**attrs)
|
From: @goosemania (ttereshc) The issue was running out of disc space but it is unexpected. Please give this patch a try diff --git a/pulp_rpm/app/shared_utils.py b/pulp_rpm/app/shared_utils.py
index 8771c1de..fc52aae1 100644
--- a/pulp_rpm/app/shared_utils.py
+++ b/pulp_rpm/app/shared_utils.py
@@ -23,7 +23,7 @@ def _prepare_package(artifact, filename):
filename: name of file uploaded by user
"""
artifact_file = storage.open(artifact.file.name)
- with tempfile.NamedTemporaryFile("wb", suffix=filename) as temp_file:
+ with tempfile.NamedTemporaryFile("wb", dir=".", suffix=filename) as temp_file:
shutil.copyfileobj(artifact_file, temp_file)
temp_file.flush()
cr_pkginfo = createrepo_c.package_from_rpm(temp_file.name)
|
From: wibbit (wibbit) 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. |
From: pulpbot (pulpbot) PR: #2178 |
From: @goosemania (ttereshc) Applied in changeset commit:fdcc1b4bb05c94829d17a9e8c43250bea76bddf2. |
Author: wibbit (wibbit)
Redmine Issue: 9551, https://pulp.plan.io/issues/9551
After uploading an RPM (rpm -qp --all .rpm works fine on the source RPM), I'm greeted with the following error.
The text was updated successfully, but these errors were encountered: