Bug 1527894 - Log source IP and port on requests to the provider
Summary: Log source IP and port on requests to the provider
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-provider-ovn
Classification: oVirt
Component: provider
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.1
: ---
Assignee: Dominik Holler
QA Contact: Mor
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-20 11:25 UTC by Mor
Modified: 2018-02-12 11:47 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-02-12 11:47:59 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.2+
ylavi: exception+


Attachments (Terms of Use)
ovirt-provider-ovn.log (3.30 MB, text/plain)
2017-12-20 11:25 UTC, Mor
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 85634 0 master MERGED Add client IP address to log 2018-01-03 12:18:48 UTC

Description Mor 2017-12-20 11:25:02 UTC
Created attachment 1370425 [details]
ovirt-provider-ovn.log

Description of problem:
We currently do not log the IP address of client requests to the provider (in ovirt-provider-ovn.log). It is hard to track the source of the requests without looking at client side logs. I suggest adding a log for each message that can be linked to client sessions. For example: <DATE> <TIME> [<CLIENT IP, CLIENT_SOURCE_PORT>] <MSG_TYPE> : <MSG>

Version-Release number of selected component (if applicable):
ovirt-provider-ovn-1.2.2-1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Request a token and use it to send request to the provider (GET, POST, etc.)

Actual results:
(For example)
"nova"}], "user": {"username": "admin", "roles_links": [], "id": "", "roles": [{"name": "admin"}], "name": "admin"}}}
2017-12-07 18:00:56,722   Request: POST : /v2.0/tokens
2017-12-07 18:00:56,723   Request body:
{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin@internal", "password": "<PASSWORD_HIDDEN>"}}}
2017-12-07 18:00:56,726   Starting new HTTPS connection (1): network-ge-2.scl.lab.tlv.redhat.com
2017-12-07 18:00:56,835   "POST /ovirt-engine/sso/oauth/token HTTP/1.1" 200 235
2017-12-07 18:00:56,840   Starting new HTTPS connection (1): network-ge-2.scl.lab.tlv.redhat.com
2017-12-07 18:00:56,882   "POST /ovirt-engine/sso/oauth/token-info HTTP/1.1" 200 325
2017-12-07 18:00:56,885   Response code: 200
2017-12-07 18:00:56,885   Response body: {"access": {"token": {"expires": null, "id": "eR3GuGYjNoh5R5e1fAYb1Z3UtYGHMfHlK3vkN4qnDurWVEhhAQzmHgnOFLm_irx9ULYsNDNJE81ELtgHmLqeyA"}, "serviceCatalog": [{"endpoints_links": [], "endpoints": [{"adminURL": "https://network-ge-2.scl.lab.tlv.redhat.com:9696/", "region": "RegionOne", "id": "00000000000000000000000000000001", "internalURL": "https://network-ge-2.scl.lab.tlv.redhat.com:9696/", "publicURL": "https://network-ge-2.scl.lab.tlv.redhat.com:9696/"}], "type": "network", "name": "neutron"}, {"endpoints_links": [], "endpoints": [{"adminURL": "https://network-ge-2.scl.lab.tlv.redhat.com:35357/", "region": "RegionOne", "publicURL": "https://network-ge-2.scl.lab.tlv.redhat.com:35357/", "internalURL": "https://network-ge-2.scl.lab.tlv.redhat.com:35357/", "id": "00000000000000000000000000000002"}], "type": "identity", "name": "keystone"}, {"endpoints_links": [], "endpoints": [{"adminURL": "https://network-ge-2.scl.lab.tlv.redhat.com:8774/v2.1/", "region": "RegionOne", "publicURL": "https://network-ge-2.scl.lab.tlv.redhat.com:8774/v2.1/", "internalURL": "https://network-ge-2.scl.lab.tlv.redhat.com:8774/v2.1/", "id": "00000000000000000000000000000002"}], "type": "compute", "name": "nova"}], "user": {"username": "admin", "roles_links": [], "id": "", "roles": [{"name": "admin"}], "name": "admin"}}}

Expected results:
See description of bug.

Additional info:

Comment 1 Mor 2018-01-14 10:20:44 UTC
Verified on:
RHV 4.2.1.1-0.1.el7

Comment 2 Sandro Bonazzola 2018-02-12 11:47:59 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.