action #164595
Updated by okurz 15 days ago
## Observation
When openqa-bootstrap is invoked with additional parameters it should use them for openqa-clone-job and also clone the job after the bootstrapping is done. This feature does not work in systemd-less environments like when invoked inside containers.
The problem is that the cloning is the very last part and the `start-worker` function never returns when `$running_systemd` is zero:
```
if [[ -z $running_systemd ]]; then
/usr/bin/install -d -m 0755 -o _openqa-worker /var/lib/openqa/pool/1
su _openqa-worker -c '/usr/share/openqa/script/worker --instance 1'
else
systemctl enable --now openqa-worker@1
fi
```
Reproducer: `podman run --rm -ti --device /dev/kvm -p 1080:80 -p 1443:443 --env OPENQA_SERVICE_PORT_DELTA=0 opensuse/tumbleweed:latest bash -c 'zypper in -y openQA-bootstrap; /usr/share/openqa/script/openqa-bootstrap --from openqa.opensuse.org --skip-deps 4362951'`
## Acceptance criteria
**AC1:** `openqa-clone-job` is called even without systemd
## Suggestion
* Move some code around to initiate cloning before starting the worker
* Use bash magic to not block the execution
Back