
Hi all, I would like to see whether there are any suggestions how we can provide information like: - lastClient - lastClientIface - network interface on which client connected In the code prior to jsonrpc changes every time new request (new connection) was received clientIF threadLocal was updated with client information. This code was implemented in xml binding and now we need to provide similar information for jsonrpc. There is difference that we keep connection open for jsonrpc so we can't provide behavior as described above. We can update client information when connection is established. Is that OK or are there any suggestions how to update this information? Thanks, Piotr

On Thu, Jun 05, 2014 at 02:35:01PM +0200, Piotr Kliczewski wrote:
Hi all,
I would like to see whether there are any suggestions how we can provide information like: - lastClient - lastClientIface - network interface on which client connected
In the code prior to jsonrpc changes every time new request (new connection) was received clientIF threadLocal was updated with client information.
This code was implemented in xml binding and now we need to provide similar information for jsonrpc. There is difference that we keep connection open for jsonrpc so we can't provide behavior as described above. We can update client information when connection is established.
That's fine by me - as long as the connection is established, lastClientIface does not change anyway (if I understand correctly). Bare in mind that lastClientIface is Vdsm's guess on the network interface on top of which the client connection is comming through. It is used when Vdsm is run on a fresh host, and Engine would like to know on top of which interface should it configure the management network http://www.ovirt.org/Features/Normalized_ovirtmgmt_Initialization
Is that OK or are there any suggestions how to update this information?

----- Original Message -----
From: "Piotr Kliczewski" <piotr.kliczewski@gmail.com> To: devel@ovirt.org Sent: Thursday, June 5, 2014 3:35:01 PM Subject: [ovirt-devel] GetCaps for jsonrpc
Hi all,
I would like to see whether there are any suggestions how we can provide information like: - lastClient - lastClientIface - network interface on which client connected
In the code prior to jsonrpc changes every time new request (new connection) was received clientIF threadLocal was updated with client information.
This code was implemented in xml binding and now we need to provide similar information for jsonrpc. There is difference that we keep connection open for jsonrpc so we can't provide behavior as described above. We can update client information when connection is established.
The xmlrpc server also keeps the connection open, so there is no much difference here. If you have one thread per connection, you can set the client address once when the thread starts. If you a thread pool, handling requests from all connections, you must set the client address when staring to serve each request. Nir
participants (3)
-
Dan Kenigsberg
-
Nir Soffer
-
Piotr Kliczewski