Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oneshots get called twice #474

Open
newswangerd opened this issue Apr 24, 2023 · 4 comments
Open

Oneshots get called twice #474

newswangerd opened this issue Apr 24, 2023 · 4 comments

Comments

@newswangerd
Copy link
Contributor

newswangerd commented Apr 24, 2023

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.

@mikedep333
Copy link
Member

This is probably happen because of the logic for how we scale the workers in the multi-process containers:

  1. Copy the /etc/s6-rc/ to under /tmp
  2. Duplicate the worker services under /tmp
  3. Execute the /tmp subfolder as the new service configuration.

@mikedep333
Copy link
Member

@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?

@newswangerd
Copy link
Contributor Author

@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.

@newswangerd
Copy link
Contributor Author

This seems to be caused by having dependencies on base

newswangerd added a commit to newswangerd/pulp-oci-images that referenced this issue May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Needs review
Development

Successfully merging a pull request may close this issue.

2 participants