Bug 1411075

Summary: Host name is <UNKNOWN> when VM started in stateless
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: BLL.VirtAssignee: Shmuel Melamud <smelamud>
Status: CLOSED CURRENTRELEASE QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.0CC: bugs, michal.skrivanek, smelamud, stirabos, tjelinek
Target Milestone: ovirt-4.1.3Flags: rule-engine: ovirt-4.1+
ykaul: exception+
Target Release: 4.1.3.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-06 13:13:49 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 Michael Burman 2017-01-08 07:19:38 UTC
Description of problem:
Host name is <UNKNOWN> when VM started in stateless 

2017-01-08 09:08:21,474+02 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-6-thread-15) [5738cffc] Correlation ID: 56668218-0951-43fb-8e48-7e17ce8afe3c, Job ID: dc93ea06-1455-4cb4-a1b6-c123bb5e410f, Call Stack: null, Custom Event ID: -1, Message: VM v1 was started by admin@internal-authz (Host: <UNKNOWN>).



Version-Release number of selected component (if applicable):
4.1.0-0.4.master.20170105161132.gitf4e2c11.el7.centos

How reproducible:
100%

Steps to Reproduce:
1. Start VM in stateless

Actual results:
VM v1 was started by admin@internal-authz (Host: <UNKNOWN>).

Comment 1 Sandro Bonazzola 2017-02-01 16:03:08 UTC
oVirt 4.1.0 GA has been released, re-targeting to 4.1.1.
Please check if this issue is correctly targeted or already included in 4.1.0.

Comment 2 Shmuel Melamud 2017-02-24 01:07:11 UTC
When VM is run as stateless, RunVmCommand is executed twice. The first run of the command creates the stateless snapshot. When it is finished, RunVmCommand is run for the second time, to actually run the VM.

The audit log message displayed at the first run of the command cannot contain host name, because the host where the VM will be run is unknown at this stage. So we need to change the message that is displayed at the first run to something like "Creating a stateless snapshot for VM ...". And we need to add a second message that will be displayed at the second run, what will say "VM ... was started by ... (Host: ...)".

Comment 3 Tomas Jelinek 2017-05-03 12:46:18 UTC
The fix is a bit more complicated as it looked like, in order to reduce risk, moving to 4.1.3.

Comment 4 meital avital 2017-06-21 15:08:13 UTC
Verified on version: 4.1.3.2-0.1.el7