systemd: Tagging /dev/virtio-ports/* for systemd

Lennart Poettering mzerqung at 0pointer.de
Wed Jul 6 12:35:13 UTC 2011


On Wed, 06.07.11 12:21, Richard W.M. Jones (rjones at redhat.com) wrote:

> 
> On Tue, Jul 05, 2011 at 08:36:42PM +0200, Lennart Poettering wrote:
> > On Tue, 05.07.11 16:54, Daniel P. Berrange (berrange at redhat.com) wrote:
> > > [Service]
> > > ExecStart=-/usr/sbin/guestfsd
> > 
> > Prefixing the binary path with "-" will result in the exit code of
> > guestfsd be ignored, i.e. we wouldn't put the service into failed state
> > if it crashes (or exits otherwise abnormally). I'd encourage never to
> > prefix with "-" unless you have a really good reason to.
> 
> In this case, I think we do.  The daemon only handles one connection
> at a time (that is the nature of virtio-serial ports) and it will exit
> with EXIT_FAILURE if an error is read in the protocol.  This can
> happen in some legitimate-ish cases, eg. if the host side disconnects
> without "properly" closing the connection.

Wouldn't it make sense to fix the daemon to return EXIT_SUCCESS in those
legitimate-ish cases?

> But what we'd want to avoid is the case where the daemon dies during
> startup, and we get into a loop repeatedly relaunching the daemon.

systemd does not distuingish between failure-on-start and
failure-during-runtime.

> The question is, does systemd implement respawn throttling like inetd?

Yes, we rate limit almost everything. There's even a patch floating
around on our mailing list right now which we will probably merge pretty
soon which allows you to configure in a service how often we should
retry respawning the service before giving up, if it fails.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list