Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1366484 - libvirt report unknown error when iothreadsched point to not exist iothread
Summary: libvirt report unknown error when iothreadsched point to not exist iothread
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: All
low
low
Target Milestone: rc
: ---
Assignee: John Ferlan
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-12 06:16 UTC by Luyao Huang
Modified: 2016-11-03 18:52 UTC (History)
5 users (show)

Fixed In Version: libvirt-2.0.0-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:52:26 UTC


Attachments (Terms of Use)


Links
System 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 12:07:06 UTC

Description Luyao Huang 2016-08-12 06:16:40 UTC
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 14:57:46 UTC
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 15:34:21 UTC
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 11:10:29 UTC
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 18:52:26 UTC
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.