Bug 1370418 - Improve Error information when doesn't find node device or multiple devices are found
Summary: Improve Error information when doesn't find node device or multiple devices a...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: x86_64
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-26 09:28 UTC by Xiaodai Wang
Modified: 2017-03-29 18:22 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-29 18:22:15 UTC


Attachments (Terms of Use)

Description Xiaodai Wang 2016-08-26 09:28:10 UTC
Description of problem:
Improve Error information when doesn't find node device or multiple devices are found.

Version-Release number of selected component (if applicable):
virt-install-1.4.0-1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
# virt-install --name test --memory 2048 --disk path=/var/lib/libvirt/images/test.img,size=5 --location http://download.eng.pek2.redhat.com//pub/rhel/released/RHEL-7/7.2/Server/x86_64/os/ --hostdev 15e1:2007
ERROR    Error: --hostdev 15e1:2007: Did not find node device matching '15e1:2007': 15e1:2007 corresponds to multiple node devices
[root@xiaodwan-test-7 images]# virt-install --name test --memory 2048 --disk path=/var/lib/libvirt/images/test.img,size=5 --location http://download.eng.pek2.redhat.com//pub/rhel/released/RHEL-7/7.2/Server/x86_64/os/ --hostdev 15e1:2008
ERROR    Error: --hostdev 15e1:2008: Did not find node device matching '15e1:2008': Did not find a matching node device for '15e1:2008'

Actual results:
"Did not find node device matching '15e1:2008" is redundant when did not find a matching node and is error when multiple node dicevices are found.

Expected results:
It's better to remove the "Did not find node device matching '15e1:200'" and only keep the last part is enough.

For example:
Error: --hostdev 15e1:2008: Did not find a matching node device for '15e1:2008'
Error: --hostdev 15e1:2007: 15e1:2007 corresponds to multiple node device

Additional info

Comment 2 Cole Robinson 2017-03-29 18:22:15 UTC
Thanks for the report, fixed upstream now

commit f341352cdadeadedab1579d1759ed1387aa28c75
Author: Cole Robinson <crobinso>
Date:   Wed Mar 29 14:09:35 2017 -0400

    nodedev: Remove redundant error string (bz #1370418)


Note You need to log in before you can comment on or make changes to this bug.