Bug 1974974

Summary: Not possible to determine migration policy from the API, even though documentation reports that it can be done.
Product: Red Hat Enterprise Virtualization Manager Reporter: Allie DeVolder <adevolder>
Component: ovirt-engineAssignee: Shmuel Melamud <smelamud>
Status: CLOSED ERRATA QA Contact: Qin Yuan <qiyuan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.7CC: ahadas, mavital, mperina, mzamazal, rmcswain
Target Milestone: ovirt-4.5.2   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-08 11:28:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Allie DeVolder 2021-06-22 21:18:35 UTC
Description of problem: Not possible to determine migration policy from the API, even though documentation reports that it can be done.


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

How reproducible:
100%

Steps to Reproduce:
1. Configure RHV with a migration policy for VMs
2. Use API to determine migration policy for a VM

Actual results:
API returns a UUID for the migration policy that cannot be used to obtain useful details about the meaning of that policy.

Expected results:
If a UUID is returned, the details the UUID represents should also be available from the API as documented.

Additional info:
- Migration Options are documented here: https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.4/html/rest_api_guide/types#types-migration_options
  Table 7.222 in this documentation states that it provides "A reference to the migration policy, as defined using engine-config."
- Using "SystemOptions" with the API is strongly recommended against, as the documentation states "We strongly discourage the use of this service for applications other than the ones that are released simultaneously with the engine. Usage by other applications is not supported. Therefore there will be no documentation listing accessible configuration options."
- Further, it states "There is NO backward compatibility and no guarantee about the names or values of the options. Options may be removed and their meaning can be changed at any point."
- Finally, ovirt-engine/api/options/MigrationPoliciesSupported in the API returns a 404

Comment 10 Qin Yuan 2022-08-11 09:40:44 UTC
Checked the latest https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.4/html/rest_api_guide:
1. All MigrationPoliciesSupported are replaced by MigrationPolicies.
2. The Note "API for querying migration policy by ID returned by this method is not implemented yet. Use /ovirt-engine/api/options/MigrationPolicies to get a list of all migration policies with their IDs." is added.

Comment 14 errata-xmlrpc 2022-09-08 11:28:54 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 (Important: RHV Manager (ovirt-engine) [ovirt-4.5.2] bug fix and security update), 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/RHSA-2022:6393