Bug 1958047

Summary: NullPointerException during VM export to data domain
Product: [oVirt] ovirt-engine Reporter: Lucia Jelinkova <ljelinko>
Component: BLL.StorageAssignee: Eyal Shenitzky <eshenitz>
Status: CLOSED CURRENTRELEASE QA Contact: Evelina Shames <eshames>
Severity: high Docs Contact:
Priority: unspecified    
Version: futureCC: ahadas, bugs, eshames, eshenitz, michal.skrivanek, sfishbai
Target Milestone: ovirt-4.4.7Keywords: ZStream
Target Release: 4.4.7Flags: pm-rhel: ovirt-4.4+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-06 07:28:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Engine log. none

Description Lucia Jelinkova 2021-05-07 05:58:58 UTC
Description of problem:

When exporting the VM (the "new" export button), the following exception occurs:

null: java.lang.NullPointerException
	at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.shouldUseDiskBitmaps(ImagesHandler.java:1122)
	at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupVolumesDataCommand.copyVolumeData(CopyImageGroupVolumesDataCommand.java:141)
	at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupVolumesDataCommand.performNextOperation(CopyImageGroupVolumesDataCommand.java:111)
	at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.SerialChildCommandsExecutionCallback.childCommandsExecutionEnded(SerialChildCommandsExecutionCallback.java:32)
	at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.ChildCommandsCallbackBase.doPolling(ChildCommandsCallbackBase.java:80)
	at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.tasks.CommandCallbacksPoller.invokeCallbackMethodsImpl(CommandCallbacksPoller.java:175)
	at deployment.engine.ear.bll.jar//org.ovirt.engine.core.bll.tasks.CommandCallbacksPoller.invokeCallbackMethods(CommandCallbacksPoller.java:109)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)

How reproducible:
always

Steps to Reproduce:
1. Create a VM with a disk
2. Click the export button
3. Fill in the form and confirm

Actual results:
The export fails

Expected results:
The export should succeed

Additional info:

The exception occurs in ImagesHandler::shouldUseDiskBitmaps method. It was probably introduced with the following patch:

https://gerrit.ovirt.org/#/c/ovirt-engine/+/114561/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/ImagesHandler.java

Comment 1 Michal Skrivanek 2021-05-08 04:46:21 UTC
How is this export different from the export test in OST?

Comment 2 Arik 2021-05-08 14:45:55 UTC
in OST we test exporting a VM to an OVA
this functionality seems different as you select a target storage domain - it's probably not really about exporting the VM but rather ensuring the vm configuration and its disks reside on the target storage domain I suppose

Comment 3 Eyal Shenitzky 2021-05-09 05:01:51 UTC
Lucia, 

Are you trying to export the VM to an export domain or to a data domain?

Also, please attach engine logs.

Comment 4 Eyal Shenitzky 2021-05-09 05:03:15 UTC
(In reply to Eyal Shenitzky from comment #3)
> Lucia, 
> 
> Are you trying to export the VM to an export domain or to a data domain?
> 
> Also, please attach engine logs.

Another thing is that fix for bug 1954447 merged only to 4.4.7 and not 4.4.6.
Can you please confirm the engine version?

Comment 5 Evelina Shames 2021-05-10 11:03:46 UTC
Lucia, 

Can you pls share on which storage domain type the VM's disks reside?
What is the target storage domain type?
Did you try to export with/without collapse snapshots?

Thanks

Comment 6 Lucia Jelinkova 2021-05-10 11:33:48 UTC
Created attachment 1781670 [details]
Engine log.

Comment 7 Lucia Jelinkova 2021-05-10 11:50:39 UTC
Sorry, I selected the last available release, but I am experiencing it on master. I've removed the "Version" now.

I exported from Data master (NFS) to another Data (NFS). It works with Collapse snapshots checked, but fails if it is unchecked (that is the default option in the dialog).

Comment 8 Avihai 2021-05-10 14:13:02 UTC
Just to clarify in rhv-4.4.6 (RC/0day) this was tested and works.

It was broken in master meaning it's broken in 4.4.7 only.

Comment 9 Michal Skrivanek 2021-05-12 06:33:44 UTC
(In reply to Avihai from comment #8)
> Just to clarify in rhv-4.4.6 (RC/0day) this was tested and works.
> 
> It was broken in master meaning it's broken in 4.4.7 only.

thanks for confirmation

Comment 10 Evelina Shames 2021-06-02 07:20:05 UTC
Verified on ovirt-engine-4.4.7-0.23.el8ev.noarch.

Comment 11 Sandro Bonazzola 2021-07-06 07:28:28 UTC
This bugzilla is included in oVirt 4.4.7 release, published on July 6th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.7 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.