diff --git a/WHATS_NEW b/WHATS_NEW index a0f437abf..e8af54317 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.96 - ================================ + Change message severity to log_very_verbose for missing dev info in udev db. Fix problems when specifying PVs during RAID down-converts. Fix ability to handle failures in mirrored log (regression intro 2.02.89). Fix unlocking volume group in vgreduce in error path. diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c index 29a619c7d..c92e11e9e 100644 --- a/lib/device/dev-cache.c +++ b/lib/device/dev-cache.c @@ -497,7 +497,7 @@ static int _insert_udev_dir(struct udev *udev, const char *dir) { struct udev_enumerate *udev_enum = NULL; struct udev_list_entry *device_entry, *symlink_entry; - const char *node_name, *symlink_name; + const char *entry_name, *node_name, *symlink_name; struct udev_device *device; int r = 1; @@ -508,20 +508,34 @@ static int _insert_udev_dir(struct udev *udev, const char *dir) udev_enumerate_scan_devices(udev_enum)) goto bad; + /* + * Report any missing information as "log_very_verbose" only, do not + * report it as a "warning" or "error" - the record could be removed + * by the time we ask for more info (node name, symlink name...). + * Whatever removes *any* block device in the system (even unrelated + * to our operation), we would have a warning/error on output then. + * That could be misleading. If there's really any problem with missing + * information from udev db, we can still have a look at the verbose log. + */ udev_list_entry_foreach(device_entry, udev_enumerate_get_list_entry(udev_enum)) { - if (!(device = udev_device_new_from_syspath(udev, udev_list_entry_get_name(device_entry)))) { - log_warn("WARNING: udev failed to return a device entry."); + entry_name = udev_list_entry_get_name(device_entry); + + if (!(device = udev_device_new_from_syspath(udev, entry_name))) { + log_very_verbose("udev failed to return a device for entry %s.", + entry_name); continue; } if (!(node_name = udev_device_get_devnode(device))) - log_warn("WARNING: udev failed to return a device node."); + log_very_verbose("udev failed to return a device node for entry %s.", + entry_name); else r &= _insert(node_name, 0, 0); udev_list_entry_foreach(symlink_entry, udev_device_get_devlinks_list_entry(device)) { if (!(symlink_name = udev_list_entry_get_name(symlink_entry))) - log_warn("WARNING: udev failed to return a symlink name."); + log_very_verbose("udev failed to return a symlink name for entry %s.", + entry_name); else r &= _insert(symlink_name, 0, 0); }