Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1116816

Summary: [Java SDK] migrate vms simultaneously fail on canDoAction: source and destination is the same
Product: Red Hat Enterprise Virtualization Manager Reporter: Ilanit Stein <istein>
Component: ovirt-engine-sdk-javaAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED NOTABUG QA Contact: Shai Revivo <srevivo>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: gklein, iheim, iliam, istein, mavital, ofrenkel, yeylon
Target Milestone: ---Keywords: AutomationBlocker, AutomationTriaged, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-13 07:43:50 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:
Attachments:
Description Flags
logs none

Description Ilanit Stein 2014-07-07 11:27:08 UTC
Description of problem:
Migrate VMs simultaneously fail on Java sdk api on:
Operation Failed: [Cannot migrate VM. source and destination is the same.]

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

How reproducible:
100%

Steps to Reproduce:
Was found in automatic migration test, that migrate vms, running on host 1 simultaneously to host 2.
This same test is run for all apis (REST, SDK, CLI, and JAVA),
and it fails only for Java.

test link:
http://jenkins.qa.lab.tlv.redhat.com:8080/view/Compute/view/3.4-git/view/Virt/job/3.4-git-compute-virt-vm_migration-iscsi/36/

Additional info:
Seems the dest host is set to the src host.

Comment 1 Ilanit Stein 2014-07-07 11:29:03 UTC
Created attachment 916048 [details]
logs

Comment 2 Juan Hernández 2014-07-07 14:04:49 UTC
In the attached log files I can't see the requests that the Java SDK is sending to the server. Can you enable debug output of the Java SDK and repeat the test?

Also, in those logs, I see that the "source and destination is the same" message is repeated several times. Some times the client is the Java SDK, but I see also similar failures with the Python SDK and with the CLI. In line 374681 I see the following, as part of the VM representation sent from the server to the CLI:

  <host id="612e8edf-7a12-436e-95e2-d2e87888d777" .../>

And then in the migration request sent by the CLI I see that it is asking the server to migrate the VM to the same host it is currently running on (line 374697):

  <action>
    <async>false</async>
    <grace_period>
      <expiry>10</expiry>
    </grace_period>
    <host id="612e8edf-7a12-436e-95e2-d2e87888d777"/>  <-- Same host
  </action>

So in this case the "source and destination is the same" is correct. It makes me think that the test with the Java SDK is also trying to do this. Isn't it?

Comment 3 Omer Frenkel 2014-07-10 15:00:08 UTC
i agree with Juan, 
from the log it looks that the test is doing run-vm and then migrate-to-specific-server.
since run-vm use the scheduler to find host to run on, does the test take the selected host into consideration and choose the other host?
why is it using migrate-to-specific-server and not just migrate (which also use the scheduler to pick host)?
in case the test really need to use (test) this command, it should check on what host the vm is running and pick a different one, does this happen?

Comment 4 Ilanit Stein 2014-07-13 07:43:50 UTC
Closing the bug since from inquiry of REST test, VMs run on same host, to which they are migrated to. Test needs to be fixed.