Description of problem: When trying to import a VM from previously used SD in other engine (3.6), Import VM dialog closes but no action was occuring. Observing log, there's JNPE with: ~~~ 2017-08-04 10:01:11,730+02 INFO [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (org.ovirt.thread.pool-6-thread-38) [e77253c4-39cd-4669-9886-b7d451cb615b] Running command: ImportVmFromConfigurationCommand(Vm = VM [jbelka-vhost1], ClusterId = 4031fc6b-eafb-4b84-87d2-301d0ea1d085, StorageDomainId = 37869d55-f792-42e3-89f3-e0022c559eb9, StoragePoolId = 5183b13e-02e4-4659-88d2-fd0aee9433ea, SourceDomainId = 37869d55-f792-42e3-89f3-e0022c559eb9, DestDomainId = 37869d55-f792-42e3-89f3-e0022c559eb9, ImageToDestinationDomainMap = null, CopyCollapse = false, ForceOverride = false, AllowPartialImport = false, ExternalVnicProfileMappings = [], ReassignBadMacs = false, ImagesExistOnTargetStorageDomain = true, DiskMap = null, CpuProfileId = null, ContainerId = 8f8fc16a-23ee-4621-a971-fd4b5e5fe3bd, ImportAsNewEntity = false, VmId = 8f8fc16a-23ee-4621-a971-fd4b5e5fe3bd, QuotaId = null) internal: false. Entities affected : ID: 37869d55-f792-42e3-89f3-e0022c559eb9 Type: StorageAction group IMPORT_EXPORT_VM with role type ADMIN, ID: 37869d55-f792-42e3-89f3-e0022c559eb9 Type: StorageAction group IMPORT_EXPORT_VM with role type ADMIN ... 2017-08-04 10:01:11,913+02 ERROR [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (org.ovirt.thread.pool-6-thread-38) [e77253c4-39cd-4669-9886-b7d451cb615b] Command ' org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand' failed: null 2017-08-04 10:01:11,913+02 ERROR [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (org.ovirt.thread.pool-6-thread-38) [e77253c4-39cd-4669-9886-b7d451cb615b] Exception: java.lang.NullPointerException at org.ovirt.engine.core.bll.exportimport.ImportVmCommand.createMemoryDisk(ImportVmCommand.java:1006) [bll.jar:] at org.ovirt.engine.core.bll.exportimport.ImportVmCommand.lambda$addMemoryImages$2(ImportVmCommand.java:994) [bll.jar:] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) [rt.jar:1.8.0_131] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [rt.jar:1.8.0_131] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) [rt.jar:1.8.0_131] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) [rt.jar:1.8.0_131] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) [rt.jar:1.8.0_131] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) [rt.jar:1.8.0_131] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) [rt.jar:1.8.0_131] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [rt.jar:1.8.0_131] at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) [rt.jar:1.8.0_131] at org.ovirt.engine.core.bll.exportimport.ImportVmCommand.addMemoryImages(ImportVmCommand.java:993) [bll.jar:] at org.ovirt.engine.core.bll.exportimport.ImportVmCommand.lambda$processImages$0(ImportVmCommand.java:678) [bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:202) [utils.jar:] at org.ovirt.engine.core.bll.exportimport.ImportVmCommand.processImages(ImportVmCommand.java:676) [bll.jar:] at org.ovirt.engine.core.bll.exportimport.ImportVmCommand.processImages(ImportVmCommand.java:668) [bll.jar:] at org.ovirt.engine.core.bll.exportimport.ImportVmCommandBase.executeVmCommand(ImportVmCommandBase.java:406) [bll.jar:] at org.ovirt.engine.core.bll.exportimport.ImportVmCommand.executeVmCommand(ImportVmCommand.java:282) [bll.jar:] at org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand.executeVmCommand(ImportVmFromConfigurationCommand.java:216) [bll.jar:] at org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:120) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1251) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1391) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:2055) [bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:164) [utils.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:103) [utils.jar:] at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1451) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:397) [bll.jar:] at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.executeValidatedCommand(PrevalidatingMultipleActionsRunner.java:204) [bll.jar:] at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.runCommands(PrevalidatingMultipleActionsRunner.java:176) [bll.jar:] at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.lambda$invokeCommands$3(PrevalidatingMultipleActionsRunner.java:182) [bll.jar:] at org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:84) [utils.jar:] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_131] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_131] at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_131] ~~~ Version-Release number of selected component (if applicable): ovirt-engine-4.1.4.2-0.1.el7.noarch How reproducible: once Steps to Reproduce: 1. have old 3.6 env, add a temp NFS share for test 2. move a vm image to this temp NFS and detach/remove the temp NFS share from 3.6 engine 3. have 4.1 env, attach the temp NFS share 4. import VM from the temp NFS Actual results: no task submitted although the UI dialog closes. there's JNPE in the log with ERROR level Expected results: should work Additional info:
I was not correct about 'no action was occuring' and 'no task submitted'. I was expecting to see > 0 in Tasks bar but it was so quickly failed that the number was '0'... Anyway, I'd love to see a way to import VMs from data SDs. ~~~ engine=# select * from job; job_id | action_type | description | status | owner_id | visible | start_time | end_time | last_update_time | correlation_id | is_external | is_auto_cleared | engine_session_seq_id --------------------------------------+---------------------------+-----------------------------------------------------------------+--------+--------------------------------------+---------+ ----------------------------+----------------------------+----------------------------+--------------------------------------+-------------+-----------------+----------------------- b7001909-3990-4af9-818f-45cfa347b761 | ImportVmFromConfiguration | Importing VM jbelka-vhost1 from configuration to Cluster test01 | FAILED | 03656fe1-8a08-4926-b874-168bcec474af | t | 2017-08-04 03:45:47.033-04 | 2017-08-04 03:45:47.379-04 | 2017-08-04 03:45:47.379-04 | 0560a140-d6cd-42fb-99de-0a7fd96afd69 | f | t | 45570 f6657a5f-7b62-4ace-a4e0-edd466550082 | ImportVmFromConfiguration | Importing VM jbelka-vhost1 from configuration to Cluster test01 | FAILED | 03656fe1-8a08-4926-b874-168bcec474af | t | 2017-08-04 03:47:32.311-04 | 2017-08-04 03:47:32.613-04 | 2017-08-04 03:47:32.613-04 | 91023f53-a013-445b-be48-7bb073557aa8 | f | t | 45570 cf54692d-55c7-4561-bbdf-9dfcefd00133 | ImportVmFromConfiguration | Importing VM jbelka-vhost1 from configuration to Cluster test01 | FAILED | 03656fe1-8a08-4926-b874-168bcec474af | t | 2017-08-04 03:56:18.801-04 | 2017-08-04 03:56:19.034-04 | 2017-08-04 03:56:19.034-04 | 08e1a9e7-682f-4401-84e0-145c86df0d3e | f | t | 45570 25d2025d-ae83-4d3a-85b2-2845b6015373 | ImportVmFromConfiguration | Importing VM jbelka-vhost1 from configuration to Cluster test01 | FAILED | 03656fe1-8a08-4926-b874-168bcec474af | t | 2017-08-04 04:01:11.717-04 | 2017-08-04 04:01:11.923-04 | 2017-08-04 04:01:11.923-04 | e77253c4-39cd-4669-9886-b7d451cb615b | f | t | 45570 (4 rows) ~~~
Possibly related to bug 1461387
Hi Jiri, Can you please share the OVF of the VM: SELECT ovf_data FROM unregistered_ovf_of_entities where entity_guid = '8f8fc16a-23ee-4621-a971-fd4b5e5fe3bd' It looks like the storage domain which the memory snapshot is reside on is not exists (could be that it was not imported) we can verify that with the OVF that you will provide
If there's another build for 4.1.5 I'd like to get this in, but we shouldn't block on it.
(In reply to Maor from comment #4) > Hi Jiri, > > Can you please share the OVF of the VM: > SELECT ovf_data FROM unregistered_ovf_of_entities where entity_guid = > '8f8fc16a-23ee-4621-a971-fd4b5e5fe3bd' > > It looks like the storage domain which the memory snapshot is reside on is > not exists (could be that it was not imported) we can verify that with the > OVF that you will provide engine=# SELECT ovf_data FROM unregistered_ovf_of_entities where entity_guid = '8f8fc16a-23ee-4621-a971-fd4b5e5fe3bd'; ovf_data ---------- (0 rows)
Thanks for the output Jiri. Can you please upload the engine log again, the character set doesn't seems to be readable. Also, can you please share the output of the unregistered_ovf_of_entities table: SELECT * FROM unregistered_ovf_of_entities;
Hi Jiri, Besides the null exception, I could not find anything in the log which could help me to find the root cause of your issue. I assumed that this is because your memory volume's storage domain does not exists in your setup. In that case the import should fail with a proper error message instead of null. I uploaded two patches that should fix that issue. If you still have the storage domain with this VM which I can use to reproduce your exception that could be great, if not I assume I will continue with the fix which I prepared.
Verified with the following code: --------------------------------------- ovirt-engine-4.1.6.2-0.1.el7.noarch vdsm-4.19.31-1.el7ev.x86_64 Verified with the following scenario: -------------------------------------- Steps to Reproduce: 1. have old 3.6 env, add a temp NFS share for test 2. move a vm image to this temp NFS and detach/remove the temp NFS share from 3.6 engine 3. have 4.1 env, attach the temp NFS share 4. import VM from the temp NFS - Now an error is reported indicating the the VM cannot be imported Moving to VERIFIED