Project

General

Profile

action #95185

coordination #80142: [saga][epic] Scale out: Redundant/load-balancing deployments of openQA, easy containers, containers on kubernetes

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

openqa-bootstrap ignores errors when systemd is not available

Added by okurz 3 months ago. Updated 2 months ago.

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

0%

Estimated time:
Difficulty:

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

History

#1 Updated by dheidler 3 months ago

  • Status changed from New to In Progress
  • Assignee set to dheidler

#2 Updated by dheidler 3 months ago

  • Status changed from In Progress to Feedback

#3 Updated by dheidler 3 months 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)?

#4 Updated by okurz 3 months 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.

#5 Updated by okurz 2 months 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".

Also available in: Atom PDF