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
Add postgresql service to requirements #4971
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After checking the systemd docs, the combination of After
and Requires
looks correct to me.
What about the other services needing postgresql? Shouldn't they be treated in the same way? |
Or they have a |
If this unit gets activated, the units listed in Requires= will be activated as well. If one of the other units fails to activate, and an ordering dependency After= on the failing unit is set, this unit will not be started. Besides, with or without specifying After=, this unit will be stopped (or restarted) if one of the other units is explicitly stopped (or restarted). Reference: https://progress.opensuse.org/issues/122578
4428e8b
to
b7452c2
Compare
I retriggered CircleCI jobs, we had various problems there |
hm, this introduces a strong requirement on PostgreSQL. But what for hosts that don't actually run the database but use a remote database that we support just as well? I am not sure if https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Wants=would also help for stopping services but one could try. |
Right, this will require to have the webui on the database server. Maybe we can go around by dropping a symlink into openqa-webui.service.requires directory if postgresql.service is detected; or having multiple service file for each use-case, similar to our multiple worker setup (openqa-worker-plain vs. openqa-worker-auto-restart). I am afraid that both use-cases cannot be implemented inside one service file. What about having something like openqa-webui-standalone.service? |
If this unit gets activated, the units listed in Requires= will be activated as well. If one of the other units fails to activate, and an ordering dependency After= on the failing unit is set, this unit will not be started. Besides, with or without specifying After=, this unit will be stopped (or restarted) if one of the other units is explicitly stopped (or restarted).
Reference: https://progress.opensuse.org/issues/122578