libvirt/src/locking
Jim Fehlig de1e0ae0e3 virtlockd: Don't report error if lockspace exists
When the qemu or libxl driver is configured to use lockd and
file_lockspace_dir is set, virtlockd emits an error when libvirtd
is retarted

May 25 15:44:31 virt81 virtlockd[7723]: Requested operation is not
valid: Lockspace for path /data/libvirtd/lockspace already exists

There is really no need to fail when the lockspace already exists,
paricularly since the user is expected to create the lockspace
specified in file_lockspace_dir. Failure to do so will prevent
starting any domains

virsh start test
error: Failed to start domain 'test'
error: Unable to open/create resource /data/libvirtd/lockspace/de22c4bf931e7c48b49e8ca64b477d44e78a51543e534df488b05ccd08ec5caa: No such file or directory

Also, virLockManagerLockDaemonSetupLockspace already has logic to ignore
the error. Since callers are not interested in the error, change
virtlockd to not report or return an error when the specified lockspace
already exists.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2021-07-07 09:40:38 -06:00
..
domain_lock.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
domain_lock.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
libvirt_lockd.aug src: fix word spell typos 2020-07-09 10:01:41 +02:00
libvirt_sanlock.aug src: fix word spell typos 2020-07-09 10:01:41 +02:00
lock_daemon_config.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_daemon_config.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_daemon_dispatch.c virtlockd: Don't report error if lockspace exists 2021-07-07 09:40:38 -06:00
lock_daemon_dispatch.h
lock_daemon.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_daemon.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_driver_lockd.c virtlockd: Don't report error if lockspace exists 2021-07-07 09:40:38 -06:00
lock_driver_lockd.h
lock_driver_nop.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_driver_nop.h
lock_driver_sanlock.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_driver.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_manager.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_manager.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lock_protocol.x
lockd.conf
meson.build meson: Whitespace tweaks 2021-06-01 14:30:39 +02:00
sanlock_helper.c Remove use of variables passed only to 'VIR_FREE' 2020-06-15 10:27:37 +02:00
sanlock.conf
test_libvirt_lockd.aug.in build: use @CONFIG@ instead of ::CONFIG:: in augeas tests 2019-08-09 14:06:31 +01:00
test_libvirt_sanlock.aug.in build: use @CONFIG@ instead of ::CONFIG:: in augeas tests 2019-08-09 14:06:31 +01:00
test_virtlockd.aug.in build: use @CONFIG@ instead of ::CONFIG:: in augeas tests 2019-08-09 14:06:31 +01:00
virtlockd-admin.socket.in systemd: honour $runstatedir in socket unit files 2019-08-27 10:23:05 +01:00
virtlockd.aug src: fix word spell typos 2020-07-09 10:01:41 +02:00
virtlockd.conf util: drop support for stack traces with logging 2019-10-18 16:25:17 +01:00
virtlockd.init.in Add virtlockd and virtlogd init scripts 2020-02-22 17:11:54 +01:00
virtlockd.service.in src: fix misc spelling errors reported by codespell 2020-10-05 10:28:41 +01:00
virtlockd.socket.in systemd: honour $runstatedir in socket unit files 2019-08-27 10:23:05 +01:00
virtlockd.sysconf systemd: Tweak existing sysconf files 2020-04-03 11:50:35 +02:00