x-openstack-request-id mapping statement will be logged twice in the logs

Bug #1657351 reported by Abhishek Kekane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Undecided
Abhishek Kekane
python-cinderclient
Fix Released
Undecided
Dinesh Bhor
python-neutronclient
Fix Released
Undecided
Dinesh Bhor
python-novaclient
Fix Released
Undecided
Abhishek Kekane

Bug Description

As patch [1] is merged in keystoneauth1, once new library will be released with this fix included in it, the x-openstack-request-id will be logged twice on the consoles for python-*client which are using session client. For example in case of python-novaclient, if user uses "nova --debug list" from console then following log will be logged on console:

$ nova --debug list

DEBUG (session:640) GET call to compute for http://10.232.48.204:8774/v2.1/servers/detail used request id req-b6aeff56-0408-44ed-80ba-cd7b950a8f21
DEBUG (client:85) GET call to compute for http://10.232.48.204:8774/v2.1/servers/detail used request id req-b6aeff56-0408-44ed-80ba-cd7b950a8f21

Same issue will be there in,

1. python-cinderclient

DEBUG:keystoneauth:GET call to volumev2 for http://10.232.48.204:8776/v2/61da9e4b59cf4920acc5e78438f93223/volumes/detail used request id req-dcc22730-021e-468a-8b12-da7d58b573a7
DEBUG:cinderclient.client:GET call to volumev2 for http://10.232.48.204:8776/v2/61da9e4b59cf4920acc5e78438f93223/volumes/detail used request id req-dcc22730-021e-468a-8b12-da7d58b573a7

2. python-glanceclient

$ glance --debug image-list

DEBUG:keystoneauth.session:GET call to image for http://10.232.48.204:9292/v2/schemas/image used request id req-96a3f203-c605-4c96-a31d-f1199d41705c
DEBUG:glanceclient.common.http:GET call to glance-api for http://10.232.48.204:9292/v2/schemas/image used request id req-96a3f203-c605-4c96-a31d-f1199d41705c

3. python-neutronclient

DEBUG: keystoneauth.session GET call to network for http://10.232.48.204:9696/v2.0/ports.json used request id req-da75468a-2855-4e59-b308-d2a91776b927
DEBUG: neutronclient.v2_0.client GET call to neutron for http://10.232.48.204:9696/v2.0/ports.json used request id req-da75468a-2855-4e59-b308-d2a91776b927

In order to avoid this duplication, remove logging of x-openstack-request-id from individual clients.
Same will be applicable if above clients are used by core projects like nova, cinder, glance etc., then the log statement will be logged twice in the service logs. For example; if user uses "nova list" then following log will be logged in n-api service logs:

2017-01-18 12:10:42.000 DEBUG keystoneauth.session [req-d432803e-1092-42ae-82fe-0ee7bd3c3610 admin admin] GET call to network for http://10.232.48.204:9696/v2.0/security-groups.json?id=342fa8f5-87cd-4396-b88d-a100c9193612 used request id req-9a5eb0e4-557b-4f36-b8d0-a5e3b1e8c746 from (pid=20427) request /usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py:640

2017-01-18 12:10:42.001 DEBUG neutronclient.v2_0.client [req-d432803e-1092-42ae-82fe-0ee7bd3c3610 admin admin] GET call to neutron for http://10.232.48.204:9696/v2.0/security-groups.json?id=342fa8f5-87cd-4396-b88d-a100c9193612 used request id req-9a5eb0e4-557b-4f36-b8d0-a5e3b1e8c746 from (pid=20427) _append_request_id /usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py:127

[1] https://review.openstack.org/#/c/392442/

Reference:
https://bugs.launchpad.net/keystoneauth/+bug/1605488

Changed in python-novaclient:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
no longer affects: python-glanceclient
Changed in python-glanceclient:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
Changed in python-cinderclient:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
Changed in python-neutronclient:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/422591

Changed in python-glanceclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/422602

Changed in python-novaclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/422602
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=98976d5ab8bf623e00fb56f5f956c696ecd62f81
Submitter: Jenkins
Branch: master

commit 98976d5ab8bf623e00fb56f5f956c696ecd62f81
Author: Abhishek Kekane <email address hidden>
Date: Wed Jan 18 13:52:38 2017 +0530

    x-openstack-request-id logged twice in logs

    In the recent release of keystoneauth1 2.18.0 provision is made to log
    x-openstack-request-id for session client. Once this new library is synced
    in openstack projects, the x-openstack-request-id will be logged twice
    on the console if session client is used.

    For example,
    $ nova --debug list

    DEBUG (session:640) GET call to compute for
    http://10.232.48.204:8774/v2.1/servers/detail used request id
    req-b6aeff56-0408-44ed-80ba-cd7b950a8f21

    DEBUG (client:85) GET call to compute for
    http://10.232.48.204:8774/v2.1/servers/detail used request id
    req-b6aeff56-0408-44ed-80ba-cd7b950a8f21

    Above log will be logged twice on the console.

    Removed logging of x-openstack-request-id in case of SessionClient as it
    is already logged in keystoneauth1.

    Depends-On: I492b331ff3da8d0b91178bf0d5fe1d3702f15bd7
    Closes-Bug: #1657351

    Change-Id: I9ba6a9e498fbcb027f45499d27ece966c52580ba

Changed in python-novaclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/423921

Changed in python-neutronclient:
assignee: Abhishek Kekane (abhishek-kekane) → Dinesh Bhor (dinesh-bhor)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/423940

Changed in python-cinderclient:
assignee: Abhishek Kekane (abhishek-kekane) → Dinesh Bhor (dinesh-bhor)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/423940
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=6962056c67dca1fee2e832ff8bfbc317ed4b5ec0
Submitter: Jenkins
Branch: master

commit 6962056c67dca1fee2e832ff8bfbc317ed4b5ec0
Author: Abhishek Kekane <email address hidden>
Date: Wed Jan 18 13:36:01 2017 +0530

    x-openstack-request-id logged twice in logs

    In the recent release of keystoneauth1 2.18.0 provision is made to log
    x-openstack-request-id for session client. Once this new library is synced
    in openstack projects, the x-openstack-request-id will be logged twice
    on the console if session client is used.

    For example,
    $ cinder --debug list

    DEBUG:keystoneauth:GET call to volumev2 for
    http://10.232.48.204:8776/v2/61da9e4b59cf4920acc5e78438f93223/volumes/detail
    used request id req-dcc22730-021e-468a-8b12-da7d58b573a7

    DEBUG:cinderclient.client:GET call to volumev2 for
    http://10.232.48.204:8776/v2/61da9e4b59cf4920acc5e78438f93223/volumes/detail
    used request id req-dcc22730-021e-468a-8b12-da7d58b573a7

    Above log will be logged twice on the console.

    Removed logging of x-openstack-request-id in case of SessionClient as it
    is already logged in keystoneauth1. x-openstack-request-id will only be
    logged once on console if HTTPClient is used.

    Depends-On: Id0693a9958d26162b7a2a40173ca28de2d3e4f62
    Closes-Bug: #1657351

    Change-Id: I0861212a38466d0e65cf3389c7d2757cff86ea0d

Changed in python-cinderclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-novaclient 7.1.0

This issue was fixed in the openstack/python-novaclient 7.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 1.11.0

This issue was fixed in the openstack/python-cinderclient 1.11.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/423921
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=1e9ab9efb5d3a698492da44e06789ba5942242ae
Submitter: Jenkins
Branch: master

commit 1e9ab9efb5d3a698492da44e06789ba5942242ae
Author: Abhishek Kekane <email address hidden>
Date: Wed Jan 18 14:45:49 2017 +0530

    x-openstack-request-id logged twice in logs

    In the recent release of keystoneauth1 2.18.0 provision is made to log
    x-openstack-request-id for session client. Once this new library is synced
    in openstack projects, the x-openstack-request-id will be logged twice
    on the console if session client is used.

    For example,
    $ neutron --debug port-list

    DEBUG: keystoneauth.session GET call to network for
    http://10.232.48.204:9696/v2.0/ports.json used request id
    req-da75468a-2855-4e59-b308-d2a91776b927

    DEBUG: neutronclient.v2_0.client GET call to neutron for
    http://10.232.48.204:9696/v2.0/ports.json used request id
    req-da75468a-2855-4e59-b308-d2a91776b927

    Above log will be logged twice on the console.

    Removed logging of x-openstack-request-id in case of SessionClient as it
    is already logged in keystoneauth1. x-openstack-request-id will only be
    logged once on console if HTTPClient is used.

    Depends-On: I63fb5e5486670bc369abc5339a2da8e65ba2ec6f
    Closes-Bug: #1657351

    Change-Id: I8efefd69a1ba4a214b1a30b20b9c1e5bd96b19d4

Changed in python-neutronclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/430057

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-neutronclient (stable/ocata)

Change abandoned by Abhishek Kekane (<email address hidden>) on branch: stable/ocata
Review: https://review.openstack.org/430057

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/422591
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=87e4f7646faac97b179a71e4f2221ad646644535
Submitter: Jenkins
Branch: master

commit 87e4f7646faac97b179a71e4f2221ad646644535
Author: Abhishek Kekane <email address hidden>
Date: Wed Jan 18 12:38:26 2017 +0530

    x-openstack-request-id logged twice in logs

    In the recent release of keystoneauth1 2.18.0 provision is made to log
    x-openstack-request-id for session client. Once this new library is synced
    in openstack projects, the x-openstack-request-id will be logged twice
    on the console if session client is used.

    For example,
    $ glance --debug image-list

    DEBUG:keystoneauth.session:GET call to image for
    http://10.232.48.204:9292/v2/schemas/image used request id
    req-96a3f203-c605-4c96-a31d-f1199d41705c

    DEBUG:glanceclient.common.http:GET call to glance-api for
    http://10.232.48.204:9292/v2/schemas/image used request id
    req-96a3f203-c605-4c96-a31d-f1199d41705c

    Above log will be logged twice on the console.

    Removed logging of x-openstack-request-id in case of SessionClient as it
    is already logged in keystoneauth1. x-openstack-request-id will only be
    logged once on console if HTTPClient is used.

    Depends-On: I492b331ff3da8d0b91178bf0d5fe1d3702f15bd7
    Closes-Bug: #1657351
    Change-Id: I64258f997dc060113f53682aee74bdd40a346e54

Changed in python-glanceclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-neutronclient 6.2.0

This issue was fixed in the openstack/python-neutronclient 6.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-glanceclient 2.7.0

This issue was fixed in the openstack/python-glanceclient 2.7.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.