RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1281706 - virsh domcontrol will show different result to a inactive guest
Summary: virsh domcontrol will show different result to a inactive guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-13 08:11 UTC by Luyao Huang
Modified: 2016-11-03 18:30 UTC (History)
2 users (show)

Fixed In Version: libvirt-1.3.3-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:30:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

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


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