Bug 1079208

Summary: [notifier] Inconsistency of console event messages
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-engineAssignee: Mooli Tayer <mtayer>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: aberezin, gklein, iheim, lpeer, mtayer, oourfali, pstehlik, rbalakri, Rhev-m-bugs, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 17:11:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1142923, 1156165    
Attachments:
Description Flags
notifier.log none

Description Jiri Belka 2014-03-21 08:41:48 UTC
Created attachment 877161 [details]
notifier.log

Description of problem:
See inconsistence between following two event messages:

2014-03-21 09:31:19,339 INFO  [org.ovirt.engine.core.notifier.transport.smtp.Smtp] Send email to [jbelka]
 subject:
 [alertMessage (jb-rhevm34.rhev.lab.eng.brq.redhat.com), [user admin initiated console session for VM fff]]
2014-03-21 09:31:19,339 DEBUG [org.ovirt.engine.core.notifier.transport.smtp.Smtp] body:
 [Time:2014-03-21 09:30:57.907
Message:user admin initiated console session for VM fff
Severity:NORMAL
User Name: admin
VM Name: fff
Host Name: dell-r210ii-03
Template Name: Blank
Data Center Name: Default
]
2014-03-21 09:31:19,583 INFO  [org.ovirt.engine.core.notifier.transport.smtp.Smtp] Send email to [jbelka]
 subject:
 [alertMessage (jb-rhevm34.rhev.lab.eng.brq.redhat.com), [User admin@internal is connected to VM fff.]]
2014-03-21 09:31:19,583 DEBUG [org.ovirt.engine.core.notifier.transport.smtp.Smtp] body:
 [Time:2014-03-21 09:31:10.251
Message:User admin@internal is connected to VM fff.
Severity:NORMAL
User Name: admin@internal
VM Name: fff
Host Name: dell-r210ii-03
Template Name: Blank
]

'User admin@internal' vs 'user admin'...

Version-Release number of selected component (if applicable):
rhevm-tools-3.4.0-0.5.master.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. register a subscriber for 'VM console connected' and 'VM console is initiated'
2. check mails
3.

Actual results:
inconsistency of format

Expected results:
same format

Additional info:
i doubt there's a use for 'VM console is initiated' event message... :-)

Comment 1 Mooli Tayer 2014-04-06 11:34:48 UTC
So we have two events here:
VM_SET_TICKET, called from SetVmTicketCommand
VM_CONSOLE_CONNECTED, called from VdsEventListener.processOnClientIpChange

VM_SET_TICKET represents the normal flow where user name comes from a command. 
in VM_CONSOLE_CONNECTED (and VM_CONSOLE_DISCONNECTED) since there is no command
the username is retrieved explicitly using vmDynamic.getConsoleCurrentUserName()
that returns username@domain.
This method is used (in events context) only for these two events
(cosole connect & disconnect)
so I will add code to remove the '@internal' locally.

Comment 2 Jiri Belka 2014-06-13 12:29:10 UTC
ok, ovirt-engine-tools-3.5.0-0.0.master.20140605145557.git3ddd2de.el6.noarch

 [alertMessage (jb-ovirt35.rhev.lab.eng.brq.redhat.com), [user admin initiated console session for VM test]]
 [alertMessage (jb-ovirt35.rhev.lab.eng.brq.redhat.com), [User admin is connected to VM test.]]

Comment 3 Eyal Edri 2015-02-17 17:11:59 UTC
rhev 3.5.0 was released. closing.