3 Commits

Author SHA1 Message Date
Nir Soffer
d5e9c757e0 http: Configurable inactivity timeout
We used 60 seconds timeout for disconnecting inactive clients. This is
too long to protect from bad clients leaving open connections, and too
short for applications that need long timeout[1].

Change the default timeout to 15 seconds, configurable via
daemon:auth_timeout. This timeout is used for new unauthorized
connections. If a connection does not authorize within this timeout, it
is disconnected.

When a connection is authorized during the first request, the connection
timeout is increased to ticket.inactivity_timeout. The default value is
60 seconds, configurable via daemon:inactivity_timeout.

Application with special needs can request a larger timeout when
creating an image transfer. Engine need to include the transfer
inactivity timeout in the ticket.

[1] https://bugzilla.redhat.com/2032324

Fixes #14.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-12-20 21:13:12 +02:00
Nir Soffer
6927b03a8a examples: imageio-client: Fix --incremental
The flag was not used. Adding it allows testing incremental backup using
qemu-nbd --bitmap option.

To test incremental backup, the ticket must have the "dirty" flag. Add
it to the example nbd ticket.

Change-Id: I45d261712e94f57ebd1b5fae261083e40a5f15f8
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-07-28 11:10:38 +00:00
Nir Soffer
bb187a1651 examples: Add nbd backend example
Add nbd.json ticket using the nbd backend, and add instructions for
using the nbd backend.

These instructions will be useful for testing imageio daemon without
oVirt installation. One use case is imageio test container used by
kubevirt project[1].

nbd.json will also be useful for the other examples.

[1] https://github.com/machacekondra/imageiotest

Change-Id: Ifdaa16a5883be62b8d4dbd976727d33c8315cdba
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2020-07-07 22:12:51 +03:00