libvirt/src/qemu
Eric Farman 33c1fc430d qemu: Remove extra messages from virtio-scsi hotplug
I tried to attach a SCSI LUN to two different guests, and forgot
to specify "shareable" in the hostdev XML.  Attaching the device
to the second guest failed, but the message was not helpful in
telling me what I was doing wrong:

  $ cat scsi_scratch_disk.xml
    <hostdev mode='subsystem' type='scsi'>
      <source>
        <adapter name='scsi_host3'/>
        <address bus='0' target='15' unit='1074151456'/>
      </source>
    </hostdev>

  $ virsh attach-device dasd_sles_d99c scsi_scratch_disk.xml
  Device attached successfully

  $ virsh attach-device dasd_fedora_0e1e scsi_scratch_disk.xml
  error: Failed to attach device from scsi_scratch_disk.xml
  error: internal error: Unable to prepare scsi hostdev: scsi_host3:0:15:1074151456

I eventually discovered my error, but thought it was weird that
Libvirt doesn't provide something more helpful in this case.
Looking over the code we had just gone through, I commented out
the "internal error" message, and got something more useful:

  $ virsh attach-device dasd_fedora_0e1e scsi_scratch_disk.xml
  error: Failed to attach device from scsi_scratch_disk.xml
  error: Requested operation is not valid: SCSI device 3:0:15:1074151456 is already in use by other domain(s) as 'non-shareable'

Looking over the error paths here, we seem to issue better
messages deeper in the callchain so these "internal error"
messages overwrite any of them.  Remove them, so that the
more detailed errors are seen.

Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>
2017-04-27 08:51:53 -04:00
..
EVENTHANDLERS.txt
libvirtd_qemu.aug conf: Introduce migrate_tls_x509_cert_dir 2017-03-25 08:19:49 -04:00
MIGRATION.txt
qemu_agent.c Fix minor typos 2017-04-24 14:40:00 +02:00
qemu_agent.h
qemu_alias.c qemu: refactor qemuDomainMachine* functions 2017-04-18 13:27:11 +02:00
qemu_alias.h
qemu_block.c qemu: take current async job into account in qemuBlockNodeNamesDetect 2017-04-27 14:38:29 +02:00
qemu_block.h qemu: take current async job into account in qemuBlockNodeNamesDetect 2017-04-27 14:38:29 +02:00
qemu_blockjob.c qemu: take current async job into account in qemuBlockNodeNamesDetect 2017-04-27 14:38:29 +02:00
qemu_blockjob.h qemu: take current async job into account in qemuBlockNodeNamesDetect 2017-04-27 14:38:29 +02:00
qemu_capabilities.c qemu: Use more data for comparing CPUs 2017-04-19 16:36:38 +02:00
qemu_capabilities.h qemu: Use more data for comparing CPUs 2017-04-19 16:36:38 +02:00
qemu_capspriv.h annotate all mocked functions with noinline 2017-04-19 10:51:51 +01:00
qemu_cgroup.c
qemu_cgroup.h
qemu_command.c Fix minor typos 2017-04-24 14:40:00 +02:00
qemu_command.h qemu: Format mdevs on qemu command line 2017-03-27 15:39:35 +02:00
qemu_conf.c qemu: conf: Don't leak 'namespaces' temporary variable while parsing config 2017-04-12 14:54:36 +02:00
qemu_conf.h conf: Introduce migrate_tls_x509_cert_dir 2017-03-25 08:19:49 -04:00
qemu_domain_address.c qemu: refactor qemuDomainMachine* functions 2017-04-18 13:27:11 +02:00
qemu_domain_address.h
qemu_domain.c Fix minor typos 2017-04-24 14:40:00 +02:00
qemu_domain.h qemu: refactor qemuDomainMachine* functions 2017-04-18 13:27:11 +02:00
qemu_driver.c qemu: take current async job into account in qemuBlockNodeNamesDetect 2017-04-27 14:38:29 +02:00
qemu_driver.h
qemu_hostdev.c qemu: Fix mdev checking for VFIO support 2017-04-12 12:57:39 +02:00
qemu_hostdev.h hostdev: Maintain a driver list of active mediated devices 2017-03-27 15:39:35 +02:00
qemu_hotplug.c qemu: Remove extra messages from virtio-scsi hotplug 2017-04-27 08:51:53 -04:00
qemu_hotplug.h qemu: hotplug: Unexport qemuDomainHotplugDelVcpu 2017-04-20 10:46:44 +02:00
qemu_hotplugpriv.h
qemu_interface.c Fix minor typos 2017-04-24 14:40:00 +02:00
qemu_interface.h
qemu_migration_cookie.c conf: add a new parse flag VIR_DOMAIN_DEF_PARSE_ABI_UPDATE_MIGRATION 2017-04-20 09:03:53 +02:00
qemu_migration_cookie.h qemu: Free persistent def inside qemuMigrationCookieFree 2017-03-27 20:55:18 +02:00
qemu_migration.c qemu: migration: fix race on cancelling drive mirror 2017-04-27 14:38:29 +02:00
qemu_migration.h qemu: Simplify qemuMigrationResetTLS 2017-04-07 13:43:37 +02:00
qemu_monitor_json.c qemu: Ignore missing query-migrate-parameters 2017-04-27 10:33:18 +02:00
qemu_monitor_json.h qemu: Check migratable host CPU features 2017-03-30 09:59:42 +02:00
qemu_monitor_text.c
qemu_monitor_text.h
qemu_monitor.c qemu: Implement qemuMonitorRegister() 2017-04-10 14:49:20 +02:00
qemu_monitor.h qemu: Implement qemuMonitorRegister() 2017-04-10 14:49:20 +02:00
qemu_parse_command.c qemu: refactor qemuDomainMachine* functions 2017-04-18 13:27:11 +02:00
qemu_parse_command.h
qemu_process.c qemu: take current async job into account in qemuBlockNodeNamesDetect 2017-04-27 14:38:29 +02:00
qemu_process.h
qemu_processpriv.h
qemu_security.c
qemu_security.h
qemu.conf qemu: Update the TLS client verify descriptions for vnc and chardev 2017-03-25 08:19:49 -04:00
test_libvirtd_qemu.aug.in conf: Introduce migrate_tls_x509_cert_dir 2017-03-25 08:19:49 -04:00
THREADS.txt