Reviewed: https://review.openstack.org/625731 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=454cc5c41c84fbf4b2a192599368215e22afbd81 Submitter: Zuul Branch: master
commit 454cc5c41c84fbf4b2a192599368215e22afbd81 Author: Matt Riedemann <[email protected]> Date: Mon Dec 17 17:50:13 2018 -0500 Properly log request headers in metadata API Currently we log the request headers in the metadata API in a useless form: DEBUG nova.api.metadata.handler [None \ req-4b5eab00-e132-4551-b7f8-c80a238727a2 None None] \ Metadata request headers: <webob.headers.EnvironHeaders object \ at 0x7f2d6fdb5e90> {{(pid=9311) __call__ \ /opt/stack/nova/nova/api/metadata/handler.py:99}} This change builds a dict from the headers and then also masks any sensitive information before logging it, but only does this if debug logging is enabled. Closes-Bug: #1808879 Change-Id: I609d96293f7e77f59df3f33240f5fc4bb72470d0 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1808879 Title: meta-api request header logging is useless Status in OpenStack Compute (nova): Fix Released Bug description: The nova metadata-api logs request headers at debug level but it's useless: http://logs.openstack.org/78/624778/1/check/tempest- full/8d3c124/controller/logs/screen-n-api- meta.txt.gz#_Dec_13_08_45_55_316152 Dec 13 08:45:55.316152 ubuntu-bionic-rax-ord-0001170468 devstack@n -api-meta.service[9309]: DEBUG nova.api.metadata.handler [None req- 4b5eab00-e132-4551-b7f8-c80a238727a2 None None] Metadata request headers: <webob.headers.EnvironHeaders object at 0x7f2d6fdb5e90> {{(pid=9311) __call__ /opt/stack/nova/nova/api/metadata/handler.py:99}} This is because webob.headers.EnvironHeaders is a mutable mapping which acts like an iterator and doesn't yield a nice repr. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1808879/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

