Red Hat Bugzilla – Bug 1131445
Could not show process info for migration at once.
Last modified: 2015-03-05 02:42:41 EST
Description of problem: Version-Release number of selected component (if applicable): libvirt-1.2.7-1.el7.x86_64 qemu-kvm-rhev-2.1.0-1.el7.x86_64 kernel-3.10.0-142.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Set up migration env with nfs 2. On source site, prepare a running guest (rhel6-guest), run following command: [root@rhel7-a /]# virsh migrate --live rhel6-guest qemu+ssh://destEnv/system --verbose root@10.66.4.230's password: 3. After enter password and "enter" Actual results: 1. No info output. 2. Process info will be shown after press "enter" again. Expected results: 1. Related info should be shown after input password at once.
Fixed upstream by: commit 7eabd5503e3de147b703c1a1e6dff81cdc46d1e7 Author: Chunyan Liu <cyliu@suse.com> AuthorDate: 2014-08-08 16:44:36 +0800 Commit: Ján Tomko <jtomko@redhat.com> CommitDate: 2014-08-19 11:32:51 +0200 cmdMigrate: move vshConnect before vshWatchJob A possible fix to issue: http://www.redhat.com/archives/libvir-list/2014-August/thread.html#00227 While doing migration on KVM host, found problem sometimes: VM is already running on the target host and disappears from source host, but 'virsh migrate' command line hangs, cannot exit normally. If pressing "ENTER" key, it will exit. The code hangs at tools/virsh-domain.c: cmdMigrate ->vshWatchJob->poll(): poll() is trying to select pipe_fd, which is used to receive message from doMigrate thread. In debugging, found that doMigrate finishes and at the end it does call safewrite() to write the retval ('0' or '1') to pipe_fd, and the write is completed. But cmdMigrate poll() cannot get the event. If pressing "ENTER" key, poll() can get the event and select pipe_fd, then command line can exit. In current code, authentication thread which is called by vshConnect will use stdin, and at the same time, in cmdMigrate main process, poll() is listening to stdin, that probably affect poll() to get pipe_fd event. Better to move authentication before vshWatchJob. With this change, above problem does not exist. Signed-off-by: Chunyan Liu <cyliu@suse.com> git describe: v1.2.7-155-g7eabd55
Verified this issue with build libvirt-1.2.8-1.el7.x86_64: Verify steps: 1. Set up migration env with nfs 2. On source site, prepare a running guest (rhel6-guest), run following command: [root@rhel7-a /]# virsh migrate --live rhel6-guest qemu+ssh://destEnv/system --verbose root@10.66.4.230's password: 3. After enter password and "enter" Result: Migration: [100 %] The process info for migration could show at once.
I can reproduce this bug with libvirt-1.2.7-1.el7.x86_64, the following was the verify steps with libvirt-1.2.8-10.el7.x86_64 1. Set up migration env with nfs 2.migrate the guest from the source to target, the guest could be migrated directly after input the right password # virsh migrate --live rhel7.0 qemu+ssh://xx.xx.xx/system --verbose --unsafe The authenticity of host 'xx.xx.xx.xx (xx.xx.xx.xx)' can't be established. ECDSA key fingerprint is xx:49:cc:xx:64:xx:93:4a:20:xx:14:b2:xx:xx:48:a3. Are you sure you want to continue connecting (yes/no)? yes root@xx.xx.xx.xx's password: Migration: [ 57 %]^Cerror: operation aborted: migration job: canceled by client # virsh migrate --live rhel7.0 qemu+ssh://xx.xx.xx.xx/system --verbose --unsafe root@xx.xx.xx.xx's password: Migration: [ 43 %]^Cerror: operation aborted: migration job: canceled by client # virsh migrate --live rhel7.0 qemu+ssh://xx.xx.xx.xx/system --verbose --unsafe root@xx.xx.xx.xx's password: Migration: [100 %] 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/RHSA-2015-0323.html