Bug 928197
| Summary: | virsh domfstrim will get uncorrelated error | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | EricLee <bili> |
| Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | acathrow, cwei, dyuan, mzhan |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-1.0.5-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-13 12:46:41 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: | |||
Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2013-April/msg00131.html Moving to POST:
commit deb86ee9123ef47dce80dd77a9bc583f2b0214db
Author: Michal Privoznik <mprivozn>
AuthorDate: Tue Apr 2 17:18:30 2013 +0200
Commit: Michal Privoznik <mprivozn>
CommitDate: Tue Apr 2 17:36:06 2013 +0200
virsh: Call virDomainFree in cmdDomFSTrim
https://bugzilla.redhat.com/show_bug.cgi?id=928197
The virsh domfstrim command was not freeing allocated domain,
leaving leaked references behind.
v1.0.4-19-gdeb86ee
Verified pass in libvirt-1.0.5-1.el7.x86_64:
# virsh dumpxml r7
....
<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/r7.agent'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<alias name='channel1'/>
<address type='virtio-serial' controller='0' bus='0' port='2'/>
</channel>
....
# virsh domfstrim r7
# echo $?
0
No error like:
error: Failed to disconnect from the hypervisor, 1 leaked
reference(s)
Setting VERIFIED.
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |
Description of problem: virsh domfstrim will get uncorrelated error Version-Release number of selected component (if applicable): # rpm -qa libvirt qemu-kvm virt-manager kernel kernel-3.7.0-0.36.el7.x86_64 virt-manager-0.9.4-4.el7.noarch libvirt-1.0.3-1.el7.x86_64 qemu-kvm-1.4.0-1.el7.x86_64 Reproduce steps: 1. prepare a guest with qemu-guest-agent installed and start the qemu-guest-agent.service, guest xml should include: <channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/r7.agent'/> <target type='virtio' name='org.qemu.guest_agent.0'/> <alias name='channel0'/> <address type='virtio-serial' controller='0' bus='0' port='2'/> </channel> 2. # virsh domfstrim r7 error: Failed to disconnect from the hypervisor, 1 leaked reference(s) # echo $? 0 From # virsh help domfstrim ... SYNOPSIS domfstrim <domain> [--minimum <number>] [<mountpoint>] ... We can see those two options are both not requisite, and should have default values if needed, furthermore the error info is indeed uncorrelated and unnecessary. And we can see from # man virsh ... domfstrim domain [--minimum bytes] [--mountpoint mountPoint] Issue a fstrim command on all mounted filesystems within a running domain. It discards blocks which are not in use by the filesystem. If --minimum bytes is specified, it tells guest kernel length of contiguous free range. Smaller than this may be ignored (this is a hint and the guest may not respect it). By increasing this value, the fstrim operation will complete more quickly for filesystems with badly fragmented free space, although not all blocks will be discarded. The default value is zero, meaning "discard every free block". Moreover, a if user wants to trim only one mount point, it can be specified via optional --mountpoint ---there is a typeset error here "a if user" parameter. ... There is a default value zero for "--minimum" and if user wants to trim only one mount point, then can add --mountpoint. Actual results: As steps. Expected results: Step 2 should not get that uncorrelated error. Additional info: