Bug 1527894

Summary: Log source IP and port on requests to the provider
Product: [oVirt] ovirt-provider-ovn Reporter: Mor <mkalfon>
Component: providerAssignee: Dominik Holler <dholler>
Status: CLOSED CURRENTRELEASE QA Contact: Mor <mkalfon>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bugs, danken, dholler, myakove, ylavi
Target Milestone: ovirt-4.2.1Flags: rule-engine: ovirt-4.2+
ylavi: exception+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 11:47:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ovirt-provider-ovn.log none

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.