On Wed, 01.02.12 18:54, Chris Paulson-Ellis ([email protected]) wrote: > I've got a client service (client.service) that requires a server > service (server.service). They are weakly coupled by a polling http > protocol, but the client needs to restart when server does or it can > get into trouble in it's state machine (and can't easily be re-coded > to cope). > > If I use Requires=server.service in client.service, then the client > correctly restarts when systemctl is used to restart server.service. > However, if the server crashes and is restarted (Restart=always in > server.service), then client is left running. > > If I change Requires=server.service to BindTo=server.service in > client.service, then the client is stopped when the server crashes, > but it is not restarted. > > Is there some way to get the client to always restart when server > restarts, for whatever reason?
No, there isn't. But what you describe is something I consider a bug, and to fix this has been on the TODO list for a while. i.e. a server dying and being restarted should still cause all services depending on it to restart. Hence: expect this to be fixed for you soon, so that BindTo works as expected. Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
