mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-02 19:31:18 +00:00
bd3e16a3cf
https://bugzilla.redhat.com/show_bug.cgi?id=1251190 So, if domain loses access to storage, sanlock tries to kill it after some timeout. So far, the default is 80 seconds. But for some scenarios this might not be enough. We should allow users to adjust the timeout according to their needs. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
(* /etc/libvirt/qemu-sanlock.conf *)
|
|
|
|
module Libvirt_sanlock =
|
|
autoload xfm
|
|
|
|
let eol = del /[ \t]*\n/ "\n"
|
|
let value_sep = del /[ \t]*=[ \t]*/ " = "
|
|
let indent = del /[ \t]*/ ""
|
|
|
|
let str_val = del /\"/ "\"" . store /[^\"]*/ . del /\"/ "\""
|
|
let bool_val = store /0|1/
|
|
let int_val = store /[0-9]+/
|
|
|
|
let str_entry (kw:string) = [ key kw . value_sep . str_val ]
|
|
let bool_entry (kw:string) = [ key kw . value_sep . bool_val ]
|
|
let int_entry (kw:string) = [ key kw . value_sep . int_val ]
|
|
|
|
|
|
(* Each enty in the config is one of the following three ... *)
|
|
let entry = str_entry "disk_lease_dir"
|
|
| bool_entry "auto_disk_leases"
|
|
| int_entry "host_id"
|
|
| bool_entry "require_lease_for_disks"
|
|
| bool_entry "ignore_readonly_and_shared_disks"
|
|
| int_entry "io_timeout"
|
|
| str_entry "user"
|
|
| str_entry "group"
|
|
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
|
|
let empty = [ label "#empty" . eol ]
|
|
|
|
let record = indent . entry . eol
|
|
|
|
let lns = ( record | comment | empty ) *
|
|
|
|
let filter = incl "/etc/libvirt/qemu-sanlock.conf"
|
|
. Util.stdexcl
|
|
|
|
let xfm = transform lns filter
|