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 1062435 - PRD35 - [RFE] have rhevm-shell and API provide same functionality that the UI does for ovirt-scheduler-proxy [NEEDINFO]
Summary: PRD35 - [RFE] have rhevm-shell and API provide same functionality that the UI...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.5.0
Assignee: Gilad Chaplik
QA Contact: Artyom
URL:
Whiteboard: sla
Depends On:
Blocks: 1076705 1108602 rhev3.5beta 1156165
TreeView+ depends on / blocked
 
Reported: 2014-02-06 23:08 UTC by Dave Sullivan
Modified: 2018-12-06 15:53 UTC (History)
16 users (show)

Fixed In Version: vt2.2
Doc Type: Enhancement
Doc Text:
With this update, users can now add, update, and delete scheduling policies through the REST API.
Clone Of:
: 1108602 (view as bug list)
Environment:
Last Closed: 2015-02-11 17:58:02 UTC
oVirt Team: SLA
Target Upstream Version:
ylavi: needinfo? (dsulliva)
sherold: Triaged+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0158 normal SHIPPED_LIVE Important: Red Hat Enterprise Virtualization Manager 3.5.0 2015-02-11 22:38:50 UTC
oVirt gerrit 28093 master MERGED restapi: Introducing Scheduling Policy API Never

Description Dave Sullivan 2014-02-06 23:08:19 UTC
Description of problem:

We need to have control of RHEV-M engine guest placement to enforce our business rules.  The expectation is that we will use the Scheduler API features introduced in 3.3 to do this.  The ovirt-scheduler-proxy seems to be the immediate path to this.

When the scheduler proxy is running and external scheduling enabled in RHEV-M, RHEV-M doesn't expose or automatically place the external schedulers into the default cluster policy(None).  I don't see a way via rhevm-shell or the API to create new policies or modify the None policy such that these policy units from the external scheduler can be effective.  That's left me modifying the engine database to test this stuff.

Here is what I'm currently doing to enable testing of an external scheduler:
# On the RHEV Manager:
[root@lb0160 ~]# chkconfig ovirt-scheduler-proxy on
[root@lb0160 ~]# service ovirt-scheduler-proxy start
Starting oVirt Scheduler Proxy:                            [  OK  ]
[root@lb0160 ~]# rhevm-config -s ExternalSchedulerEnabled=true
* Placed a functional version of
/usr/share/doc/ovirt-scheduler-proxy-0.1.3/plugins/examples/max_vm_filter.py at:
/usr/share/ovirt-scheduler-proxy/plugins/max_vm_filter.py

# engine database change
# set the maximum_vm_count property used by max_vm_filter.py in the test
# cluster's policy custom properties:
engine=> update vds_groups set cluster_policy_custom_properties = '{
   "maximum_vm_count" : "2"
 }' where name = 'rhevc-west';

# engine database change
# Add the "max_vms" policy unit discovered by the engine from the external
# scheduler proxy script to the "None" cluster scheduling policy:
engine=> cluster_policy_units (cluster_policy_id, policy_unit_id, filter_sequence, factor) select cp.id, pu.id, 0, 0 from (select id from cluster_policies where name = 'None') as cp, (select id from policy_units where name = 'max_vms') as pu;

# restart the engine because I'm not familiar with the data access
[root@lb0160 ~]# service ovirt-engine restart


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

3.3.0 GA

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Working From UI:

in order to use an external module you will need to create a new cluster policy,
which is a system-level activity. This is done using the 'Configure' link-button on the upper-right corner of the screen. Once you press it, you'll be able to see a dialog with a side-tab called 'Cluster Policies'. Here is where the admin manages non-default cluster policies.  Use the copy button for an existing policy. You should be able to see an indication of (EXT) for your filter on the right list (disabled filters). Use drag and drop
to move it to the left side. Give a name to this policy. Next, close the dialogs and go to the relevant cluster in the cluster main tab. right click and choose edit. In the policy tab, you should be able to see your new policy.

Comment 1 Doron Fediuck 2014-02-09 11:09:42 UTC
rhevm-shell is built on top of the SDK, which is using the REST API.
So this feature is basically about supporting scheduling policy (including
external module updates) in the REST API.

Comment 5 Itamar Heim 2014-06-12 18:08:06 UTC
*** Bug 1108601 has been marked as a duplicate of this bug. ***

Comment 6 Artyom 2014-10-01 06:11:50 UTC
Verified on rhevm-3.5.0-0.13.beta.el6ev.noarch.
Checked possibility via REST to:
- remove external scheduler unit
- add external scheduler unit to user policy
- remove external scheduler unit from user policy

Comment 13 errata-xmlrpc 2015-02-11 17:58:02 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://rhn.redhat.com/errata/RHSA-2015-0158.html


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