Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1366484 - libvirt report unknown error when iothreadsched point to not exist iothread
libvirt report unknown error when iothreadsched point to not exist iothread
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.3
x86_64 All
low Severity low
: rc
: ---
Assigned To: John Ferlan
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-12 02:16 EDT by Luyao Huang
Modified: 2016-11-03 14:52 EDT (History)
5 users (show)

See Also:
Fixed In Version: libvirt-2.0.0-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:52:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 08:07:06 EDT

  None (edit)
Description Luyao Huang 2016-08-12 02:16:40 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:
Comment 1 John Ferlan 2016-08-15 10:57:46 EDT
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'/>
...
Comment 2 John Ferlan 2016-08-16 11:34:21 EDT
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
Comment 5 yalzhang@redhat.com 2016-08-30 07:10:29 EDT
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,?]:
Comment 7 errata-xmlrpc 2016-11-03 14:52:26 EDT
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

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