Lots of Temp files under /var/lib/pulp

Problem:
When a client requests packages from katello/foreman server, tmp files are created under /var/lib/pulp.

For example, If when I did yum install kexec-tools in the client, a file called tmpzusmqvmw was created under /var/lib/pulp.

[root@server pulp]# file tmpzusmqvmw
tmpzusmqvmw: RPM v3.0 bin i386/x86_64 kexec-tools-2.0.15-51.el7_9.2

There are lots of files like these created whenever a client requests packages and it doesn’t seem to be cleared.

[root@server pulp]# pwd
/var/lib/pulp

[root@server pulp]# ls -ltr tmp*
-rw-------. 1 pulp pulp 65980 Apr 28 10:52 tmpvf9gupw9
-rw-------. 1 pulp pulp 155064 Apr 28 12:18 tmp8ngom0eu
-rw-------. 1 pulp pulp 336872 Apr 28 12:18 tmp06b7wv6j
-rw-------. 1 pulp pulp 1145744 Apr 28 12:18 tmp2s31h5m7
-rw-------. 1 pulp pulp 3416328 Apr 28 12:18 tmpf85wlfii
-rw-------. 1 pulp pulp 277320 Apr 28 12:18 tmp5czas4t6
-rw-------. 1 pulp pulp 304600 Apr 28 12:18 tmp1fjo1k7k
-rw-------. 1 pulp pulp 196876 Apr 28 12:18 tmp9i7k5ykp
-rw-------. 1 pulp pulp 196432 Apr 28 12:18 tmp0oy7v6yf
-rw-------. 1 pulp pulp 333304 Apr 28 12:18 tmpto8q4vo4

…etc

All of these files were created after I ran a yum update on the client.

Expected outcome:
Not sure if this is a bug or a feature, but if it’s a feature then maybe these temp files should be stored in another directory somewhere and needs to be cleaned up automatically?

Foreman and Proxy versions:
Same behavior with Foreman 2.3 and Katello 3.18 and with Katello 4.0 and foreman 2.4. Thus guessing, it is related to Pulp3.

Foreman and Proxy plugin versions:
Katello 4.0 and Katello 3.18
Foreman 2.3 and Foreman 2.4

Distribution and version:
CentOS Linux release 7.9.2009 (Core)

Other relevant data:
Freshly installed Katello 4.0. I see the same behavior with freshly installed katello 3.18 as well.
RedHat repos are set to OnDemand download policy.

Please let me know if more details are needed.

Thanks,

Just checking if anyone has seen this as the number of tmp files under /var/lib/pulp continues to grow.

Thanks,

@Justin_Sherrill or @iballou is this something you can give guidance on?

2 Likes

I believe these files at least are supposed to be in /var/lib/pulp/tmp. I made an issue: Issue #8669: Temp files are showing up in /var/lib/pulp instead of under /var/lib/pulp/tmp - Pulp

I’m asking in the issue too if they’re supposed to be cleaned up.

@iballou

Thank you, Ian!

I hope it gets fixed soon and if there is a workaround till then, please let me know.

Great presentation this morning, btw. :grinning:

2 Likes

Thanks, glad you liked the presentation!

I’d recommend to keep an eye on the bug. If they fix it, the pull request might end up being something you can patch into Katello’s version of Pulp. I’ll watch out for it too.