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

Bug 1499181

Summary: [downstream clone - ] [RFE] - Implement 'Sync MoM policy' support in REST API
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
Component: ovirt-engineAssignee: Nobody <nobody>
Status: CLOSED WONTFIX QA Contact: Liran Rotenberg <lrotenbe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: bazulay, bugs, dfediuck, jentrena, juan.hernandez, lsurette, mavital, mgoldboi, mkalinin, pdwyer, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ---Keywords: FutureFeature, ZStream
Target Release: ---Flags: mavital: testing_plan_complete-
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1226974 Environment:
Last Closed: 2018-01-30 09:33:14 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: 1226974    
Bug Blocks: 1523346    

Description rhev-integ 2017-10-06 10:07:36 UTC
+++ This bug is an upstream to downstream clone. The original bug is: +++
+++   bug 1226974 +++
======================================================================

Description of problem:
Please implement 'Sync MoM policy' support in REST API.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

(Originally by Shira Maximov)

Comment 1 rhev-integ 2017-10-06 10:07:46 UTC
Juan,
currently there are no hosts under a specific cluster.
Where would it be best to add this action?

(Originally by Doron Fediuck)

Comment 2 rhev-integ 2017-10-06 10:07:52 UTC
I'll need to understand whth "sync mom policy" means in order to answer. Can you elaborate?

(Originally by juan.hernandez)

Comment 3 rhev-integ 2017-10-06 10:07:58 UTC
(In reply to Juan Hernández from comment #2)
> I'll need to understand whth "sync mom policy" means in order to answer. Can
> you elaborate?

Sure.
This button triggers sending a command to the relevant VDS with latest
information on KSM and ballooning:
org.ovirt.engine.core.bll.UpdateMomPolicyCommand

The idea is that we usually update mom policy when a host becomes operational (up). However in case of emergency you can issue a command to enable/disable the relevant feature in the selected host.

(Originally by Doron Fediuck)

Comment 4 rhev-integ 2017-10-06 10:08:05 UTC
If I understand correctly then this should be an operation of the "host" resource:

  POST /hosts/{host:id}/syncmompolicy

(Originally by juan.hernandez)

Comment 5 rhev-integ 2017-10-06 10:08:11 UTC
(In reply to Juan Hernández from comment #4)
> If I understand correctly then this should be an operation of the "host"
> resource:
> 
>   POST /hosts/{host:id}/syncmompolicy

This is what I had in mind. The only issue is that in the UI this option
is only available in the cluster main tab (hosts sub tab), and you will not
see it in the hosts tab.

If you use your suggestion will it make an anomaly compared to the UI?

(Originally by Doron Fediuck)

Comment 6 rhev-integ 2017-10-06 10:08:17 UTC
The RESTAPI doesn't need to mirror the UI.

The UI is volatile, and the graphical designers may decide to move the button to somewhere else in the future. On the other hand the RESTAPI needs to be stable and backwards compatible. We can't make design decisions based on what the UI does.

If the operation affects a host then its place is the /hosts/{host:id} resource.

Alternatively, if the operation affects all the hosts in a cluster, then it can be added to the /clusters/{cluster:id} resource, but my understanding is that it is an operation that affects a individual host.

(Originally by juan.hernandez)

Comment 7 rhev-integ 2017-10-06 10:08:23 UTC
(In reply to Juan Hernández from comment #6)

> 
> If the operation affects a host then its place is the /hosts/{host:id}
> resource.
> 
> Alternatively, if the operation affects all the hosts in a cluster, then it
> can be added to the /clusters/{cluster:id} resource, but my understanding is
> that it is an operation that affects a individual host.

This is acceptable. Thanks.

(Originally by Doron Fediuck)

Comment 14 Franta Kust 2019-05-16 12:55:00 UTC
BZ<2>Jira re-sync