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

entrypoint.sh script: Add semaphore to prevent parallel installation of files in Kubernetes #1311

Closed
HaleyACS opened this issue Nov 23, 2020 · 3 comments

Comments

@HaleyACS
Copy link

HaleyACS commented Nov 23, 2020

Using this image for my kubernetes cluster @ home. Works really nice :)

Only caveat is that in case you deploy the image while using the same NFS persistent directory for all instances, they all install into the same NFS share at almost the same time. From experience, this screams to "cause" heavoc when murphy decides and I absolutely don't want it to happen.

Any chance we could add a semaphore to trigger the installer options? (Of course any other mitigation is welcome)
First instance that gets the semaphore installs, the others wait for the semaphore to be released to continue operation. It could he combined with a version-check and/or date or status check to see if the installation was done right.
We can link it to KUBERNETES_ENV == SET (that's when kubernetes is set).

@hansingt
Copy link

This is an (even more major) issue for updates as well.

I'm using the fpm-alpine image as replicated handlers. Now, if I want to update my installation, I first need to scale the pods down to 1 to make sure, only one container is running the update.

Some kind of "locking" the installation really would help here. I think, for installing and updating it would be the same.

@danieljkemp
Copy link

The container should not be copying the source files of the application around to begin with.

Still would want the semaphore to avoid running occ upgrade more than once.

@joshtrichards
Copy link
Member

Fixed in #1760 & #1905

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants