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... :-)
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.
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.]]
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... :-)