Pyinfra: Stopping/starting postgresql service

Created on 28 Apr 2021  路  3Comments  路  Source: Fizzadar/pyinfra

Is your feature request related to a problem? Please describe

The current implementation of systemd.service is unable to stop postgresql (at least in my case). The reason is that the postgresql.service service has status active (exited) and hence pyinfra thinks the service is stopped already.

Describe the solution you'd like

Some possible solutions:

  • have the possibility of "force" run a command, so that in this case it will stop the service regardless of the status.
  • have ad-hoc operations in the postgresql operations to start/stop the service.

Happy to help if you think this may be useful.

Bug

All 3 comments

@giuppep this sounds like a bug in the server.SystemdSstatus fact, I think anything active (exited) should be considered running. Will take this opportunity to look at all the statues systemd might use as well.

Looks like it's working fine now. Thanks a lot for fixing 馃槂

(By the way, great job on the library, I really like it! 馃槈 )

Was this page helpful?
0 / 5 - 0 ratings