Project

General

Profile

Actions

action #153013

open

[openQA][repo][error] openQA instance keeps reporting "dubious ownership" error when test run starts

Added by waynechen55 4 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Regressions/Crashes
Target version:
Start date:
2024-01-02
Due date:
% Done:

0%

Estimated time:

Description

Observation

Following errors keep showing up in autoinst-log.txt from each test run on my personal openQA instance.
First the machine on which this openQA instance run has been given a fresh reinstall. It runs new Leap 15.5 system.
Second I installed openQA on this machine by using

curl -s https://raw.githubusercontent.com/os-autoinst/openQA/master/script/openqa-bootstrap | bash -x

So I do not think there is environmental issue with this machine and system.

Every time a test run starts, following "dubious ownership" errors reported in autoinst-log.txt:

[2024-01-02T20:43:50.930410+08:00] [debug] [pid:4064] git hash in 'sle-micro': 2732d91d808f8abfc07f1e9d7e571c0ebb3ab1d4
fatal: detected dubious ownership in repository at '/var/lib/openqa/share/tests/opensuse'
To add an exception for this directory, call:

    git config --global --add safe.directory /var/lib/openqa/share/tests/opensuse
[2024-01-02T20:43:50.932239+08:00] [debug] [pid:4064] git url in 'sle-micro': UNKNOWN (origin remote not found)

[2024-01-02T20:43:51.167389+08:00] [debug] [pid:4064] git hash in 'sle-micro/products/sle-micro/needles': 60aef425dcfc1e2b6214d69869c8bf52ed48ca25
fatal: detected dubious ownership in repository at '/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles'
To add an exception for this directory, call:

    git config --global --add safe.directory /var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
[2024-01-02T20:43:51.169498+08:00] [debug] [pid:4064] git url in 'sle-micro/products/sle-micro/needles': UNKNOWN (origin remote not found)

The error still persists even after executing

git config --global --add safe.directory xxx

I attached autoinst-log.text at this comment

Steps to reproduce

  • Every time test run starts

Impact

  • No sure whether openQA functions as normal because errors start showing up at the very beginning and before loading test modules
  • These errors look not trivial because they are related to test engine.
  • autoinst-log.text becomes less convincing because.

Problem

Looks like some wrong with test engine and repo itself.

Suggestions

  • What needs to be fixed ?
  • What setting needs to be adjusted ?

Workaround

n/a


Files

autoinst-log.txt (385 KB) autoinst-log.txt waynechen55, 2024-01-02 13:13

Related issues 1 (1 open0 closed)

Related to openQA Tests - action #153015: [openQA][engine][error] Many "Subroutine redefined" errros reported about test engine when test run startsNew2024-01-02

Actions
Actions #1

Updated by waynechen55 4 months ago

  • Description updated (diff)
Actions #2

Updated by waynechen55 4 months ago

  • Description updated (diff)
Actions #3

Updated by waynechen55 4 months ago

  • Description updated (diff)
Actions #5

Updated by waynechen55 4 months ago

  • Description updated (diff)
Actions #6

Updated by okurz 4 months ago

  • Category set to Regressions/Crashes
  • Target version set to Tools - Next

The "first kind of error" is actually coming from os-autoinst-distri-opensuse so I suggest you create a separate ticket about that in progress.opensuse.org/projects/openqatests/, for the second kind of error I wonder how one can reproduce but we can try with the "openqa-bootstrap" call that you mentioned.

Actions #7

Updated by waynechen55 4 months ago

okurz wrote in #note-6:

The "first kind of error" is actually coming from os-autoinst-distri-opensuse so I suggest you create a separate ticket about that in progress.opensuse.org/projects/openqatests/, for the second kind of error I wonder how one can reproduce but we can try with the "openqa-bootstrap" call that you mentioned.

Reported first kind of error in this ticket https://progress.opensuse.org/issues/153015

Actions #8

Updated by waynechen55 4 months ago

  • Subject changed from [openQA][log][error] openQA instance keeps reporting errors at the beginning of test run to [openQA][repo][error] openQA instance keeps reporting "dubious ownership" error when test run starts
  • Description updated (diff)
Actions #9

Updated by waynechen55 4 months ago

  • Description updated (diff)
Actions #10

Updated by waynechen55 4 months ago

I found git config --system --add safe.directory '*' can solve the issue. But I am not sure whether this is the only or most suitable way. Replace --system with --global does not solve the issue.

