Permalink
Browse files

fixes #278 multipath: allow devices to override defaults

  • Loading branch information...
1 parent 0bcd1d8 commit 3c1a427693b8197ec85fe1928f0ad284b4d3604d @jmccann jmccann committed with Aug 23, 2012
Showing with 22 additions and 16 deletions.
  1. +19 −15 lenses/multipath.aug
  2. +3 −1 lenses/tests/test_multipath.aug
View
34 lenses/multipath.aug
@@ -46,31 +46,35 @@ let common_setting =
|kv "no_path_retry" (Rx.integer | /fail|queue/)
|kv "rr_min_io" Rx.integer
+let default_setting =
+ kv "polling_interval" Rx.integer
+ |kv "udev_dir" Rx.fspath
+ |qstr "selector"
+ |kv "user_friendly_names" /yes|no/
+ |kv "dev_loss_tmo" Rx.integer
+ |kv "fast_io_fail_tmo" Rx.integer
+ |kv "verbosity" /[0-6]/
+ |kv "reassign_maps" /yes|no/
+ (* These are not in the manpage but in the example multipath.conf *)
+ |kv "prio" Rx.word
+ |kv "max_fds" Rx.integer
+ (* SUSE extensions *)
+ |kv "async_timeout" Rx.integer
+ |kv "max_polling_interval" Rx.integer
+
(* A device subsection *)
let device =
let setting =
qstr /vendor|product|product_blacklist|hardware_handler/
- |common_setting in
+ |common_setting
+ |default_setting in
section "device" setting
(* The defaults section *)
let defaults =
let setting =
common_setting
- |kv "polling_interval" Rx.integer
- |kv "udev_dir" Rx.fspath
- |qstr "selector"
- |kv "user_friendly_names" /yes|no/
- |kv "dev_loss_tmo" Rx.integer
- |kv "fast_io_fail_tmo" Rx.integer
- |kv "verbosity" /[0-6]/
- |kv "reassign_maps" /yes|no/
- (* These are not in the manpage but in the example multipath.conf *)
- |kv "prio" Rx.word
- |kv "max_fds" Rx.integer
- (* SUSE extensions *)
- |kv "async_timeout" Rx.integer
- |kv "max_polling_interval" Rx.integer
+ |default_setting
in section "defaults" setting
(* The blacklist and blacklist_exceptions sections *)
View
4 lenses/tests/test_multipath.aug
@@ -84,6 +84,7 @@ devices {
vendor \"COMPAQ \"
product \"MSA1000 \"
path_grouping_policy multibus
+ polling_interval 9
}
}\n"
@@ -162,4 +163,5 @@ test Multipath.lns get conf =
{ "device"
{ "vendor" = "COMPAQ " }
{ "product" = "MSA1000 " }
- { "path_grouping_policy" = "multibus" } } }
+ { "path_grouping_policy" = "multibus" }
+ { "polling_interval" = "9" } } }

0 comments on commit 3c1a427

Please sign in to comment.