Skip to content

sosreport: Query sos policy for default tmp dir#22190

Merged
martinpitt merged 1 commit into
cockpit-project:mainfrom
martinpitt:sos-tmp-dir
Jul 9, 2025
Merged

sosreport: Query sos policy for default tmp dir#22190
martinpitt merged 1 commit into
cockpit-project:mainfrom
martinpitt:sos-tmp-dir

Conversation

@martinpitt

@martinpitt martinpitt commented Jul 9, 2025

Copy link
Copy Markdown
Member

sos 4.6.2 changed the tmp dir policy [1] from a static /var/tmp to a dynamic per-distro policy, which happens to be /tmp on Debian/Ubuntu right now. This is wrong, and there is no official way to query it [2].

To cope, query the sos policy for the tmp-dir, and only fall back to static /var/tmp if that fails.

[1] sosreport/sos#4062
[2] sosreport/sos#4074


This fixes cockpit-project/bots#7973 , I triggered an extra run against that image.

@martinpitt martinpitt marked this pull request as ready for review July 9, 2025 06:06
sos 4.6.2 changed the tmp dir policy [1] from a static /var/tmp to a
dynamic per-distro policy, which happens to be /tmp on Debian/Ubuntu
right now. This is wrong, and there is no official way to query it [2].

To cope, query the sos policy for the tmp-dir, and only fall back to
static /var/tmp if that fails.

[1] sosreport/sos#4062
[2] sosreport/sos#4074

@jelly jelly left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but also 🤯

@martinpitt martinpitt merged commit 10590dc into cockpit-project:main Jul 9, 2025
88 of 89 checks passed
@martinpitt martinpitt deleted the sos-tmp-dir branch July 9, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants