Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2030715 - hammer content-[import,export] uses /tmp directory for temporary decompression location
Summary: hammer content-[import,export] uses /tmp directory for temporary decompressio...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.10.1
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: 6.11.0
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
: 2042335 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-09 14:57 UTC by Taft Sanders
Modified: 2022-07-05 14:31 UTC (History)
13 users (show)

Fixed In Version: pulpcore-3.16.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2059395 (view as bug list)
Environment:
Last Closed: 2022-07-05 14:31:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pulp pulpcore issues 2247 0 None closed PulpImporter assumes tempfiles can always go to /tmp 2022-03-31 15:03:03 UTC
Pulp Redmine 8610 0 None None None 2021-12-10 14:49:55 UTC
Red Hat Knowledge Base (Solution) 6595581 0 None None None 2021-12-15 19:35:34 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:31:13 UTC

Description Taft Sanders 2021-12-09 14:57:09 UTC
Description of problem:
When importing or exporting content from Satellite using hammer, the python tempfile library that is used is the /tmp folder in most cases. There is no mention that this /tmp directory would need to be of any specific size exporting or importing content into Satellite 6.

Version-Release number of selected component (if applicable):
python3-pulpcore-3.14.9-1.el7pc.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Have a Satellite with a separate /tmp partition from /var/lib/pulp.
2. Sync a bunch of content on the Satellite under immediate sync policy and export it as a library export.
3. Import this into another organization and watch the decompression of the export tarball use the /tmp directory as its decompression folder

Actual results:
/tmp runs out of space in most cases because no recommendation/requirement is mentioned for this process. Also, no option to use as a tempdir is offered with hammer.

Expected results:
1. Set the tempdir location in (https://github.com/pulp/pulpcore/blob/d6f5d00ef47d1cdb00863339336d65f399b59ee7/pulpcore/app/tasks/importer.py#L118) to /var/lib/pulp where the largest available space would possibly be.

or

2. Allow the option to set the tempdir with the hammer content-import command

or

3. Note in the documentation that the /tmp directory will be used as the temporary decompression location for all content-import operations. Please make sure to have the available space on the server as required.

Additional info:
Opening the bugzilla with the source (pulp) to see if this default behavior for using tempfile with no location specified is what is wanted for the default. If not then perhaps having the option with hammer to set an env variable used by python tempfile library (TMPDIR, TEMP, TMP) could be set so that the location for a larger available location can be specified. If not this, then maybe a documentation change to call out /tmp as potentially needing a LOT of available space for this process.

Comment 3 Grant Gainey 2022-01-26 18:53:19 UTC
*** Bug 2042335 has been marked as a duplicate of this bug. ***

Comment 9 Lai 2022-04-18 17:42:47 UTC
Steps to reproduce

1. Change settings for rhel and custom repos to use "Immediate" download policy
2. enable a few rhel repos (ansible + collections)
3. Sync repos
4. Create custom repos
5. sync custom repos
6. create cv and add rhel and custom repos
7. publish cv
8. check /var/lib/pulp/tmp and get the size of the folder (du -sh <folder>)
9. check /var/tmp and get the size of the folder
10. export cv or library
11. check 8,9 for any changes

expected:
/tmp dir on both /var/lib/pulp/tmp and /var/tmp should not have change

actual: 
/tmp dir on both /var/lib/pulp/tmp and /var/tmp should not have change

Each tmp dir has 4k of space and after export, they still have 4k or export.

Verified on 6.11 snap 16 with python38-pulpcore-3.16.6-1.el8pc.noarch on rhel7 and rhel8

Comment 13 errata-xmlrpc 2022-07-05 14:31:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5498


Note You need to log in before you can comment on or make changes to this bug.