Bug 1888142

Summary: Confusing warning message in the logs while shutting down a pool VM
Product: Red Hat Enterprise Virtualization Manager Reporter: nijin ashok <nashok>
Component: ovirt-engineAssignee: Arik <ahadas>
Status: CLOSED ERRATA QA Contact: Tamir <tamir>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.4.2CC: ahadas, dfodor, emarcus, mavital
Target Milestone: ovirt-4.4.4   
Target Release: 4.4.4   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.4.4 Doc Type: Bug Fix
Doc Text:
Previously, stateless virtual machines including pool virtual machines issued a warning regarding not using the latest version, even when the virtual machine was not set to use the last version. In this release, there is no attempt to change the version of the template that virtual machines are based on unless they are set to use the last version of a template and thus this warning is omitted from the log.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-02 13:58:29 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 nijin ashok 2020-10-14 07:53:42 UTC
Description of problem:

If a pool is set to a specific version of a template, below message is logged in engine log everytime a pool VM is powered down with log level WARN.

2020-10-14 13:22:22,600+05 WARN  [org.ovirt.engine.core.bll.UpdateVmVersionCommand] (EE-ManagedThreadFactory-engine-Thread-48) [74f4161b] Validation of action 'UpdateVmVersion' failed for user SYSTEM. Reasons: VAR__ACTION__UPDATE_VM_VERSION,VAR__TYPE__VM,ACTION_TYPE_FAILED_VM_NOT_SET_FOR_LATEST

This confuses the user and incorrectly assumes that there is some issue with the VM pools.

Version-Release number of selected component (if applicable):

rhvm-4.4.2.6-0.2.el8ev.noarch

How reproducible:

100%

Steps to Reproduce:

1. Create a pool and set it to specific version instead of latest.
2. Start the pool VM and then stop it.
3. Watch for the message "ACTION_TYPE_FAILED_VM_NOT_SET_FOR_LATEST" in the engine logs while engine restores the stateless snapshot.

Actual results:

Confusing warning message in the logs while shutting down a pool VM

Expected results:

I think this should be an info message telling that VM is set to specific template version instead of a warning message.

Additional info:

Comment 1 Steven Rosenberg 2020-10-27 11:43:52 UTC
I reviewed this issue. It looks like the printing of the message is in a generic place that will affect other messages as well [1].

We would need to consider other messages that would be affected. It might just be that the term "failed for user" could be modified, but more investigation would be needed to see what other messages are affected. For now at least maybe we can agree to keep it as a warning and just consider a small change to the referenced term.

[1] https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java#L830

Comment 2 Arik 2020-10-27 14:39:04 UTC
Steven, please look at the failed validation:
https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmVersionCommand.java#L119-L121
We really should not produce this error when the VM is not set to use the latest version every time it does down..

Comment 6 Tamir 2020-12-13 15:26:16 UTC
Verified on RHV 4.4.4-5. All looks good to me.

Env:
  - Engine instance with RHV 4.4.4-5 (ovirt-engine-4.4.4.4-0.9.el8ev) and RHEL 8.3 installed.
  - 2 hosts with RHV 4.4.4-5 and RHEL 8.3, 3 hosts with vdsm-4.40.40-1.el8ev

Steps:

In Admin Portal:

1. Create a 4.5 data center and a 4.5 cluster.
2. Install the host and create a new NFS storage domain.
3. Create a pool with a template with base version 1 and wait for the VM's creation.
4. Start the VM.
5. Stop the VM.
6. Check the engine.log for any WARN message or the "ACTION_TYPE_FAILED_VM_NOT_SET_FOR_LATEST" message.
7. Edit the pool to the latest template version.
8. Start the VM.
9. Stop the VM.
10. Check the engine.log for any WARN message or the "ACTION_TYPE_FAILED_VM_NOT_SET_FOR_LATEST" message.


Results (As Expected):
1. The 4.5 data center and the 4.5 cluster were created.
2. The host was installed and the NFS storage domain was created.
3. The pool with a template with base version 1 was created.
4. The VM is running.
5. The VM is down.
6. There aren't any WARN or "ACTION_TYPE_FAILED_VM_NOT_SET_FOR_LATEST" messages.
7. The pool was changed to the latest template version.
8. The VM is running.
9. The VM is down.
10. There aren't any WARN or "ACTION_TYPE_FAILED_VM_NOT_SET_FOR_LATEST" messages.

Comment 9 Arik 2021-01-31 15:44:54 UTC
The previous text wasn't accurate - it's not that there is no data to check if the VM is using the last version.
Eli, how about the following to better reflect the fix:
Previously, stateless virtual machines including pool virtual machines issued a warning regarding not using the latest version, even when the virtual machine was not set to use the last version.
In this release, there is no attempt to change the version of the template that virtual machines are based on unless they are set to use the last version of a template and thus this warning is omitted from the log.

Comment 10 Eli Marcus 2021-01-31 20:37:39 UTC
(In reply to Arik from comment #9)
> The previous text wasn't accurate - it's not that there is no data to check
> if the VM is using the last version.
> Eli, how about the following to better reflect the fix:
> Previously, stateless virtual machines including pool virtual machines
> issued a warning regarding not using the latest version, even when the
> virtual machine was not set to use the last version.
> In this release, there is no attempt to change the version of the template
> that virtual machines are based on unless they are set to use the last
> version of a template and thus this warning is omitted from the log.

thank you, updated here and in the advisory

Comment 13 errata-xmlrpc 2021-02-02 13:58:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (RHV Engine and Host Common Packages 4.4.z [ovirt-4.4.4]), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:0312

Comment 14 meital avital 2022-05-19 15:43:37 UTC
Due to QE capacity we are not going to cover this issue in our automation