Bug 1281706

Summary: virsh domcontrol will show different result to a inactive guest
Product: Red Hat Enterprise Linux 7 Reporter: Luyao Huang <lhuang>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: dyuan, rbalakri
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-1.3.3-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 18:30:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luyao Huang 2015-11-13 08:11:34 UTC
Description of problem:
virsh domcontrol will show different result to a inactive guest

Version-Release number of selected component (if applicable):
libvirt-1.2.17-13.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. prepare a inactive guest:

# virsh dominfo RHEL71-lhuang-novhost
Id:             -
Name:           RHEL71-lhuang-novhost
UUID:           c8c96ca2-adb3-4166-ae97-f97f8b497e13
OS Type:        hvm
State:          shut off
CPU(s):         4
Max memory:     2097152 KiB
Used memory:    0 KiB
Persistent:     yes
Autostart:      disable
Managed save:   no
Security model: selinux
Security DOI:   0


2. use domcontrol to check this guest:

#  virsh domcontrol RHEL71-lhuang-novhost
ok

3. start guest but get failure:

# virsh start RHEL71-lhuang-novhost
error: Failed to start domain RHEL71-lhuang-novhost
error: internal error: early end of file from monitor: possible problem:
2015-11-13T08:06:46.615242Z qemu-kvm: -object memory-backend-file,id=ram-node2,prealloc=yes,mem-path=/dev/hugepages2M/libvirt/qemu,share=yes,size=0,host-nodes=0-1,policy=bind: Property 'memory-backend-file.size' doesn't take value '0'


4. try domcontrol again:

#  virsh domcontrol RHEL71-lhuang-novhost
error: monitor failure

#  virsh domcontrol RHEL71-lhuang-novhost
error: monitor failure

5. restart libvirtd and recheck:

# service libvirtd restart
Redirecting to /bin/systemctl restart  libvirtd.service

#  virsh domcontrol RHEL71-lhuang-novhost
ok

Actual results:

virsh domcontrol will show different result to a inactive guest

Expected results:

although guest fail to start but it doesn't mean the current (inactive) guest always have the monitor failure (also i don't think show monitor failure to a inactive geust is ok), both of them should show ok

Additional info:

Comment 1 Jiri Denemark 2016-03-03 13:11:02 UTC
Fixed upstream by v1.3.2-59-ge53f2dc:

commit e53f2dc875f5c4865a37a2bd936858f45b23ee8e
Author:     Jiri Denemark <jdenemar>
AuthorDate: Thu Mar 3 13:26:51 2016 +0100
Commit:     Jiri Denemark <jdenemar>
CommitDate: Thu Mar 3 13:26:51 2016 +0100

    qemu: Check if domain is active in GetControlInfo
    
    Reporting status of a control connection makes no sense for an inactive
    domain.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1281706
    
    Signed-off-by: Jiri Denemark <jdenemar>

Comment 2 Mike McCune 2016-03-28 22:45:31 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 4 Luyao Huang 2016-08-09 03:42:41 UTC
Verify this bug with libvirt-2.0.0-4.el7.x86_64:

1. prepare a inactive guest:

# virsh dominfo r7
Id:             -
Name:           r7
UUID:           67c7a123-5415-4136-af62-a2ee098ba6cd
OS Type:        hvm
State:          shut off
CPU(s):         6
Max memory:     1179648 KiB
Used memory:    1179648 KiB
Persistent:     yes
Autostart:      disable
Managed save:   no
Security model: selinux
Security DOI:   0

2. check domcontrol output:

# virsh domcontrol r7
error: Requested operation is not valid: domain is not running

Comment 6 errata-xmlrpc 2016-11-03 18:30:32 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