Project

General

Profile

Actions

action #95185

closed

coordination #127031: [saga][epic] openQA for SUSE customers

coordination #80150: [epic] Scale out openQA: Easier openQA setup

openqa-bootstrap ignores errors when systemd is not available

Added by okurz about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2021-07-07
Due date:
% Done:

0%

Estimated time:

Description

Observation

When running podman run --rm -it registry.opensuse.org/opensuse/leap:15.3 sh -c 'zypper -n in curl && curl -s https://raw.githubusercontent.com/os-autoinst/openQA/master/script/openqa-bootstrap | bash -x'

eventually there are errors which do not stop the execution eventually ending up in an infinite loop waiting for services that can never come online

+ systemctl enable --now postgresql
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /usr/lib/systemd/system/postgresql.service.
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
+ su postgres -c /usr/share/openqa/script/setup-db geekotest openqa
psql: error: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
createuser: error: could not connect to database template1: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
…
Failed to connect to bus: Host is down
+ curl -sI http://localhost/
+ grep 200
+ sleep 3
…
+ curl -sI http://localhost/
+ grep 200
+ sleep 3
…

Acceptance criteria

  • AC1: On unrecoverable errors openqa-bootstrap aborts with helpful error message
Actions #1

Updated by dheidler about 3 years ago

  • Status changed from New to In Progress
  • Assignee set to dheidler
Actions #2

Updated by dheidler about 3 years ago

  • Status changed from In Progress to Feedback
Actions #3

Updated by dheidler about 3 years ago

@okurz: Is this what you expected or do you think we should run this script with bash -ex (which might require some adjustments to the script)?

Actions #4

Updated by okurz about 3 years ago

dheidler wrote:

@okurz: Is this what you expected or do you think we should run this script with bash -ex (which might require some adjustments to the script)?

As we discussed the problem was me calling the script wrong without the -e part so the error handling was actually ignored. For that I created https://github.com/os-autoinst/openQA/pull/4030 to fix it.

Actions #5

Updated by okurz about 3 years ago

  • Status changed from Feedback to Resolved

Both https://github.com/os-autoinst/openQA/pull/4030 and https://github.com/os-autoinst/openQA/pull/4024 merged. Anyone using the bootstrapping as described in documentation using the current git master version will have access to the improved version, hence calling this "Resolved".

Actions

Also available in: Atom PDF