Red Hat Bugzilla – Bug 1366484
libvirt report unknown error when iothreadsched point to not exist iothread
Last modified: 2016-11-03 14:52:26 EDT
Description of problem: libvirt report unknown error when iothreadsched point to not exist iothread Version-Release number of selected component (if applicable): libvirt-2.0.0-5.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. add a iothreadsched and iothread not exist # virsh edit r7 <vcpu placement='static' current='6'>10</vcpu> <cputune> <iothreadsched iothreads='1-2' scheduler='idle'/> </cputune> error: An error occurred, but the cause is unknown Failed. Try again? [y,n,i,f,?]: 2. 3. Actual results: error: An error occurred, but the cause is unknown Failed. Try again? [y,n,i,f,?]: Expected results: error: unsupported configuration: iothread '1' is not present in domain definition Failed. Try again? [y,n,i,f,?]: Additional info:
Posted a patch upstream to provide (restore) an error message lost in a previous change, see series http://www.redhat.com/archives/libvir-list/2016-August/msg00752.html in particular patch 1. NB: Patch 2 restores the message for a similar problem with vcpusched and trying to edit to add: ... <vcpu placement='static' current='2'>4</vcpu> ... <vcpusched vcpus='7-8' scheduler='idle'/> ...
Changes for this bz (patch 1) have been pushed upstream: commit 8c6b29e7b41d678ab9c5542efd607b28776e4f24 Author: John Ferlan <jferlan@redhat.com> Date: Mon Aug 15 09:45:28 2016 -0400 conf: Provide error on undefined iothreadsched entry When commit id '6dfb4507' refactored where the iothreadsched data was stored, the error message for when the virDomainIOThreadIDFind failed to find an iothreadid ("iothreadsched attribute 'iothreads' uses undefined iothread ids") was lost. This led to the possibility that someone would try to use it, but receive the generic message "An error occurred, but the cause is unknown". This patch adds the error message back so that someone will know that they have an invalid configuration. Signed-off-by: John Ferlan <jferlan@redhat.com> git describe 8c6b29e7b41d678ab9c5542efd607b28776e4f24 v2.1.0-143-g8c6b29e
Test on libvirt-2.0.0-6.el7.x86_64, the result is as expected, set it to verified. 1. no <iothreads> defined, but below iothreadsched added into the xml # virsh edit rhel7.2 <cputune> <iothreadsched iothreads='1' scheduler='idle'/> </cputune> error: unsupported configuration: Cannot find 'iothread' : 1 Failed. Try again? [y,n,i,f,?]: ====> press 'i' error: unsupported configuration: Cannot find 'iothread' : 1 Failed. Try again? [y,n,f,?]: 2. outside of the range # virsh edit rhel7.2 <iothreads>1</iothreads> <cputune> <iothreadsched iothreads='2' scheduler='idle'/> </cputune> error: unsupported configuration: Cannot find 'iothread' : 2 Failed. Try again? [y,n,i,f,?]: 3. # virsh edit rhel7.2 <vcpu placement='static'>4</vcpu> ...... <cputune> <vcpusched vcpus='4' scheduler='fifo' priority='1'/> </cputune> error: unsupported configuration: vCPU '4' is not present in domain definition Failed. Try again? [y,n,i,f,?]: ====> press 'i' error: unsupported configuration: vCPU '4' is not present in domain definition Failed. Try again? [y,n,f,?]:
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2577.html