Created attachment 1268167 [details] logs Description of problem: On upgrade environment from 3.5: Failed to create template from VM snapshot (with/without memory) Version-Release number of selected component (if applicable): 4.1.1.6-0.1.el7 Steps to Reproduce: 1. On Running VM form 3.5 create snapshot with and without memory 2. On each snapshot create Template as a Template Sub Version and copy user permissions Actual results: Action failed with Server Internal Error Expected results: Template will created Additional info: Engine log: 2017-04-01 20:37:41,454+02 INFO [org.ovirt.engine.core.bll.tasks.CommandAsyncTask] (org.ovirt.thread.pool-6-thread-12) [89e83135-d1c7-44a9-be0b-c06ab581e982] CommandAsyncTask::endCommandAction [within thread] context: Attempting to endAction 'AddVmTemplateFromSnapshot', 2017-04-01 20:37:41,455+02 ERROR [org.ovirt.engine.core.bll.tasks.CommandAsyncTask] (org.ovirt.thread.pool-6-thread-12) [89e83135-d1c7-44a9-be0b-c06ab581e982] [within thread]: endAction for action type AddVmTemplateFromSnapshot threw an exception.: java.lang.NullPointerException at org.ovirt.engine.core.bll.tasks.CoCoAsyncTaskHelper.endAction(CoCoAsyncTaskHelper.java:335) [bll.jar:] at org.ovirt.engine.core.bll.tasks.CommandCoordinatorImpl.endAction(CommandCoordinatorImpl.java:340) [bll.jar:] at org.ovirt.engine.core.bll.tasks.CommandAsyncTask.endCommandAction(CommandAsyncTask.java:154) [bll.jar:] at org.ovirt.engine.core.bll.tasks.CommandAsyncTask.lambda$endActionIfNecessary$0(CommandAsyncTask.java:106) [bll.jar:] at org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:92) [utils.jar:] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_121] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_121] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121] 2017-04-01 20:37:41,457+02 INFO [org.ovirt.engine.core.bll.tasks.CommandAsyncTask] (org.ovirt.thread.pool-6-thread-12) [89e83135-d1c7-44a9-be0b-c06ab581e982] CommandAsyncTask::HandleEndActionResult: endAction for action type 'AddVmTemplateFromSnapshot' threw an unrecoverable RuntimeException the task will be cleared.
Arik, can you take a look?
the root cause looks like: " Caused by: java.lang.IllegalStateException: At most one USB controller expected for VM=STAYING_ALIVE " So very related to https://bugzilla.redhat.com/show_bug.cgi?id=1430009 Seems the case of adding a vm from snapshot is not handled, checking.
This is the flow which causes the issue: - a VM is started on an older (pre 4.0 engine) - in this engines, if the USB is configured as disabled, no USB device is sent to VDSM - libvirt reacts by creating a new unmanaged USB controller - this controller appears in engine as an unmanaged device - after updating the engine, update of all VMs is called to modify the devices according to the need of the new engine - this code adds a managed USB controller - in this stage, this VM has 2 USB controllers, one managed and one unmanaged - from this point, anytime the USB devices are about to be touched (e.g. creating a new template from this VM or from a snapshot of the VM) a sanity check checking that there is only 1 USB controller fails throwing an exception There is a workaround to turn the VM off, switch the USB to enabled, save the VM, than back to disabled.
*** Bug 1436247 has been marked as a duplicate of this bug. ***
1436247 was reported on 2017-03-27 09:49 EDT by Nikolai Sednev and was opened earlier than 1438188 (this bug), latest was opened on 2017-04-01 14:59 EDT by Israel Pinto. Please close 1438188 as duplicate of 1436247 and not vice versa.
I don't think it matters, this bug has a concise root cause analysis in comment #3 so keeping the most relevant bug open
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
Verify with: RHVM Version: 4.1.2.2-0.1.el7 Host: OS Version:RHEL - 7.3 - 7.el7 Kernel Version:3.10.0 - 327.28.3.el7.x86_64 KVM Version:2.6.0 - 28.el7_3.9 LIBVIRT Version:libvirt-2.0.0-10.el7_3.5 VDSM Version:vdsm-4.19.15-1.el7ev Steps: 1. On Running VM form 3.5 create snapshot with and without memory 2. On each snapshot create Template as a Template Sub Version and copy user Results: Template created.