Project

General

Profile

Actions

action #104136

closed

"archive_job_results" fail with "Unable to copy ... File exists" size:M

Added by okurz over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
2021-12-17
Due date:
% Done:

0%

Estimated time:

Description

Observation

From https://openqa.suse.de/minion/jobs?id=3630519

---
args:
- 7219499
attempts: 1
children: []
created: 2021-12-16T18:47:41.3699Z
delayed: 2021-12-17T00:09:01.26733Z
expires: 2021-12-18T18:47:41.3699Z
finished: 2021-12-17T00:09:02.89443Z
id: 3630519
lax: 0
notes:
  gru_id: 30744450
parents: []
priority: 0
queue: default
result: |
  Unable to copy '/var/lib/openqa/testresults/07219/07219499-sle-15-SP4-Online-x86_64-Build39.1-wayland-desktopapps-gnome@64bit-virtio-vga' to '/var/lib/openqa/archive/testresults/07219/07219499-sle-15-SP4-Online-x86_64-Build39.1-wayland-desktopapps-gnome@64bit-virtio-vga': File exists at /usr/share/openqa/script/../lib/OpenQA/Schema/Result/Jobs.pm line 270.
retried: 2021-12-17T00:08:01.26733Z
retries: 308
started: 2021-12-17T00:09:02.73895Z
state: failed
task: archive_job_results
time: 2021-12-17T07:20:16.09821Z
worker: 588

The source code line reported is https://github.com/os-autoinst/openQA/blob/cbc8674aac26e1e260b536aae72cbe0ed8ca9064/lib/OpenQA/Schema/Result/Jobs.pm#L270 , context:

    my $archived_result_dir = $self->add_result_dir_prefix($self->remove_result_dir_prefix($normal_result_dir), 1);
    if (!File::Copy::Recursive::dircopy($normal_result_dir, $archived_result_dir)) {
        my $error = $!;
        File::Path::rmtree($archived_result_dir);    # avoid leftovers
-->     die "Unable to copy '$normal_result_dir' to '$archived_result_dir': $error";
    }

The directory /var/lib/openqa/testresults/07219/07219499-sle-15-SP4-Online-x86_64-Build39.1-wayland-desktopapps-gnome@64bit-virtio-vga/ still exists and has what looks like valid content. The directory /var/lib/openqa/archive/testresults/07219/ exists and currently has four other folders, but no folder for 07219499

Steps to reproduce

see
https://openqa.suse.de/minion/jobs?task=archive_job_results&state=failed
for more similar errors

Suggestions

  • Investigate why the archive already exists - maybe the previous archive failed but wasn't removed
  • Remove any left-overs / override existing files
  • Maybe the job was cancelled and re-run?
  • Document why the job failed so we understand it better
  • Maybe a good task to learn about the archiving code

Related issues 1 (0 open1 closed)

Related to openQA Project - action #92788: Use openQA archiving feature on osd size:SResolvedokurz

Actions
Actions

Also available in: Atom PDF