Bug 1131755
Summary: | Error info instead of success report outputs when SIGINT to interrupt a "virsh save" process but "virsh save" job finished successfully | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | zhengqin <zsong> |
Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | dyuan, mzhan, rbalakri, zhwang, zpeng |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.17-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 05:47:44 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
zhengqin
2014-08-20 02:55:50 UTC
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2015-June/msg00035.html Pushed upstream as v1.2.16-52-ge9507fd: commit e9507fd41c9c6b73093cc0a4ce568bf0d8204854 Author: Jiri Denemark <jdenemar> Date: Mon Jun 1 15:06:16 2015 +0200 virsh: Fix Ctrl-C behavior when watching a job When watching a job (save, managedsave, dump, migrate) virsh spawns a thread to call the appropriate API and waits for the result while watching for interruption signals (SIGINT, Ctrl-C on the terminal). Whenever such signal is caught, virsh calls virDomainAbortJob, stops waiting for the job, and returns the result of virDomainAbortJob. This is wrong because the job might have finished in the meantime or it might have been cancelled by someone else and virsh would just report the failure to abort the job. However, we are not interested in the virDomainAbortJob's result at all, we need to keep waiting for the main job to finish and report its result instead. https://bugzilla.redhat.com/show_bug.cgi?id=1131755 Signed-off-by: Jiri Denemark <jdenemar> Could reproduce this issue following the bug description, the following steps were the verification steps with libvirt-1.2.17-1.el7.x86_64 1.Prepare a running guest # virsh list Id Name State ---------------------------------------------------- 4 rhel7.0 running 2.Save the guest, the guest will give clear info if it successfully abort the job or the job have finish while you abort the job <1. abort the job successfully # virsh save rhel7.0 rhel7.0.save ^Cerror: Failed to save domain rhel7.0 to rhel7.0.save error: operation aborted: domain save job: canceled by client <2.The job has been finished during you abort the job, currently it will show you save job has been finished # virsh save rhel7.0 rhel7.0.save ^C Domain rhel7.0 saved to rhel7.0.save 3.Do managedsave with the guest, will get the same result with save <1. abort the job successfully # virsh managedsave rhel7.0 ^Cerror: Failed to save domain rhel7.0 state error: operation aborted: domain save job: canceled by client <2.The job has been finished during you abort the job, currently it will show you managedsave job has been finished # virsh managedsave rhel7.0 ^C^C Domain rhel7.0 state saved by libvirt 4.Do migration with the guest, will get the similiar result with save <1. abort the job successfully # virsh migrate --live rhel7.0 qemu+ssh://10.66.6.6/system --verbose --unsafe root.6.6's password: Migration: [ 89 %]^Cerror: operation aborted: migration job: canceled by client <2.The job has been finished during you abort the job, currently it will show you migration job has been finished # virsh migrate --live rhel7.0 qemu+ssh://10.66.6.6/system --verbose --unsafe root.6.6's password: Migration: [100 %]^C 5.Do dump with guest, will get the similiar result with save <1. abort the job successfully # virsh dump rhel7.0 rhel7.dump --crash ^C^Cerror: Failed to core dump domain rhel7.0 to rhel7.dump error: operation aborted: domain core dump job: canceled by client <2.The job has been finished during you abort the job, currently it will show you dump job has been finished [root@zhwangrhel71 ~]# virsh dump rhel7.0 rhel7.dump --crash ^C^C Domain rhel7.0 dumped to rhel7.dump According to the upper steps, mark this bug verifed Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2202.html |