Bug 1448766
| Summary: | When the vm name is non-acsii, and the truncation happens to be on a multi-byte character, then vm will be unmanaged after daemon restarted. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Lili Zhu <lizhu> |
| Component: | libvirt | Assignee: | Martin Kletzander <mkletzan> |
| Status: | CLOSED ERRATA | QA Contact: | Lili Zhu <lizhu> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.4 | CC: | dyuan, fjin, rbalakri, xuzhang, yafu, yanqzhan |
| Target Milestone: | rc | Keywords: | Upstream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-3.7.0-1.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-04-10 10:43: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
Lili Zhu
2017-05-08 03:15:25 UTC
Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2017-August/msg00636.html Fixed upstream with v3.6.0-229-g5102be52d869:
commit 5102be52d8699a5200f25091de2d25afe3841d6d
Author: Martin Kletzander <mkletzan>
Date: Wed Aug 23 13:18:19 2017 +0200
conf: Properly truncate wide character names in virDomainObjGetShortName
Reproduced this bug with libvirt-3.2.0-14.el7_4.3.x86_64
Test steps are as following:
1. start a guest, whose name consisting of multi-byte characters
# virsh list --all
Id Name State
----------------------------------------------------
3 1234567890123456789č running
2. Check the length of the domain name and the last character
# expr length 1234567890123456789č
21
# expr length č
2
3. Check the truncated name
# virsh dumpxml 1234567890123456789č
....
<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-1-1234567890123456789�/org.qemu.guest_agent.0'/> <==The guest name is not properly truncated
....
</channel>
....
4. restart libvirtd
# systemctl restart libvirtd
5. Check the state of the vm
# virsh list --all
Id Name State
----------------------------------------------------
- 1234567890123456789č shut off
Verify this bug with libvirt-3.8.0-1.el7.x86_64
Test steps are as following:
1. start a guest, whose name consisting of multi-byte characters
# virsh list --all
Id Name State
----------------------------------------------------
1 1234567890123456789č running
2. restart libvirtd
[root@ibm-x3850x5-08 ~]# systemctl restart libvirtd
3. check the state of the guest
[root@ibm-x3850x5-08 ~]# virsh list --all
Id Name State
----------------------------------------------------
3 1234567890123456789č running
4. Check the truncated name of the vm
# virsh dumpxml 1234567890123456789č
....
<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-9-1234567890123456789č/org.qemu.guest_agent.0'/> <==The guest name is properly truncated
....
</channel>
....
Since the result match with the expected result, mark it as verified
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://access.redhat.com/errata/RHEA-2018:0704 |