Bug 1285720

Summary: machined reports Invalid machine name when CreateMachine called with properly escaped name
Product: Red Hat Enterprise Linux 7 Reporter: Martin Kletzander <mkletzan>
Component: systemdAssignee: Michal Sekletar <msekleta>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.2CC: berrange, bugproxy, clalancette, cristiandeives, danken, dyuan, extras-qa, itamar, jdenemar, jforbes, jherrman, jscotka, jsuchane, lagarcia, laine, libvirt-maint, michal.skrivanek, msekleta, mzamazal, rbalakri, shaohef, systemd-maint-list, veillard, virt-bugs, yafu
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In a prior update, systemd introduced strict requirements for machine names. As an unintended effect, this caused starting virtual domains with non-ASCII characters in their name or with a long name to fail. With this update, libvirt introduces an escaping mechanism that allows such virtual machines to start as expected.
Story Points: ---
Clone Of: 1282846 Environment:
Last Closed: 2016-02-16 09:48:06 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:
Bug Depends On:    
Bug Blocks: 1260131, 1282846, 1289485    

Description Martin Kletzander 2015-11-26 10:35:52 UTC
libvirt does not yet have its fix incorporated, but it can be tested by creating libvirt machine with unicode name already escaped.

+++ This bug was initially created as a clone of Bug #1282846 +++

Apparently this bug has propagated to el7 and now affects RHEV-3.5 and 3.6 when deployed over RHEL-7. I assume it would block live migration of VMs with non-ascii names from el6 to el7 (which is an important feature of RHEV-3.5).

+++ This bug was initially created as a clone of Bug #1062943 +++

Description of problem:
libvirt can define and undefine a VM with a non-ACSII char name.
but it can not start this VM.

Version-Release number of selected component (if applicable):
$ libvirtd --version
libvirtd (libvirt) 1.1.3.2

How reproducible:
create a VM with with a non-ACSII chars name, such as "kīмсhī-∨м" and start this VM.

Steps to Reproduce:
1. define a VM with a non-ACSII chars name. we can define it by virsh.
2. start this VM.
3. undefine this VM.

Actual results:
failed to start VM for invalid argument.


Expected results:
it should start the VM successfully.

Additional info:

the libvirtd.log report
2014-02-09 03:05:35.001+0000: 11376: error : virDBusCallMethod:1173 : Invalid argument

/var/log/libvirt/qemu/kīмсhī-∨м.log reports
2014-02-08 15:31:03.391+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -name kīмсhī-∨м -S -machine pc-i440fx-1.6,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 6e8233dd-0c00-4c78-b4a6-bffcd1ced26c -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/kīмсhī-∨м.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=25,id=hostnet0 -device e1000,netdev=hostnet0,id=net0,mac=52:54:00:3f:27:31,bus=pci.0,addr=0x3 -vnc 0.0.0.0:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
2014-02-08 15:31:03.398+0000libvirt:  error : libvirtd quit during handshake: Input/output error

[...]
--- Additional comment from Martin Kletzander on 2015-11-26 05:23:56 EST ---

I managed to fix this fact (intentionally not saying bug, because why couldn't we talk in utf-8 in 21st century) in libvirt, but it still didn't work.  After discussion with systemd engineers, there's also bug in machined, so I'm cloning this BZ for systemd to make sure both issues are fixed.

Comment 2 Michal Sekletar 2015-12-14 13:51:06 UTC
I am still working on the patch, it should be posted upstream this week. Same patch set will also address limitation described in #1289363. Backport for RHEL-7 should be ready for next z-stream batch.

Comment 6 Michal Sekletar 2016-01-25 12:42:20 UTC
It has been decided upstream that our current policy will not change. Hence, valid machine name must be valid hostname and machined clients must cope with this fact appropriately, e.g using IDNA encoding for internationalized machine names.

Comment 11 Lukáš Nykrýn 2016-02-16 09:48:06 UTC
There will be no fix on the systemd side, libvirt will start using more hostname-ish names.