Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1944637

Summary: Power off and removing VM during reboot with VM next run configuration causes error
Product: [oVirt] ovirt-engine Reporter: Ivana Saranova <isaranov>
Component: BLL.VirtAssignee: Shmuel Melamud <smelamud>
Status: CLOSED CURRENTRELEASE QA Contact: Qin Yuan <qiyuan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.5.11CC: ahadas, bugs, mavital
Target Milestone: ovirt-4.5.0Keywords: Automation
Target Release: 4.5.0Flags: pm-rhel: ovirt-4.5?
mavital: ci_coverage_complete-
mavital: testing_plan_complete-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.5.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-20 06:33:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ivana Saranova 2021-03-30 11:37:09 UTC
Description of problem:
When rebooting the VM with VM next run configuration, if user power-offs the VM and removes it immediately, it causes a NullPointerException to be shown in the engine logs constantly spamming until the engine is rebooted. This scenario is used mainly in automation where after reaching a certain timeout, the VM is just removed to not stall other tests.

There are no errors in the WebAdmin portal, no warnings/errors in the events either.

Version-Release number of selected component (if applicable):
ovirt-engine-4.4.5.11-0.1.el8ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Have a running VM
2. Go to edit and make changes that change e.g. memory size, cpus
3. VM next run configuration icon is shown
4. Reboot VM to apply the changes
5. When still rebooting, power off the VM and remove immediately (it tries to run the VM after powering it off on its own)
6. Check engine logs for errors

Actual results:
...
2021-03-30 14:31:54,334+03 ERROR [org.ovirt.engine.core.bll.ColdRebootAutoStartVmsRunner] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-64) [] Exception in startFailedAutoStartVms: NullPointerException: 
2021-03-30 14:31:55,336+03 ERROR [org.ovirt.engine.core.bll.ColdRebootAutoStartVmsRunner] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-55) [] Exception in startFailedAutoStartVms: NullPointerException: 
2021-03-30 14:31:56,340+03 ERROR [org.ovirt.engine.core.bll.ColdRebootAutoStartVmsRunner] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-77) [] Exception in startFailedAutoStartVms: NullPointerException: 
2021-03-30 14:31:57,344+03 ERROR [org.ovirt.engine.core.bll.ColdRebootAutoStartVmsRunner] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-81) [] Exception in startFailedAutoStartVms: NullPointerException: 
...

Expected results:
VM is removed without errors.

Additional info:

Comment 1 Arik 2021-04-04 07:45:44 UTC
Can you please attach engine log?

Comment 3 Qin Yuan 2022-04-19 09:04:13 UTC
Verified with:
ovirt-engine-4.5.0.2-0.7.el8ev.noarch

Steps:
1. Create and run a VM(used vm template latest-rhel-guest-image-8.6-infra)
2. Edit VM fields that require VM restart(enabled SmartCard in the test)
3. Reboot VM
4. When VM is still rebooting, power off the VM and remove it immediately
5. Check engine log for errors

Results:
1. The VM is successfully removed.
2. There is no error in engine log.

Comment 4 Sandro Bonazzola 2022-04-20 06:33:59 UTC
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022.

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

Comment 5 meital avital 2022-07-25 16:31:16 UTC
Due to QE capacity, we are not going to cover this issue in our automation