action #95185
closedcoordination #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
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
Updated by dheidler over 3 years ago
- Status changed from New to In Progress
- Assignee set to dheidler
Updated by dheidler over 3 years ago
- Status changed from In Progress to Feedback
Updated by dheidler over 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)?
Updated by okurz over 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.
Updated by okurz over 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".