Actions #11

Updated by tinita 4 months ago

  • What user does the /var/lib/openqa/share/tests/opensuse directory belong to?
  • As which user are you running openQA tests?
  • As which user did you run the git config command? Doing git config --system --add safe.directory '*' defeats the purpose of that git feature and you might want to undo that. If the git directory does not belong to the user running the test, then the config command should be executed for the user running the test, and with --global, not --system, and ideally only with that directory.
Actions #12

Updated by okurz 4 months ago

  • Related to action #153015: [openQA][engine][error] Many "Subroutine redefined" errros reported about test engine when test run starts added
Actions #13

Updated by waynechen55 4 months ago · Edited

tinita wrote in #note-11:

  • What user does the /var/lib/openqa/share/tests/opensuse directory belong to?
  • As which user are you running openQA tests?
  • As which user did you run the git config command? Doing git config --system --add safe.directory '*' defeats the purpose of that git feature and you might want to undo that. If the git directory does not belong to the user running the test, then the config command should be executed for the user running the test, and with --global, not --system, and ideally only with that directory.
drwxr-xr-x 1 geekotest nogroup 658 Jan  2 15:51 opensuse
lrwxrwxrwx 1 root      root      8 Jan  2 16:27 sle -> opensuse
lrwxrwxrwx 1 root      root      8 Jan  2 18:26 sle-micro -> opensuse
  • waynechen
  • waynechen
Actions #14

Updated by tinita 4 months ago

Like I said, if the git repo belongs to geekotest and you run tests as waynechen, then you have to run git config --global --add safe.directory /var/lib/openqa/share/tests/opensuse as user waynechen, for each of the directories it complains about. Or, at your own risk, use *. If that doesn't help, then debugging is needed why git isn't seeing that configuration.

Actions #15

Updated by waynechen55 4 months ago

tinita wrote in #note-14:

Like I said, if the git repo belongs to geekotest and you run tests as waynechen, then you have to run git config --global --add safe.directory /var/lib/openqa/share/tests/opensuse as user waynechen, for each of the directories it complains about. Or, at your own risk, use *. If that doesn't help, then debugging is needed why git isn't seeing that configuration.

How to undo

git config --system --add safe.directory '*'

?

Actions #16

Updated by tinita 4 months ago

git config --system --unset safe.directory

Actions #17

Updated by waynechen55 4 months ago

tinita wrote in #note-16:

git config --system --unset safe.directory

git config --global still does not solve the problem, see

fatal: detected dubious ownership in repository at '/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles'
To add an exception for this directory, call:

    git config --global --add safe.directory /var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
Actions #18

Updated by tinita 4 months ago · Edited

Can you do the following as user waynechen?

git config --global --get-all safe.directory
cd /var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
git status
ls -ld
Actions #19

Updated by waynechen55 4 months ago

tinita wrote in #note-18:

Can you do the following as user waynechen?

git config --global --get-all safe.directory
cd /var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
git status
ls -ld

I think I am root in shell and also root when trigge openQA test run using openqa client.

  • git config --global --get-all safe.directory
/var/lib/openqa/share/tests/opensuse
/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
/var/lib/openqa/share/tests/opensuse
/var/lib/openqa/share/tests/opensuse
*
*
/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
/var/lib/openqa/share/tests/opensuse/
/var/lib/openqa/share/tests/sle
/var/lib/openqa/share/tests/sle-micro
/var/lib/openqa/share/tests/opensuse
/var/lib/openqa/share/tests/opensuse/products/sle-micro/
/var/lib/openqa/share/tests/sle/products/sle-micro/
/var/lib/openqa/share/tests/sle-micro/products/sle-micro/
/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles/
/var/lib/openqa/share/tests/sle/products/sle-micro/needles/
/var/lib/openqa/share/tests/sle-micro/products/sle-micro/needles/
/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles
  • cd /var/lib/openqa/share/tests/opensuse/products/sle-micro/needles & git status & ls -ld
192:/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles # git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
192:/var/lib/openqa/share/tests/opensuse/products/sle-micro/needles # ls -ld
drwxr-xr-x 1 root root 2216570 Jan  2 18:55 .
Actions #20

Updated by okurz 2 months ago

  • Target version changed from Tools - Next to future
Actions

Also available in: Atom PDF