Oneshots get called twice
Describe the bug All of the oneshot scripts get called twice. To see an example of this check out the CI from galaxy_ng. postgres-prepare gets called here https://github.com/ansible/galaxy_ng/actions/runs/4765015133/jobs/8470280735?pr=1689#step:12:789 (line 788) and here https://github.com/ansible/galaxy_ng/actions/runs/4765015133/jobs/8470280735?pr=1689#step:12:1108 (line 1107).
This behavior happens for all of the oneshot scripts, which makes the containers take longer to start up.
To Reproduce
Run the CI centos image and search the log output from the container for Calling /etc/init/postgres-prepare. It will show up twice per container start.
Expected behavior Oneshot scripts should only execute once.
This is probably happen because of the logic for how we scale the workers in the multi-process containers:
- Copy the /etc/s6-rc/ to under /tmp
- Duplicate the worker services under /tmp
- Execute the /tmp subfolder as the new service configuration.
@newswangerd My bet is that this is only adding a few to several seconds. It's not like the migrations, which take a few minutes, get run twice. Does that seem to be your experience?
@mikedep333 i can't speak for the normal container images, but it adds a lot of time to oci-env with some of the profiles.
I have noticed that the set certs can be fairly time consuming. That might cause delays if it's run twice.
This seems to be caused by having dependencies on base