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 qemu: add short document on qemu event handlers 2014-10-06 13:50:57 -04:00
libvirtd_qemu.aug conf: Introduce migrate_tls_x509_cert_dir 2017-03-25 08:19:49 -04:00
MIGRATION.txt doc: fix writing of QEMU 2017-03-08 17:33:07 +01:00
qemu_agent.c Fix minor typos 2017-04-24 14:40:00 +02:00
qemu_agent.h qemu: agent: Make setting of vcpus more robust 2016-06-22 09:26:08 +02:00
qemu_alias.c qemu: refactor qemuDomainMachine* functions 2017-04-18 13:27:11 +02:00
qemu_alias.h qemu: Rename qemuAliasTLSObjFromChardevAlias 2017-02-22 06:31:40 -05:00
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: Allow nvdimm in devices CGroups 2017-03-15 16:55:30 +01:00
qemu_cgroup.h qemu: Allow nvdimm in devices CGroups 2017-03-15 16:55:30 +01:00
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: propagate virQEMUDriver object to qemuDomainDeviceCalculatePCIConnectFlags 2016-11-30 15:28:07 -05:00
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 Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
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: Let tests override waiting time for device unplug 2013-08-26 16:09:55 +02:00
qemu_interface.c Fix minor typos 2017-04-24 14:40:00 +02:00
qemu_interface.h qemu: propagate bridge MTU into qemu "host_mtu" option 2017-02-07 14:02:19 -05:00
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: catch failure of drive_add 2017-01-19 10:56:53 +00:00
qemu_monitor_text.h qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs 2016-08-24 15:44:47 -04:00
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: parse: rename qemuCaps->caps 2016-02-19 09:45:23 -05:00
qemu_process.c qemu: take current async job into account in qemuBlockNodeNamesDetect 2017-04-27 14:38:29 +02:00
qemu_process.h qemu: Use proper async job to refresh virtio channels 2016-06-30 09:41:39 +02:00
qemu_processpriv.h qemu: Export qemuProcessHandleDeviceDeleted for tests 2013-08-26 16:09:55 +02:00
qemu_security.c qemu_hotplug: Relabel memdev 2017-03-15 16:55:23 +01:00
qemu_security.h qemu_hotplug: Relabel memdev 2017-03-15 16:55:23 +01:00
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 doc: fix writing of QEMU 2017-03-08 17:33:07 +01:00