This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1002444 - Filter returns empty list if the plugin filter method is failing
Filter returns empty list if the plugin filter method is failing
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-scheduler-proxy (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity high
: ---
: 3.4.0
Assigned To: Martin Sivák
Artyom
sla
: ZStream
: 1002443 (view as bug list)
Depends On:
Blocks: 1069214 rhev3.4beta 1142926
  Show dependency treegraph
 
Reported: 2013-08-29 04:41 EDT by Laszlo Hornyak
Modified: 2016-02-10 15:18 EST (History)
7 users (show)

See Also:
Fixed In Version: ovirt-3.4.0-beta2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1069214 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 18788 None None None Never
oVirt gerrit 21232 None None None Never

  None (edit)
Description Laszlo Hornyak 2013-08-29 04:41:13 EDT
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 04:41:55 EDT
this should be also true for scoreFunction and balanceFunction
Comment 5 Artyom 2013-11-28 10:34:57 EST
Verified on is25
Comment 6 Artyom 2013-12-05 09:54:23 EST
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 01:51:27 EST
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 04:15:48 EST
isn't this now a dup of bug 1002443?
Comment 10 Jiri Moskovcak 2014-01-22 06:55:41 EST
*** Bug 1002443 has been marked as a duplicate of this bug. ***
Comment 11 Eyal Edri 2014-02-10 04:50:49 EST
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 10:05:46 EST
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 10:10:59 EDT
Closing as part of 3.4.0

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