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):
Steps to Reproduce:
1. Start VM in stateless
VM v1 was started by admin@internal-authz (Host: <UNKNOWN>).
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.
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: ...)".
The fix is a bit more complicated as it looked like, in order to reduce risk, moving to 4.1.3.
Verified on version: 188.8.131.52-0.1.el7