libvirt/tools
Eric Blake 35966308b5 virsh: Fix regression with duplicated error messages
Commit 4f4c3b13 (v3.3) fixed an issue where performing cleanup of
libvirt objects could sometimes lose error messages, by adding code
to copy the libvirt error into last_error prior to cleanup paths.
However, it caused a regression: on other paths, some errors are now
printed twice, if libvirt still remembers in its thread-local
storage that an error was set even after virsh cleared last_error.
For example:

$ virsh -c test:///default snapshot-delete test blah
error: Domain snapshot not found: no domain snapshot with matching name 'blah'
error: Domain snapshot not found: no domain snapshot with matching name 'blah'

Fix things by telling libvirt to discard any thread-local errors at
the same time virsh prints an error message (whether or not the libvirt
error is the same as what is stored in last_error).

Update the virsh-undefine testsuite (partially reverting portions of
commit b620bdee, by removing -q, to more easily pinpoint which commands
are causing which messages), now that there is only one error message
instead of two.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2018-10-12 09:30:56 -05:00
..
bash-completion
nss
wireshark src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
libvirt_win_icon_16x16.ico
libvirt_win_icon_32x32.ico
libvirt_win_icon_48x48.ico
libvirt_win_icon_64x64.ico
libvirt-guests.init.in
libvirt-guests.service.in
libvirt-guests.sh.in
libvirt-guests.sysconf
Makefile.am vsh: Add API for printing tables. 2018-08-24 10:52:41 +02:00
virsh_win_icon.rc
virsh-completer.c New virsh feature: domif-setlink --domain --interface --state completer 2018-07-12 17:23:15 +02:00
virsh-completer.h New virsh feature: domif-setlink --domain --interface --state completer 2018-07-12 17:23:15 +02:00
virsh-console.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virsh-console.h
virsh-domain-monitor.c virsh: Implement vshTable API to domiflist 2018-09-24 09:09:14 +02:00
virsh-domain-monitor.h
virsh-domain.c virsh: Require explicit --domain for domxml-to-native 2018-09-26 17:22:38 +02:00
virsh-domain.h
virsh-edit.c
virsh-host.c
virsh-host.h
virsh-interface.c virsh: Implement vsh-table to iface-list 2018-09-24 09:09:14 +02:00
virsh-interface.h
virsh-network.c virsh: Implement vshTable API to net-list and net-dhcp-leases 2018-09-24 09:09:14 +02:00
virsh-network.h
virsh-nodedev.c
virsh-nodedev.h
virsh-nwfilter.c virsh: Implement vshTable API to nwfilter-list and nwfilterbinding-list 2018-09-24 09:09:14 +02:00
virsh-nwfilter.h virsh: add nwfilter binding commands 2018-06-26 11:22:07 +01:00
virsh-pool.c virsh: Implement vshTable API to pool-list 2018-09-24 09:09:14 +02:00
virsh-pool.h
virsh-secret.c virsh: Implement vshTable API to secret-list 2018-09-24 09:09:14 +02:00
virsh-secret.h
virsh-snapshot.c virsh: Implement vshTable API to snapshot-list. 2018-09-24 09:09:14 +02:00
virsh-snapshot.h
virsh-util.c
virsh-util.h
virsh-volume.c virsh: Implement vshTable API to vol-list 2018-09-24 09:09:14 +02:00
virsh-volume.h Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
virsh.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virsh.h virsh: Require explicit --domain for domxml-to-native 2018-09-26 17:22:38 +02:00
virsh.pod nwfilter: Add extra verbiage for binding create/delete 2018-08-24 08:45:19 -04:00
virt-admin-completer.c
virt-admin-completer.h
virt-admin.c tools: Fix printf format 2018-09-24 13:39:58 +02:00
virt-admin.h
virt-admin.pod
virt-host-validate-bhyve.c internal: Move <stdio.h> include to internal.h 2018-09-20 10:16:38 +02:00
virt-host-validate-bhyve.h virt-host-validate: add bhyve support 2017-03-11 21:22:58 +04:00
virt-host-validate-common.c virt-host-validate: Fix build on non-Linux 2018-10-08 09:55:40 +02:00
virt-host-validate-common.h virt-host-validate: rewrite cgroup detection to use util/vircgroup 2018-10-05 15:53:29 +02:00
virt-host-validate-lxc.c virt-host-validate: require freezer for LXC 2018-10-05 15:53:29 +02:00
virt-host-validate-lxc.h
virt-host-validate-qemu.c virt-host-validate: rewrite cgroup detection to use util/vircgroup 2018-10-05 15:53:29 +02:00
virt-host-validate-qemu.h
virt-host-validate.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virt-host-validate.pod
virt-login-shell.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
virt-login-shell.conf
virt-login-shell.pod
virt-pki-validate.in
virt-pki-validate.pod
virt-sanlock-cleanup.in
virt-sanlock-cleanup.pod
virt-xml-validate.in virt-xml-validate: Add schema for nwfilterbinding 2018-07-19 16:16:57 -04:00
virt-xml-validate.pod virt-xml-validate: Add schema for nwfilterbinding 2018-07-19 16:16:57 -04:00
vsh-table.c src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00
vsh-table.h vsh: Add API for printing tables. 2018-08-24 10:52:41 +02:00
vsh.c virsh: Fix regression with duplicated error messages 2018-10-12 09:30:56 -05:00
vsh.h src: More cleanup of some system headers already contained in internal.h 2018-09-20 10:16:39 +02:00