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

Bug 1722235

Summary: [downstream clone - 4.3.5] VM not started on the expected host since external weight policy units are ignored.
Product: Red Hat Enterprise Virtualization Manager Reporter: RHV bug bot <rhv-bugzilla-bot>
Component: ovirt-engineAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED ERRATA QA Contact: Polina <pagranat>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: bugs, michal.skrivanek, rbarry, Rhev-m-bugs
Target Milestone: ovirt-4.3.5Keywords: Automation, ZStream
Target Release: 4.3.5   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.5.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1721563 Environment:
Last Closed: 2019-08-12 11:53:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1721563    
Bug Blocks:    

Description RHV bug bot 2019-06-19 18:28:56 UTC
+++ This bug is an upstream to downstream clone. The original bug is: +++
+++   bug 1721563 +++
======================================================================

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

(Originally by Polina Agranat)

Comment 1 RHV bug bot 2019-06-19 18:28:58 UTC
The same typo is in 4.3, do we want a backport?

(Originally by Andrej Krejcir)

Comment 2 RHV bug bot 2019-06-19 18:29:00 UTC
Sounds like an easy backport. Once it's posted, I'll make a clone.

(Originally by Ryan Barry)

Comment 3 Michal Skrivanek 2019-06-20 06:03:55 UTC
Why are we backporting it? Why a downstream bug?

Comment 4 Ryan Barry 2019-06-20 11:08:30 UTC
Downstream from the bot, but cloned because it potentially breaks any external scheduler policies and has a simple resolution

Comment 5 RHV bug bot 2019-06-27 11:39:52 UTC
WARN: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{'rhevm-4.3.z': '?'}', ]

For more info please contact: rhv-devops: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{'rhevm-4.3.z': '?'}', ]

For more info please contact: rhv-devops

Comment 6 RHV bug bot 2019-06-27 11:48:41 UTC
WARN: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{'rhevm-4.3.z': '?'}', ]

For more info please contact: rhv-devops: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found non-acked flags: '{'rhevm-4.3.z': '?'}', ]

For more info please contact: rhv-devops

Comment 8 Polina 2019-07-02 08:30:12 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 10 errata-xmlrpc 2019-08-12 11:53:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHEA-2019:2431