Description of problem: When trying to sparsify a direct lun via the REST API, a NullPointerException is returned as a "500 Internal Server Error". Version-Release number of selected component (if applicable): f1f158fa491a2cb7fe4551bcc3fe878d5c0b2b8f How reproducible: 100% Steps to Reproduce: 1. Have a direct lun. 2. Try to sparsify it via the REST API: POST http://<host_name>:8080/ovirt-engine/api/disks/<direct_lun_id>/sparsify Actual results: 500 Internal Server Error <action> <fault> <detail>java.lang.NullPointerException</detail> <reason>Operation Failed</reason> </fault> <status>failed</status> </action> Expected results: Should be passed to the backend and let it return an error message that direct luns can't be sparsified.
*** Bug 1418255 has been marked as a duplicate of this bug. ***
Trying with the new build rhevm-4.1.1.2-0.1.el7.noarch I do not get NullPointerException any more, but still the detail of the failure is incorrect, I get: <action> <async>false</async> <fault> <detail>[User is not authorized to perform this action.]</detail> <reason>Operation Failed</reason> </fault> <grace_period> <expiry>10</expiry> </grace_period> <status>failed</status> </action> This is although I'm running the cmd as admin with superUser permissions on the vm, just the same as other vms with which the sparsify action works or fails with specific msg, e.g. [Cannot sparsify Virtual Disk. Sparsifying is not supported for preallocated disk bla_Disk1.] Please check it out.
Verifying the bug as it handles the NullPointerException issue, but opening a new one regarding the new issue: https://bugzilla.redhat.com/show_bug.cgi?id=1428404