Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1359883 - [API v4] When there are no hosts available in cluster addVmPool fails with NullPointerException
Summary: [API v4] When there are no hosts available in cluster addVmPool fails with Nu...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: ovirt-4.1.0-alpha
: 4.1.0.2
Assignee: Shmuel Melamud
QA Contact: sefi litmanovich
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-25 15:38 UTC by sefi litmanovich
Modified: 2017-02-01 14:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:38:31 UTC
oVirt Team: Virt
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)
engine + server logs (deleted)
2016-07-25 15:38 UTC, sefi litmanovich
no flags Details


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 63655 master MERGED core: vmpools: Check storage status before building disk map 2016-10-10 08:21:52 UTC

Description sefi litmanovich 2016-07-25 15:38:45 UTC
Created attachment 1183853 [details]
engine + server logs

Description of problem:
During our automation testing all the hosts in the cluster were non-operational or in maintenance.
When an attempt was done to create a vm pool, it failed but with an error which is too general and doesn't reflect the actual reason:

Status: 500
Reason: Internal Server Error
Detail: java.lang.NullPointerException

In engine log there's a long trance that starts with:

2016-07-23 16:07:35,070 ERROR [org.ovirt.engine.core.bll.CommandsFactory] (default task-7) [vmpools_create_aa8f40ab-39a8-4a49] An exception has occured while trying to create a command object for command 'AddVmPoolWithVms': WELD-000049: U
nable to invoke protected final void org.ovirt.engine.core.bll.CommandBase.postConstruct() on org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand@3b7aa1f9
2016-07-23 16:07:35,110 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-7) [] Operation Failed: java.lang.NullPointerException
2016-07-23 16:07:35,110 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-7) [] Exception: javax.ejb.EJBException: java.lang.NullPointerException

Re produced this later also when all the hosts are on maintenance in another env.

Version-Release number of selected component (if applicable):
rhevm-4.0.2-0.2.rc1.el7ev.noarch

How reproducible:
alwyas

Steps to Reproduce:
1. Put all hosts in maintenance in a certain cluster.
2. Attempt to add a vm pool via API (v4)


Actual results:

Status: 500
Reason: Internal Server Error
Detail: java.lang.NullPointerException

Expected results:
The actual reason for the error: "Storage domain is not in state up, no hosts available in cluster" or the actual error message that already exists in these cases for e.g. attempting to create a vm in these conditions.

Additional info:

Comment 1 Sandro Bonazzola 2016-12-12 13:57:32 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 2 sefi litmanovich 2016-12-19 10:24:55 UTC
ovirt-engine-4.1.0-0.2.master.20161218144454.gitbaa2853.el7.centos.noarch


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