Bug 1724632 - When setting high custom compatibility version with ovirt_vm, java exception is returned
Summary: When setting high custom compatibility version with ovirt_vm, java exception ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.4.0
: ---
Assignee: Ori Liel
QA Contact: Pavol Brilla
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-27 12:53 UTC by Jan Zmeskal
Modified: 2020-04-16 10:36 UTC (History)
4 users (show)

Fixed In Version: rhv-4.4.0-29
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-16 10:36:55 UTC
oVirt Team: Infra
Embargoed:
pm-rhel: ovirt-4.4+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 103301 0 master MERGED Update-Vm Unsupported Cluster Version 2020-04-16 10:28:34 UTC
oVirt gerrit 103440 0 master MERGED restapi: Add-Vm invalid cluster compatibility level 2020-04-16 10:28:34 UTC

Description Jan Zmeskal 2019-06-27 12:53:54 UTC
Description of problem:
I was using custom_compatibility_version parameter of ovirt_vm module to set custom compatibility version of a VM to value higher than engine's version. I had engine of version 4.3 and set custom compatibility version to 4.4. This of course shouldn't work and that's all right. However, if use attempts it, they should get back some sensible error message from Ansible. Meanwhile, I got this:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Fault reason is \"Operation Failed\". Fault detail is \"java.lang.NullPointerException\". HTTP response code is 500."}


Version-Release number of selected component (if applicable):
ansible 2.8.1
rhvm-4.3.5.1-0.1.el7.noarch

How reproducible:
100 %

Steps to Reproduce:
1. Have a VM in your 4.3 engine (test_vm in our case)
2. Run this playbook:

- name: Try setting too high custom compatibility version
  hosts: localhost
  tasks:
    
    - name: Obtain SSO token with using username/password credentials
      ovirt_auth:
        url: https://<your_engine>/ovirt-engine/api
        username: admin@internal
        password: '<your_pass>'
        insecure: yes 

    - name: Set custom compatibility version
      ovirt_vm:
        auth: "{{ ovirt_auth }}"
        name: test_vm
        custom_compatibility_version: 4.4 

Actual results:
java.lang.NullPointerException is returned

Expected results:
Some informative, user-friendly message should be returned

Comment 1 Martin Perina 2019-06-28 08:37:35 UTC
Could you please add engine logs? NPE looks like there is issue in the engine rather than Ansible modules ...

Comment 3 Martin Perina 2019-06-28 11:40:35 UTC
It's RESTAPI issue moving to engine

Comment 5 Lukas Svaty 2020-04-16 10:36:55 UTC
Closing low severity bugs, based on QE capacity, if you would like to still verify this issue please reopen.


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