Created attachment 1867750 [details] engine log Description of problem: Adding host by REST API to the affinity group with wrong ID fails with NullPointerException trace instead of normal error (400 or 404) saying about wrong affinity group id Version-Release number of selected component (if applicable): ovirt-engine-4.5.0.1-601.f26e9ea8cac5.3.el8ev.noarch How reproducible:100% Steps to Reproduce: POST https://{{host}}/ovirt-engine/api/clusters/{clusterId}/affinitygroups/{affinitygroupID_WRONG}/hosts body: <host><name>host_mixed_2</name></host> Actual results: 500 Internal error with NullPointerException trace in log Error during ValidateFailure.: java.lang.NullPointerException at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.scheduling.commands.AffinityGroupCRUDCommand.getClusterId(AffinityGroupCRUDCommand.java:205) ...... Expected results: either 404 (entity not found) or 400 (bad request ) Additional info:
verified on ovirt-engine-4.5.2-0.3.el8ev.noarch now we get 404 response on such request and no NullPointerException.
This bugzilla is included in oVirt 4.5.2 release, published on August 10th 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.2 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.