Bug 1069581 - [engine-backend] NullPointerException for CanDoAction failure of reconstruct master during re-initialize to a new DC from an unattached domain
Summary: [engine-backend] NullPointerException for CanDoAction failure of reconstruct ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.4
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.5.0
Assignee: Liron Aravot
QA Contact: nlevinki
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-25 10:41 UTC by Elad
Modified: 2016-02-10 16:44 UTC (History)
5 users (show)

Fixed In Version: ovirt-3.5.0-alpha1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-17 12:28:18 UTC
oVirt Team: Storage
Embargoed:


Attachments (Terms of Use)
engine and vdsm logs (933.62 KB, application/x-gzip)
2014-02-25 10:41 UTC, Elad
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 25051 0 None MERGED webadmin: block reinitialize on uninitalized pool Never

Description Elad 2014-02-25 10:41:38 UTC
Created attachment 867348 [details]
engine and vdsm logs

Description of problem:
Re-initialize DC from an unattached domain for a new DC, which wasn't initialized before, fails with a NullPointerException for CanDoAction failure of reconstruct master. This DC was never initialized before so reconstruct master should not take place.  

Version-Release number of selected component (if applicable):
ovirt-engine-3.4.0-0.11.beta3.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create an unattached storage domain (attach it to DC 'none') 
2. Create a new DC 
3. Re-initialize the new DC from the unattached storage domain

Actual results:
Engine tries to perform a recovery to the storage pool, but the DC is new and doesn't contain any storage domain, so there is no old master domain.

===========
2014-02-25 12:29:42,369 ERROR [org.ovirt.engine.core.bll.storage.RecoveryStoragePoolCommand] (ajp--127.0.0.1-8702-15) [6d77107d] Error during CanDoActionFailure.: java.lang.NullPointerException
        at org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.canDoAction(ReconstructMasterDomainCommand.java:68) [bll.jar:]
        at org.ovirt.engine.core.bll.storage.RecoveryStoragePoolCommand.canDoAction(RecoveryStoragePoolCommand.java:52) [bll.jar:]
===========

Expected results:
Engine should skip the storage pool recovery phase because the DC is new when initializing it from an unattached domain.


User Impact:
The main impact here would be the failure to detach a storage domain from an existing DC and attaching it to a new one.


Additional info: engine and vdsm logs

Comment 1 Elad 2014-02-25 11:55:41 UTC
Reproduced also with RHEV-3.3 (rhevm-3.3.0-0.42.el6ev.noarch)

Comment 2 Elad 2014-05-27 09:36:53 UTC
The option to re-initialize a non-initialized DC is now blocked by engine, it's greyed out in webadmin.
This was tested only in webadmin and not in other APIs. Therefore, I'm leaving the bug as ON_QA until we will have the option to perform re-initialize DC from an unattached domain also via REST API.

Tested on ovirt-3.5.0-alpha1

Comment 3 Gadi Ickowicz 2014-06-17 12:13:09 UTC
Setting verified as per comment 2. Was not yet tested in REST API since RFE is not yet implemented

Comment 5 Sandro Bonazzola 2014-10-17 12:28:18 UTC
oVirt 3.5 has been released and should include the fix for this issue.


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