Bug 1434937

Summary: User <UNKNOWN> got disconnected from VM test3.
Product: [oVirt] ovirt-engine Reporter: Jiri Belka <jbelka>
Component: Frontend.WebAdminAssignee: Sharon Gratch <sgratch>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: low Docs Contact:
Priority: unspecified    
Version: futureCC: bugs, lsvaty, stirabos, tjelinek
Target Milestone: ovirt-4.1.3Flags: tjelinek: ovirt-4.1?
tjelinek: planning_ack?
rule-engine: devel_ack+
lsvaty: testing_ack+
Target Release: 4.1.3   
Hardware: Unspecified   
OS: Unspecified   
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:14:30 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 Jiri Belka 2017-03-22 16:09:22 UTC
Description of problem:

User <UNKNOWN> got disconnected from VM test3.

I have no idea what happened and I could not reproduce it later.

Version-Release number of selected component (if applicable):
rhevm-4.1.1.5-0.1.el7.noarch

How reproducible:
1 in 1 

Steps to Reproduce:
1.
2.
3.

Actual results:
User <UNKNOWN> got disconnected from VM test3.

Expected results:
<UNKNOWN> should be replace with valid user

Additional info:

Comment 2 Sharon Gratch 2017-05-15 17:46:52 UTC
This seems to be a very rare scenario to reproduce:
There is no vm locking done in SetVmTicketCommand, so there might be a scenario in which after starting a VM and opening a console, the console user info is overridden to null by VmsMonitoring for this opened console connection. 

The scenario is: 
a. start a VM.
The VmsMonitoring read the vmDb.consoleCurrentUserName and vmDb.consoleUserId as null from DB.

b. open a console.
The SetVmTicketCommand update relevant user info in Db.

c. Only then the VmAnalyzer.updateVmDynamicData() will update the DB to with values it read before (which are null values) and overridden console user info to null. 

This may lead to an open console without console user data in DB and to write in audit log a message like: User <UNKNOWN> got disconnected from VM vm1.

Fixing it is done mainly by adding a vm lock to the SetVmTicketCommand.

Comment 3 Jiri Belka 2017-06-16 10:56:11 UTC
ok, ovirt-engine-webadmin-portal-4.1.3.2-0.1.el7.noarch

i don't see it anymore