-
Notifications
You must be signed in to change notification settings - Fork 282
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
Attempt to start and manage PostgreSQL service even if init system fails #136
Attempt to start and manage PostgreSQL service even if init system fails #136
Conversation
661a0fc
to
87f6cd8
Compare
I made the final changes for the state to run clear without any failures even if init system is not available and Salt wouldn't be able to start and enable PostgreSQL server via This makes the formula fully compatible and working with newest Salt functionality: @javierbertoli , please could you review my changes? Thanks! |
Hi @vutny. I'm still trying to make up my mind about this PR. I DO get the idea and understand the spirit of it, but I feel the implementation is not the best or might lead to errors somehow... Thinking out loud: how about moving all these resources ('docker/packer/containerized' needs) to their own sls file, which can be included as a dependency in As I said, I'm not even convinced my idea is ther ight one, so I'm completely open to reading whatever you have to say 😄 |
@javierbertoli I understand your concern. Indeed it would be better to get this behavior configurable, not just assume that everybody will need the feature. I've used Grain switch because I wanted just apply the formula and get the same result which does not depend on any environment specific Pillars. But adding some toggling setting for this is definitely doable. Regarding the separation of states which handle the manual start of PostgreSQL (this is the only additional thing required for "baking" appliances), right now I'm not sure if it wouldn't make implementation of this too much complicated. Because the states really closely coupled with all the things done before in I will come up with further changes to address your comments. Thanks. |
d70f91a
to
21de470
Compare
21de470
to
52d57d3
Compare
@javierbertoli , I think I made it... better than the initial implementation. I hope this is good to go. Thanks! |
@vutny it looks great to me. Thanks for all your hard work! |
This PR adds couple of fall back states to make sure that PostgreSQL service will be enabled and started even if
service.running
module fails to do its job.Why we need such a thing? This adds a possibility to fully provision PostgreSQL with all supported entities during the build process of AMI/VM/Container images (using Packer or Docker for example).
Before this PR that didn't work, because:
init
process running in the scope of the image build, so PostgreSQL cluster fails to start and all subsequent states fail as wellAlso, this is a move towards resolving issue #125 by removing the
osmajorreleasemap.yaml
file mapping and making a PostgreSQL cluster command as general as possible across different distributions and major versions.