Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1002444 - Filter returns empty list if the plugin filter method is failing
Summary: Filter returns empty list if the plugin filter method is failing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-scheduler-proxy
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.4.0
Assignee: Martin Sivák
QA Contact: Artyom
URL:
Whiteboard: sla
: 1002443 (view as bug list)
Depends On:
Blocks: 1069214 rhev3.4beta 1142926
TreeView+ depends on / blocked
 
Reported: 2013-08-29 08:41 UTC by Laszlo Hornyak
Modified: 2016-02-10 20:18 UTC (History)
7 users (show)

Fixed In Version: ovirt-3.4.0-beta2
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1069214 (view as bug list)
Environment:
Last Closed:
oVirt Team: SLA
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 18788 None None None Never
oVirt gerrit 21232 None None None Never

Description Laszlo Hornyak 2013-08-29 08:41:13 UTC
Description of problem:
Filter returns empty list if the plugin filter method is failing

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


How reproducible:
always

Steps to Reproduce:
1. Create a plugin with filter function
def filterFunction(hosts, vm, args):
    '''This is a simple filter that returns all given host ID'''
    fail(yourself)
    pass
2. call filter with the name of the plugin


Actual results:
empty list

Expected results:
exception

Additional info:

Comment 1 Laszlo Hornyak 2013-08-29 08:41:55 UTC
this should be also true for scoreFunction and balanceFunction

Comment 5 Artyom 2013-11-28 15:34:57 UTC
Verified on is25

Comment 6 Artyom 2013-12-05 14:54:23 UTC
After discussion with Doron and Martin revealed that, if filter is corrupted or missing external scheduler must return all hosts and vm must run.

Comment 7 Artyom 2013-12-06 06:51:27 UTC
Checked on is26,
Can't run vm, when corrupted filter function is added to ovirt-sheduler-proxy
engine.log:
Cant find VDS to run the VM 687e60b6-5632-4c97-80c1-23a63f61c550 on, so this VM will not be run

ovirt-sheduler-proxy.log
Fri, 06 Dec 2013 08:46:21 DEBUG    [process:MainProcess, thread:Thread-6] [Request:1dcc4f1e-5e42-11e3-a884-001a4a1697fa][Method:PythonMethodRunner] - running ['python', '-c', "import max_vm_filter; max_vm_filter.max_vms().do_filter(['1ab5d0d9-5f2d-4994-8f6e-773870b1d1a0'], '687e60b6-5632-4c97-80c1-23a63f61c550', {})"] in /usr/share/ovirt-scheduler-proxy/plugins
Fri, 06 Dec 2013 08:46:21 DEBUG    [process:MainProcess, thread:Thread-5] [Request:1dcc4f1e-5e42-11e3-a884-001a4a1697fa][Method:run_filters] - Waiting for filters to finish
Fri, 06 Dec 2013 08:46:22 ERROR    [process:MainProcess, thread:Thread-6] [Request:1dcc4f1e-5e42-11e3-a884-001a4a1697fa][Method:PythonMethodRunner] - script ['python', '-c', "import max_vm_filter; max_vm_filter.max_vms().do_filter(['1ab5d0d9-5f2d-4994-8f6e-773870b1d1a0'], '687e60b6-5632-4c97-80c1-23a63f61c550', {})"] got error Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "max_vm_filter.py", line 34, in do_filter
    asd
NameError: global name 'asd' is not defined

Fri, 06 Dec 2013 08:46:22 DEBUG    [process:MainProcess, thread:Thread-5] [Request:1dcc4f1e-5e42-11e3-a884-001a4a1697fa][Method:run_filters] - Aggregating results
Fri, 06 Dec 2013 08:46:22 WARNING  [process:MainProcess, thread:Thread-5] Error in ['python', '-c', "import max_vm_filter; max_vm_filter.max_vms().do_filter(['1ab5d0d9-5f2d-4994-8f6e-773870b1d1a0'], '687e60b6-5632-4c97-80c1-23a63f61c550', {})"] (errno: 1, errors: Traceback (most recent call last):
File "<string>", line 1, in <module>
  File "max_vm_filter.py", line 34, in do_filter
    asd
NameError: global name 'asd' is not defined
)
Fri, 06 Dec 2013 08:46:22 INFO     [process:MainProcess, thread:Thread-5] [Request:1dcc4f1e-5e42-11e3-a884-001a4a1697fa][Method:run_filters] - returning: []

So if filter failed, ovirt-sheduler-proxy return empty list

Comment 8 Itamar Heim 2013-12-08 09:15:48 UTC
isn't this now a dup of bug 1002443?

Comment 10 Jiri Moskovcak 2014-01-22 11:55:41 UTC
*** Bug 1002443 has been marked as a duplicate of this bug. ***

Comment 11 Eyal Edri 2014-02-10 09:50:49 UTC
moving to 3.3.2 since 3.3.1 was built and moved to QE.
bug was fixed a while ago, please make sure to clone to z-stream if it needs to make the build.

Comment 12 Artyom 2014-02-13 15:05:46 UTC
Verified on ovirt-engine-3.4.0-0.7.beta2.el6.noarch
If filter failed and no other filters scheduler return the full vdsm list.

Comment 14 Itamar Heim 2014-06-12 14:10:59 UTC
Closing as part of 3.4.0


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