libvirt/tools
Luyao Huang 70f56dd72c virsh: Reset global error after successfull domain lookup
When looking up a domain, we try to look up by ID, UUID and NAME
consequently while not really caring which of those lookups succeeds.
The problem is that if any of them fails, we dispatch the error from the
driver and that means setting both threadlocal and global error. Let's
say the last lookup (by NAME) succeeds and resets the threadlocal error as any
other API does, however leaving the global error unchanged. If the underlying
virsh command does not succeed afterwards, our cleanup routine in
vshCommandRun ensures that no libvirt error will be forgotten and that's
exactly where this global error comes in incorrectly.

 # virsh domif-setlink 123 vnet1 up
 error: interface (target: vnet1) not found
 error: Domain not found: no domain with matching id 123

This patch also resets the global error which would otherwise cause some
minor confusion in reported error messages.

https://bugzilla.redhat.com/show_bug.cgi?id=1254152

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Erik Skultety <eskultet@redhat.com>
2015-08-18 14:54:45 +02:00
..
wireshark Fix common misspellings 2015-03-23 09:01:30 +01:00
libvirt_win_icon_16x16.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_32x32.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_48x48.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_64x64.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt-guests.init.in tools: Only install guests init script if --with-init=script=redhat 2012-12-11 19:54:37 -05:00
libvirt-guests.service.in libvirt-guests: run after time-sync.target 2014-09-23 14:35:43 -06:00
libvirt-guests.sh.in libvirt-guests: Initialize SYNC_TIME 2015-05-12 08:53:14 +02:00
libvirt-guests.sysconf libvirt-guests: Allow time sync on guests resume 2015-02-23 08:49:21 +01:00
Makefile.am tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh_win_icon.rc Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
virsh-console.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-console.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-domain-monitor.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-domain-monitor.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-domain.c virsh: Reset global error after successfull domain lookup 2015-08-18 14:54:45 +02:00
virsh-domain.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-edit.c virsh-edit: Make force editing usable 2015-02-20 07:46:54 +01:00
virsh-host.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-host.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-interface.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-interface.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-network.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-network.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-nodedev.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-nodedev.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-nwfilter.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-nwfilter.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-pool.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-pool.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-secret.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-secret.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-snapshot.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-snapshot.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-volume.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh-volume.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh.c tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00
virsh.pod virsh: Implement "domrename" command 2015-08-14 10:50:20 +02:00
virt-host-validate-common.c maint: avoid static zero init in tools 2014-10-29 09:55:09 -06:00
virt-host-validate-common.h maint: Prohibit "devname" by a syntax check rules 2014-10-01 16:39:01 +02:00
virt-host-validate-lxc.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate-lxc.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate-qemu.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate-qemu.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate.c Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
virt-login-shell.c Resolve Coverity CHECKED_RETURN 2014-09-15 10:44:27 -04:00
virt-login-shell.conf Introduce a virt-login-shell binary 2013-08-08 16:36:31 +01:00
virt-login-shell.pod virt-login-shell: saner exit value 2014-03-03 12:40:32 -07:00
virt-pki-validate.in virt-pki-validate: add --help/--version option 2013-08-19 20:25:53 -06:00
virt-sanlock-cleanup.in virt-sanlock-cleanup; Fix augtool usage 2013-08-28 13:50:10 +02:00
virt-xml-validate.in tools: add missing 'interface' type and update man page 2013-09-13 14:57:52 +02:00
vsh.c Remove static keyword from vshReadline when readline does not exist 2015-08-15 17:14:12 +02:00
vsh.h tools: Introduce new client generic module vsh 2015-08-14 15:45:44 +02:00