Description of problem: guest_cur_user_name from vm_dynamic should show up in the API since Bug 873790 is already requesting additional params, that Bug 879586 will provide in 3.2, I suggest the following: <vm> ... <session> <logged_in_user>username</logged_in_user> <session_user>username</session_user> <client_ip>ip</client_ip> </session> ... </vm>
In addition, Bug 879586 will provide an additional user field, we'll have the in-guest user and the RHEV user that opened the spice console, we need both of them in the API
(In reply to comment #0) > Description of problem: ... > ... > <session> > <logged_in_user>username</logged_in_user> > <session_user>username</session_user> > <client_ip>ip</client_ip> > </session> i thought the intention is to report more than a single user going forward?
(In reply to comment #2) > > i thought the intention is to report more than a single user going forward? <session> <logged_in_user>username</logged_in_user> <logged_in_user>username</logged_in_user> <logged_in_user>username</logged_in_user> ... <logged_in_user>usernameN</logged_in_user> <session_user>username</session_user> <client_ip>ip</client_ip> </session>
*** Bug 987546 has been marked as a duplicate of this bug. ***
patch posted: http://gerrit.ovirt.org/#/c/25591/
FailedQA in ovirt-engine-3.5.0-0.0.master.20140605145557.git3ddd2de.el6.noarch (alpha2). Verification steps: 1. Have a VM with guest agent installed (I used Fedora 19). 2. Open VM console and log into the system. 3. In browser/REST API client get resource /ovirt-engine/api/vms/<vm-uuid>/sessions Result: HTTP 404: -~- HTTP Status 404 - type Status report message description The requested resource () is not available. JBoss Web/7.0.13.Final -~- Plus a traceback in server.log (attaching in next comment). Expected result: XML response with VM sessions collection. Notes: Webadmin shows the logged-in user correctly.
Created attachment 908588 [details] FailedQA - server.log with a traceback
Currently this fails because we are trying to find the user using something like "admin@internal" as the key to lookup the users table, but the "username" column of this table only contains "admin" now. The "internal" part is in the column "domain". Also, when creating the XML representation we are putting the login name of the user in the "name" element, but it should instead go in "user_name".
patch posted: http://gerrit.ovirt.org/#/c/29506/1
patch merged
for 3.5 branch: http://gerrit.ovirt.org/#/c/29515/
should be modified only once 29515 gets merged:-)
Branching will be done again tomorrow, so moving to MODIFIED
Verified in rhevm-3.5.0-0.23.beta.el6ev.noarch (vt13.1). Verification steps: 1. Have a running VM with guest agent installed. 2. Log into RHEVM as domain user user1.com 3. Open the VM console and log into guest as user john.example.com The API response for /ovirt-engine/api/vms/<vm-id>/sessions/ is following: -~- <sessions> <session href="..." id="..."> <vm href="..." id="..."/> <ip address="..."/> <user href="..." id="..."> <domain href="..." id="..."> <name>domain.example.com</name> </domain> <user_name>user1</user_name> </user> <console_user>true</console_user> </session> <session href="..." id="..."> <vm href="..." id="..."/> <user> <user_name>john.example.com</user_name> </user> </session> </sessions> -~- There are two sessions: - first session (with attr. <console_user>true</console_user>) is present only if the VM console is opened by RHEVM user - second session contains name of the user, which is currently logged into the guest; if no guest user is logged in, the user_name value is None
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0158.html