[libvirt] [PATCH] Transform VIR_ERROR into VIR_WARN in detect_scsi_host_caps

If detect_scsi_host_caps reports errors but keeps libvirtd going on startup, the user is mislead by the error messages. Transforming them into warning still shows the problems, but indicates this is not fatal. --- po/POTFILES.in | 1 - src/node_device/node_device_linux_sysfs.c | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 89c6a44..1439ae4 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -92,7 +92,6 @@ src/network/bridge_driver_linux.c src/network/leaseshelper.c src/node_device/node_device_driver.c src/node_device/node_device_hal.c -src/node_device/node_device_linux_sysfs.c src/node_device/node_device_udev.c src/nodeinfo.c src/nwfilter/nwfilter_dhcpsnoop.c diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c index be95e51..4a95b2b 100644 --- a/src/node_device/node_device_linux_sysfs.c +++ b/src/node_device/node_device_linux_sysfs.c @@ -62,7 +62,7 @@ detect_scsi_host_caps(union _virNodeDevCapData *d) d->scsi_host.host, "port_name", &d->scsi_host.wwpn) < 0) { - VIR_ERROR(_("Failed to read WWPN for host%d"), d->scsi_host.host); + VIR_WARN("Failed to read WWPN for host%d", d->scsi_host.host); goto cleanup; } @@ -70,7 +70,7 @@ detect_scsi_host_caps(union _virNodeDevCapData *d) d->scsi_host.host, "node_name", &d->scsi_host.wwnn) < 0) { - VIR_ERROR(_("Failed to read WWNN for host%d"), d->scsi_host.host); + VIR_WARN("Failed to read WWNN for host%d", d->scsi_host.host); goto cleanup; } @@ -78,8 +78,8 @@ detect_scsi_host_caps(union _virNodeDevCapData *d) d->scsi_host.host, "fabric_name", &d->scsi_host.fabric_wwn) < 0) { - VIR_ERROR(_("Failed to read fabric WWN for host%d"), - d->scsi_host.host); + VIR_WARN("Failed to read fabric WWN for host%d", + d->scsi_host.host); goto cleanup; } } @@ -91,8 +91,8 @@ detect_scsi_host_caps(union _virNodeDevCapData *d) d->scsi_host.host, "max_npiv_vports", &max_vports) < 0) { - VIR_ERROR(_("Failed to read max_npiv_vports for host%d"), - d->scsi_host.host); + VIR_WARN("Failed to read max_npiv_vports for host%d", + d->scsi_host.host); goto cleanup; } @@ -100,22 +100,22 @@ detect_scsi_host_caps(union _virNodeDevCapData *d) d->scsi_host.host, "npiv_vports_inuse", &vports) < 0) { - VIR_ERROR(_("Failed to read npiv_vports_inuse for host%d"), - d->scsi_host.host); + VIR_WARN("Failed to read npiv_vports_inuse for host%d", + d->scsi_host.host); goto cleanup; } if (virStrToLong_i(max_vports, NULL, 10, &d->scsi_host.max_vports) < 0) { - VIR_ERROR(_("Failed to parse value of max_npiv_vports '%s'"), + VIR_WARN("Failed to parse value of max_npiv_vports '%s'", max_vports); goto cleanup; } if (virStrToLong_i(vports, NULL, 10, &d->scsi_host.vports) < 0) { - VIR_ERROR(_("Failed to parse value of npiv_vports_inuse '%s'"), - vports); + VIR_WARN("Failed to parse value of npiv_vports_inuse '%s'", + vports); goto cleanup; } } -- 1.8.4.5

On 11/04/2014 03:15 PM, Cédric Bosdonnat wrote:
If detect_scsi_host_caps reports errors but keeps libvirtd going on startup, the user is mislead by the error messages. Transforming them
s/mislead/misled/
into warning still shows the problems, but indicates this is not fatal. --- po/POTFILES.in | 1 - src/node_device/node_device_linux_sysfs.c | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-)
ACK. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Fri, 2014-11-07 at 10:31 +0100, Eric Blake wrote:
On 11/04/2014 03:15 PM, Cédric Bosdonnat wrote:
If detect_scsi_host_caps reports errors but keeps libvirtd going on startup, the user is mislead by the error messages. Transforming them
s/mislead/misled/
into warning still shows the problems, but indicates this is not fatal. --- po/POTFILES.in | 1 - src/node_device/node_device_linux_sysfs.c | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-)
ACK.
Pushed with the grammar fix. Thanks -- Cedric
participants (3)
-
Cedric Bosdonnat
-
Cédric Bosdonnat
-
Eric Blake