start-os
start-os copied to clipboard
[feat]: Restart dependent service if dependency is essential and pointer volume is created
Prerequisites
- [X] I have searched for existing issues that already suggest this feature, without success.
Describe the Feature Request
Right now services with dependencies may get into situations where they don't have access to a pointer volume that they requested upon startup. We would like to be able to detect these volumes coming into existence and if the dependent service requires it, restart the dependent service or mount it to the running container if possible.
Describe the Use Case
If you uninstall a dependency and reinstall it, the dependent will not automatically be able to ingest the contents of the pointer volume. We would like to make the dependent's update automatic so that the user does not have to manually intervene in order to have their services function properly
Describe Preferred Solution
- [ ] maintain a master list of services, pointer volumes, and whether or not they are necessary
- [ ] hook into fsnotify and monitor for the creation of any of the pointer volumes requested
- [ ] if a file that is created is a pointer volume target AND the service has permission to access it AND the pointer volume is non-optional, restart the service
- [ ] if possible don't even restart the service, mount the pointer volume to the running container using an approach like this: https://jpetazzo.github.io/2015/01/13/docker-mount-dynamic-volumes/
Describe Alternatives
We may wish to more aggressively shutdown services that have missing essential dependencies. This would sidestep the issue because the dependent would not be started if its dependency was not adequately met, and thus wouldn't have to be restarted in order to absorb those changes.
We may also wish to signal to the dependent that a resource it requested has been made available and let IT decide how to handle that. This pushes more work onto the service developers but is a less heavy handed approach.
Anything else?
No response
Linked to #1265
Is this part of long-running containers? Is that enabled yet?
Would love a response to this
Irrelevant now