Project

General

Profile

Actions

action #131465

closed

Make temporary files and directories created by openQA services easier to identify size:M

Added by kraih 10 months ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2023-06-27
Due date:
2023-07-13
% Done:

0%

Estimated time:

Description

Motivation

While tracking down the root cause for #131447 we encountered a lot of error messages like:

Jun 27 09:10:06 openqa openqa-gru[22285]: mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: No space left on device
Jun 27 09:10:37 openqa openqa-gru[22774]: mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: No space left on device
Jun 27 09:11:27 openqa openqa-gru[23797]: mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: No space left on device
Jun 27 09:13:38 openqa openqa-gru[26670]: mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: No space left on device
Jun 27 09:13:38 openqa openqa-gru[26684]: mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: No space left on device

These are very hard to trace back to the code that triggered them. If we simply used more unique templates like
/tmp/tmp.webui.obs.rsync.XXXXXXXXXX and the like it would be much easier.

Acceptance criteria

  • AC1: All temporary files/directories created by openQA including use unique templates

Suggestions


Related issues 2 (1 open1 closed)

Related to openQA Project - action #131447: Some jobs incomplete due to auto_review:"api failure: 400.*/tmp/.*png.*No space left on device.*Utils.pm line 285":retry but enough space visible on machinesResolvedkraih2023-06-27

Actions
Related to openQA Project - action #131471: Leftover worker temporary directories in /tmp on OSD and O3 size:MWorkable2023-06-27

Actions
Actions #1

Updated by kraih 10 months ago

  • Related to action #131447: Some jobs incomplete due to auto_review:"api failure: 400.*/tmp/.*png.*No space left on device.*Utils.pm line 285":retry but enough space visible on machines added
Actions #2

Updated by okurz 10 months ago

  • Target version changed from future to Ready
Actions #3

Updated by tinita 10 months ago

Since I was already looking at this part of the code: https://github.com/os-autoinst/openQA/pull/5225 Use a unique template for worker tempdir

Actions #4

Updated by kraih 10 months ago

  • Assignee set to tinita
Actions #5

Updated by tinita 10 months ago

  • Status changed from New to In Progress

https://github.com/os-autoinst/openQA/pull/5225 merged and deployed.

There's still an mktemp without a template in openqa-label-known-issues that needs to be addressed.

Actions #6

Updated by openqa_review 10 months ago

  • Due date set to 2023-07-13

Setting due date based on mean cycle time of SUSE QE Tools

Actions #7

Updated by tinita 10 months ago

  • Related to action #131471: Leftover worker temporary directories in /tmp on OSD and O3 size:M added
Actions #8

Updated by tinita 10 months ago

https://github.com/os-autoinst/openQA/pull/5229 Improve tempdir template uniqueness
-> merged

Actions #9

Updated by tinita 10 months ago

https://github.com/os-autoinst/scripts/pull/239 Use a unique tempfile template in openqa-label-known-issues

Now I only need to check why the runcli-errorlog-XXXX tempfiles aren't cleaned up.

errorlog=$(mktemp -t runcli-errorlog-XXXX)
# shellcheck disable=SC2064
trap "rm $errorlog" EXIT

This code works in a small example script, but apparently not from openqa-investigate.

Actions #10

Updated by okurz 10 months ago

  • Subject changed from Make temporary files and directories created by openQA services easier to identify to Make temporary files and directories created by openQA services easier to identify size:M
  • Description updated (diff)
Actions #11

Updated by tinita 10 months ago

https://github.com/os-autoinst/scripts/pull/243 Use more unique tempfile templates (merged)

Actions #12

Updated by okurz 10 months ago

Looks good. What's missing?

Actions #13

Updated by tinita 10 months ago

I'm still working on the leftover runcli-errorlog-XXXX files.
Also in os-autoinst I found one instance of tempfile without a template in consoles/sshVirtsh.pm.

Actions #14

Updated by tinita 10 months ago

  • Status changed from In Progress to Feedback
Actions #17

Updated by tinita 10 months ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF