Project

General

Profile

Actions

action #131465

closed

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

Added by kraih over 1 year ago. Updated over 1 year 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 (public) - 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 (public) - action #131471: Leftover worker temporary directories in /tmp on OSD and O3 size:MWorkable2023-06-27

Actions
Actions #1

Updated by kraih over 1 year 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 over 1 year ago

  • Target version changed from future to Ready
Actions #3

Updated by tinita over 1 year 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 over 1 year ago

  • Assignee set to tinita
Actions #5

Updated by tinita over 1 year 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 over 1 year 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 over 1 year ago

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

Updated by tinita over 1 year ago

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

Actions #9

Updated by tinita over 1 year 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 over 1 year 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 over 1 year ago

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

Actions #12

Updated by okurz over 1 year ago

Looks good. What's missing?

Actions #13

Updated by tinita over 1 year 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 over 1 year ago

  • Status changed from In Progress to Feedback
Actions #17

Updated by tinita over 1 year ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF