Bug 855776

Summary: Its impossible to trace the reason why we can't find a VDS to schedule a VM on
Product: Red Hat Enterprise Virtualization Manager Reporter: Roy Golan <rgolan>
Component: ovirt-engineAssignee: Roy Golan <rgolan>
Status: CLOSED CURRENTRELEASE QA Contact: Ido Begun <ibegun>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: dfediuck, dyasny, hateya, iheim, lhornyak, lpeer, masayag, michal.skrivanek, mkenneth, oramraz, Rhev-m-bugs, twillber, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt sla
Fixed In Version: si20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Roy Golan 2012-09-10 09:21:14 UTC
Description of problem:
When we can't find a VDS to run a VM on because there was no match (cpu cores, memory, missing hosts networks) the reason is not logged not propagated up.

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


How reproducible:
100%

Steps to Reproduce:
1.Have a VM with a nic attached to a network which doesn't exist on a host (or not reported by the host)
2.run the VM - no trace in the logs. even debug.
3.
  
Actual results:


Expected results:
always log the reason why we can't find a VDS to run the VM.

Additional info:

Comment 1 Michal Skrivanek 2012-09-10 09:57:14 UTC
adding SLA to be aware this needs to be addressed in the new drools framework as well. meanwhile we plan to fix it for 3.1 as it's difficult to troubleshoot without a clear log

Comment 2 Moti Asayag 2012-09-10 13:52:53 UTC
It seems that a patch to refer the missing networks required by VM is already validated and reported properly.

Merged by http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;h=3a27d23a0be6a646b63426271eadb2cdd0aed91b

The Can-do-action message is:

Error while executing action: Cannot run VM. There are no available running Hosts with all the networks used by the VM.

From engine.log:
2012-09-10 16:27:02,693 WARN  [org.ovirt.engine.core.bll.RunVmCommand] (http--0.0.0.0-8700-1) CanDoAction of action RunVm failed. Reasons:VAR__ACTION__RUN,VAR__TYPE__VM,ACTION_TYPE_FAILED_VDS_VM_NETWORKS

Comment 3 Roy Golan 2012-09-11 07:48:56 UTC
(In reply to comment #2)
> It seems that a patch to refer the missing networks required by VM is
> already validated and reported properly.
> 
> Merged by
> http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;
> h=3a27d23a0be6a646b63426271eadb2cdd0aed91b
> 
> The Can-do-action message is:
> 
> Error while executing action: Cannot run VM. There are no available running
> Hosts with all the networks used by the VM.
> 
> From engine.log:
> 2012-09-10 16:27:02,693 WARN  [org.ovirt.engine.core.bll.RunVmCommand]
> (http--0.0.0.0-8700-1) CanDoAction of action RunVm failed.
> Reasons:VAR__ACTION__RUN,VAR__TYPE__VM,ACTION_TYPE_FAILED_VDS_VM_NETWORKS

its not enough since a duplicated set of checks is running during execution (some parameters can change memory etc) and then there is no cando thrown.

Comment 4 Roy Golan 2012-09-11 07:55:11 UTC
http://gerrit.ovirt.org/7921

Comment 8 Ido Begun 2012-10-10 07:47:28 UTC
OK - si20

Reproducing the bug now logs:
2012-10-10 09:30:35,989 INFO  [org.ovirt.engine.core.bll.VdsSelector] (ajp-/127.0.0.1:8702-10)  VDS myHost 3515928a-1211-11e2-b820-001a4a169731 is missing networks required by VM nics [otherNet]

Webadmin now displays:
Error while executing action: Cannot run VM. There are no available running Hosts with all the networks used by the VM.

Comment 9 Roy Golan 2012-10-18 10:48:26 UTC
*** Bug 863022 has been marked as a duplicate of this bug. ***