Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 618601 - We need to reopen images after migration
We need to reopen images after migration
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
All Linux
low Severity high
: rc
: ---
Assigned To: Juan Quintela
Virtualization Bugs
: Regression
: 614286 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-27 07:02 EDT by Juan Quintela
Modified: 2013-01-09 17:57 EST (History)
10 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.106.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 16:26:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
target guest complaining about missing disk in drive (55.07 KB, image/jpeg)
2010-07-28 14:20 EDT, Luiz Capitulino
no flags Details
"No Drive" Screen dumped. (244.79 KB, image/png)
2010-08-03 01:48 EDT, Mike Cao
no flags Details
rhel6 fail screen dump (11.73 KB, image/png)
2010-08-03 02:23 EDT, Mike Cao
no flags Details

  None (edit)
Description Juan Quintela 2010-07-27 07:02:49 EDT
Description of problem:

qemu opens images at init time, but with NFS shared images, we need close-to-open semantics.  I.e. after migration ends, we need to:
- close images in source
- close images in target
- re-open images in target

to be sure that we get the latest info.

Version-Release number of selected component (if applicable):

All.

This is a regression from rhel5.  Patch was:
http://harpoon.virt.bos.redhat.com/~ehabkost/kvm-patches/kvm-Reopen-block-drivers-after-migration.patch
Comment 4 Dor Laor 2010-07-28 07:33:36 EDT
*** Bug 614286 has been marked as a duplicate of this bug. ***
Comment 5 Luiz Capitulino 2010-07-28 14:20:16 EDT
Created attachment 435101 [details]
target guest complaining about missing disk in drive

I was testing a quick and dirty version of this fix for rhel6 to ensure that bug 614286 is fixed and turns out that if you migrate during windows 2008 install (at the "expeding windows file" step) the target guest will complain that there's no DVD in the drive when it resumes, as shown by the attached screenshot.

By clicking in retry, windows seems to find the DVD and go ahead with the installation (which is far better than getting an corrupted image), however we might want to only reopen read-write images..

I'll wait for Juan's final submission to retest this (he said he's working on this).

PS: For details on the test setup and procedure see bug 614286, specially comment 22.
Comment 8 Luiz Capitulino 2010-07-30 08:54:33 EDT
Some test considerations for this issue:

o Please, test other forms of migration too (eg. to file)
o Test migration during rhel6 installation too
o Check bug 614286 and comment 5 of this BZ
Comment 10 Mike Cao 2010-08-03 01:46:26 EDT
Re-test it in qemu-kvm-0.12.1.2-2.106.el6    .

According to comment #8,


1.test migration via compressed file and std file . 
results:After migration ,guest sitll can be used


2.Repeat steps in bug 614286.
results:After migration ,Guest still can finish installation.When the guest start to the login screen. a message prompts "No Drive" in the guest.
Comment 11 Mike Cao 2010-08-03 01:48:05 EDT
Created attachment 436188 [details]
"No Drive" Screen dumped.
Comment 12 Mike Cao 2010-08-03 02:22:23 EDT
Re-tested in qemu-kvm-0.12.1.2-2.106.el6 .

Test migration during rhel6 guest installation

Actual Results:

Test several times,2 times failed.but the Actual result are different

failed scenario1 :
Migration failed and qemu-kvm quit in the dest host.
the message prompts:
qemu: warning :error whild loading state for instance 0x5 of device 'cpu'
load of migration failed.

2.failed scenario 2(rhel6 fail screen dump):
After migration ,in the Guest can not continue installation and it shows
"Running anaconda 13.21.60,the Redhat Enterprise Linux system installer -please wait
 05:04:50 Starting graphical installation.
 Fatal python error :GC object already tracked .
 Anaconda died after receiving signal 6.
 install exited abnormally [1/1]
 The System will be rebooted when you press Ctrl-C or Ctrl-Alt-Delete."

Additional info :

Don't know how to reproduce it.It seems that when the migration finished while the the guest is still formating system may trigger the issue.
Comment 13 Mike Cao 2010-08-03 02:23:58 EDT
Created attachment 436191 [details]
rhel6 fail screen dump
Comment 14 Mike Cao 2010-08-03 04:55:07 EDT
According to comment #12, May I re-assign this issue?.
Comment 15 Dor Laor 2010-08-03 06:51:53 EDT
*** Bug 618509 has been marked as a duplicate of this bug. ***
Comment 16 Luiz Capitulino 2010-08-03 08:49:32 EDT
It seems to me that both new issues (comment 11, comment 12 and comment 13) are not related to the reopening of images. Maybe they are two different bugs.

One way of confirming this would be to try to reproduce both problems on an older qemu-kvm package version, like qemu-kvm-0.12.1.2-2.91.el6.x86_64, which doesn't have the fix applied.

If you manage to reproduce the problems there, then we should close this BZ as verified and open new ones for the recently discovered issues.

Nice testing Mike!
Comment 17 Juan Quintela 2010-08-06 09:33:08 EDT
I think that the two new issues appeared are new, not related with this bug.  Trying to reproduce.
Comment 18 Mike Cao 2010-08-09 06:01:14 EDT
(In reply to comment #16)
> It seems to me that both new issues (comment 11, comment 12 and comment 13) are
> not related to the reopening of images. Maybe they are two different bugs.

Could you supply me how to comfirm that the patches has worked already ?

> One way of confirming this would be to try to reproduce both problems on an
> older qemu-kvm package version, like qemu-kvm-0.12.1.2-2.91.el6.x86_64, which
> doesn't have the fix applied.


The issues described in comment #11,comment #12, comment #13 were found by repeating the steps of bug 614286 .If using older qemu-kvm package to reproduce the problems above ,It will trigger bug 614286. Would you provide some advice how to comfirm whether they are new issues or not ?
Comment 19 jason wang 2010-08-10 02:19:10 EDT
(In reply to comment #18)
> (In reply to comment #16)
> > It seems to me that both new issues (comment 11, comment 12 and comment 13) are
> > not related to the reopening of images. Maybe they are two different bugs.
> 
> Could you supply me how to comfirm that the patches has worked already ?
> 

What does the patche do is to reopen images after migration in destination, so  you could use strace -fe trace=open,close /usr/libexec/qemu ... and see whether images have been reopened after migration when you do the verification accroding to the steps of bug 614286.

> > One way of confirming this would be to try to reproduce both problems on an
> > older qemu-kvm package version, like qemu-kvm-0.12.1.2-2.91.el6.x86_64, which
> > doesn't have the fix applied.
> 
> 
> The issues described in comment #11,comment #12, comment #13 were found by
> repeating the steps of bug 614286 .If using older qemu-kvm package to reproduce
> the problems above ,It will trigger bug 614286. Would you provide some advice
> how to comfirm whether they are new issues or not ?    

The patch could resovle the issue of bug 614286, and the issuse you found in comment #11, comment #12 and comment #13 looks not related to the images re-open, if you could reproduce it, you should open new bzs.
Comment 20 Mike Cao 2010-08-10 22:42:46 EDT
Re-tested in qemu-kvm-0.12.1.2-2.108.el6.

Repeat steps in comment #19 ,test live migration ,migration via compressed file.migration via dd.

Actual Results:
After migration ,it shows 

[pid 16606] open("/home/RHEL.raw", O_RDONLY|O_NONBLOCK) = 10
[pid 16606] close(10)                   = 0
[pid 16606] open("/home/RHEL.raw", O_RDWR|O_DIRECT|O_CLOEXEC) = 10
[pid 16606] close(16)

Change status to VERIFIED.
Comment 23 releng-rhel@redhat.com 2010-11-10 16:26:58 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.