]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: always generate the same alias for tls-creds-x509 object
authorPavel Hrdina <phrdina@redhat.com>
Tue, 18 Oct 2016 13:33:00 +0000 (15:33 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 18 Oct 2016 15:01:26 +0000 (17:01 +0200)
commitdf93b5f5f53da7eb607da09862dadfcb140ada1e
treed6e8f3d363da47dd55824c217f25b983b6e5ae7d
parent635b5ec8e8123b3954a2eb957114d3dbed8d1ab9
qemu: always generate the same alias for tls-creds-x509 object

There was inconsistency between alias used to create tls-creds-x509
object and alias used to link that object to chardev while hotpluging.
Hotplug ends with this error:

  error: Failed to detach device from channel-tcp.xml
  error: internal error: unable to execute QEMU command 'chardev-add':
  No TLS credentials with id 'objcharchannel3_tls0'

In XML we have for example alias "serial0", but on qemu command line we
generate "charserial0".

The issue was that code, that creates QMP command to hotplug chardev
devices uses only the second alias "charserial0" and that alias is also
used to link the tls-creds-x509 object.

This patch unifies the aliases for tls-creds-x509 to be always generated
from "charserial0".

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_command.c
src/qemu/qemu_hotplug.c
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev-verify.args
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev.args