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 1936946 - bootdisks are left in privatetmp of httpd
Summary: bootdisks are left in privatetmp of httpd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Bootdisk Plugin
Version: 6.11.0
Hardware: All
OS: All
high
medium
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Roman Plevka
URL:
Whiteboard:
: 1980223 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-09 14:15 UTC by Jan Jansky
Modified: 2024-10-01 17:39 UTC (History)
11 users (show)

Fixed In Version: tfm-rubygem-foreman_bootdisk-19.0.4-1.el7sat.noarch.rpm
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-01 12:50:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
HOTFIX tfm-rubygem-foreman_bootdisk RPM for Satellite 6.9.7 (93.55 KB, application/x-rpm)
2021-11-17 22:58 UTC, wclark
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 32057 0 Normal New Bootdisks are left in privatetmp of httpd 2021-03-09 15:46:01 UTC
Red Hat Knowledge Base (Solution) 5869721 0 None None None 2021-03-09 14:47:39 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:10:35 UTC

Description Jan Jansky 2021-03-09 14:15:04 UTC
Description of problem:
When generating any bootdisk for host it will stay forever in PrivateTmp.

for example:

# ls -al /tmp/systemd-private-97a048f3f7074e34b204f5f3ccd867f8-httpd.service-mk41vo/tmp/
total 4
drwxrwxrwt. 10 root    root    4096  9. bře 15.03 .
drwx------.  3 root    root      17  3. bře 11.56 ..
drwx------.  3 foreman foreman   19  5. bře 14.51 bootdisk-iso-20210305-31878-1820308
drwx------.  3 foreman foreman   37  9. bře 13.53 bootdisk-iso-20210309-17692-1gzp36
drwx------.  3 foreman foreman   37  9. bře 13.53 bootdisk-iso-20210309-17692-svhj11
drwx------.  3 foreman foreman   37  9. bře 13.54 bootdisk-iso-20210309-17692-xgh2jm
drwx------.  3 foreman foreman   37  9. bře 14.28 bootdisk-iso-20210309-21133-ka0iql
drwx------.  3 foreman foreman   37  9. bře 13.52 bootdisk-iso-20210309-30111-bo7bsp
drwxr-xr-x.  3 foreman foreman   18  3. bře 11.56 bundler
drwx------.  2 foreman foreman   71  5. bře 14.51 d20210305-31878-1n0nvh9

I have tested the same on Satellite 6.7 and file got created apx for 1 seconds and then its cleaned.

This is causing filling up /tmp and possible crash of other services.


Version-Release number of selected component (if applicable):
6.8.4

How reproducible: Always


Steps to Reproduce:
1. Generate any type of Boot Disk (WebUI -> Hosts -> select Host -> Bootdisk -> *)
2. file got created in /tmp/systemd-private*httpd.service*/tmp/

Actual results:
File stays forever

Expected results:
Removed when its not needed as in 6.7.

Comment 1 Lukas Zapletal 2021-03-09 14:16:35 UTC
Important bug, disk can be filled with this one, CUs need to call in and fix their Satellites. I will fix this right away, can do 6.9 as well.

The fix will be small but a packaging change will be needed to introduce new tmpfiles entry.

Comment 2 Lukas Zapletal 2021-03-16 16:08:28 UTC
For the record, the upstream patch was modified to delete old bootdisks directly. It can be a nice workaround until this is released.

Comment 3 Bryan Kearney 2021-04-15 10:46:10 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32057 has been resolved.

Comment 6 Roman Plevka 2021-07-02 07:56:26 UTC
VERIFIED
on sat6.10.0 snap #7

after generating of the host image, the tmp dir is empty:

```
# ls -la /tmp/systemd-private-9888238d758641448424e63c474fec60-httpd.service-eXISfa/tmp/
total 0
drwxrwxrwt. 2 root root  6 Jul  1 18:50 .
drwx------. 3 root root 17 Jul  1 18:50 ..

```

Comment 9 errata-xmlrpc 2021-11-16 14:10:21 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.10 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-2021:4702

Comment 10 wclark 2021-11-17 22:58:48 UTC
Created attachment 1842446 [details]
HOTFIX tfm-rubygem-foreman_bootdisk RPM for Satellite 6.9.7

Comment 11 wclark 2021-11-17 23:00:18 UTC
HOTFIX RPMs are available for Satellite 6.9.7

To obtain the Hotfix RPMs, download the below Bugzilla attachments:
- HOTFIX tfm-rubygem-foreman_bootdisk RPM for Satellite 6.9.7

INSTALL INSTRUCTIONS:

1. Take a complete backup or snapshot of Satellite 6.9.7 server

2. Copy the downloaded Hotfix RPM to Satellite server

3. # yum install tfm-rubygem-foreman_bootdisk-17.0.2-3.HOTFIXRHBZ1936946.el7sat.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 12 Lukas Zapletal 2021-12-15 07:31:14 UTC
*** Bug 1980223 has been marked as a duplicate of this bug. ***

Comment 13 Lukas Zapletal 2021-12-15 07:33:43 UTC
For the record, this is how Satellite 6.10 cleans bootdisk ISOs now:

- temporary directory which is used to build the ISO is removed right after it is used
- all tmp/bootdisk-iso-* files which are older than 30 minutes are deleted on every bootdisk build.

Comment 17 Lukas Zapletal 2022-03-01 12:50:11 UTC
I have found the bug, the fix was not correct. This patch solves it:

https://github.com/theforeman/foreman_bootdisk/pull/114

On top of that, bootdisks do not belong to tmpfs and they should be created in /var/tmp instead as they can be big. So I am filing a new BZ:

https://bugzilla.redhat.com/show_bug.cgi?id=2059566

TRIAGE: The bugfix was incorrect, I am reopening this for 7.0.

Comment 18 RHEL Program Management 2022-03-01 12:50:20 UTC
This bug was previously closed after it was shipped in the Red Hat Errata linked above. Unfortunately our workflow does not support re-opening bugs that have already been shipped. If you are still effected by this bug please open a new bug and reference this pre-existing Bugzilla and indicate that it does not appear to be resolved.

Comment 21 Lukas Zapletal 2022-05-03 09:41:29 UTC
Due to a process problem, this was not properly released. Creating a new BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2081280


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