Hide Forgot
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
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)