Bug 1721563 - VM not started on the expected host since external weight policy units are ignored.
Summary: VM not started on the expected host since external weight policy units are ig...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.3.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.4.0
: 4.3.5.2
Assignee: Andrej Krejcir
QA Contact: Polina
URL:
Whiteboard:
Depends On:
Blocks: 1722235
TreeView+ depends on / blocked
 
Reported: 2019-06-18 14:48 UTC by Polina
Modified: 2020-05-20 19:57 UTC (History)
2 users (show)

Fixed In Version: ovirt-engine-4.3.5.2
Clone Of:
: 1722235 (view as bug list)
Environment:
Last Closed: 2020-05-20 19:57:50 UTC
oVirt Team: SLA
Embargoed:
pm-rhel: ovirt-4.4+


Attachments (Terms of Use)
engine.log (17.21 MB, text/plain)
2019-06-18 14:48 UTC, Polina
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 100938 0 'None' MERGED scheduling: Fix wrong condition that disabled external functions 2020-05-14 13:34:00 UTC
oVirt gerrit 100951 0 'None' MERGED scheduling: Fix wrong condition that disabled external functions 2020-05-14 13:34:00 UTC

Description Polina 2019-06-18 14:48:07 UTC
Created attachment 1581752 [details]
engine.log

Description of problem:VM not started on the expected host since external weight policy units are ignored.


Version-Release number of selected component (if applicable):
ovirt-engine-4.3.4.3-0.1.el7.noarch

How reproducible: reproduced twice in automation runs. 
Also reproduced manually several times and Andrej looked at the env. 


Steps to Reproduce:
1. Install the package ovirt-scheduler-proxy on the engine.
2. Create the script /usr/share/ovirt-scheduler-proxy/plugins/filter_plugin.py on the engine
   Create the script /usr/share/ovirt-scheduler-proxy/plugins/weight_plugin.py on the engine
#!/bin/env python
class ExternalSchedulerWeightPlugin(object):
    def do_score(self, hosts, vm, args):
        hosts_scores = list()
        for host in hosts:
            if host == "fd9a906b-d88e-46ce-809a-2a22ab0495a5":
                continue
            hosts_scores.append((host, 50))
        print hosts_scores


   Create the script /usr/share/ovirt-scheduler-proxy/plugins/balance_plugin.py on the engine
   Create the script /usr/share/ovirt-scheduler-proxy/plugins/corrupted_plugin.py on the engine
   Create the script /usr/share/ovirt-scheduler-proxy/plugins/timeout_plugin.py on the engine
   Create the script /usr/share/ovirt-scheduler-proxy/plugins/stopped_plugin.py on the engine
3. Start the service ovirt-scheduler-proxy 
4. Enable the ovirt-scheduler-proxy via the engine config ('ExternalSchedulerEnabled=True')
5. Add new scheduling policy to the engine with {'name': 'weight_external_policy'} (screenshot attached external_weight_policy.png )
   Add the scheduling policy unit to the scheduling policy with {'unit_type': 'weight', 'unit_name': 'ExternalSchedulerWeightPlugin', 'policy_name': 'weight_external_policy'}
6. Run one VM 

Actual results: VM runs on host2 (not mentioned in plugin script)

Expected results:The tests expects the Vm to start on host1 (fd9a906b-d88e-46ce-809a-2a22ab0495a5).


Additional info: for QE. bug is reproduced on hosted-engine-04.lab.eng.tlv2.redhat.com
test rhevmtests.compute.sla.scheduler_tests.external_scheduler.external_scheduler_test.TestExternalSchedulerWeight

Comment 1 Andrej Krejcir 2019-06-19 12:27:29 UTC
The same typo is in 4.3, do we want a backport?

Comment 2 Ryan Barry 2019-06-19 12:30:30 UTC
Sounds like an easy backport. Once it's posted, I'll make a clone.

Comment 4 Polina 2019-06-27 15:19:11 UTC
verified on ovirt-engine-4.3.5.2-0.1.el7.noarch according to Description https://bugzilla.redhat.com/show_bug.cgi?id=1721563#c0

Comment 5 Polina 2019-07-02 08:38:58 UTC
Hi Ryen,

I think there is a confusion here with the target version.
We have downstream clone 1722235 which is actually verified in ovirt-engine-4.3.5.2-0.1.el7.noarch.

seems here the target release must be 4.4.0, otherwise, there is no difference between https://bugzilla.redhat.com/show_bug.cgi?id=1721563 and https://bugzilla.redhat.com/show_bug.cgi?id=1722235.

So, I think this one must be moved to Modify, right?

Comment 6 Polina 2019-12-02 21:22:45 UTC
verified on build http://bob-dr.lab.eng.brq.redhat.com/builds/4.4/rhv-4.4.0-5
by running automation test for external scheduler

Comment 7 Sandro Bonazzola 2020-05-20 19:57:50 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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