vdsm
vdsm copied to clipboard
mpathconf: fix read_blacklist use of logging library
Currently, read_blacklist is using logging to log warnings to the console. But the function is called from the tool.config_lvm_filter module, so the logs will be hidden when using vdsm-tool.
We can fix it now and return some additional information that can be processed by the config_lvm_filter module and print the correct logs into sys.stdout.
Note that there is https://github.com/oVirt/vdsm/issues/258, which could allow passing the right logging context through a parameter as an alternate solution.
Passing a logger sounds like the right approach.