)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2c49d58831d817430eae4a75adbec6930e274123","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Here is an example trace output for the above server create request"},{"line_number":36,"context_line":"including the placement interactions enabled by this patch:"},{"line_number":37,"context_line":"https://pste.eu/p/ZFsb.html"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Story: 2005842"},{"line_number":40,"context_line":"Task: 33616"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9fb8cfa7_4b79b091","line":37,"updated":"2019-06-12 20:56:04.000000000","message":"This is very interesting, especially the length of time for the GET /allocations/{consumer} . I wouldn\u0027t have predicted that, it would be worth profiling (python profiing, not osprofiler) a GET /allocations for a non existent consumer. The rest of the placement parts mostly make sense.","commit_id":"dbfcaa51fe03baa64e4d4f82c64da73c06e2bd0b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"13f12eb54d99591f9f4422837fb8a670eb83dff2","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add support for osprofiler in wsgi"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To use osprofiler with placement:"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"* Add a [profiler] section to the placement.conf (and other openstack"},{"line_number":12,"context_line":"  service conf files):"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9fb8cfa7_089a68c4","line":9,"updated":"2019-06-19 18:22:27.000000000","message":"This seems like good information to throw in the placement docs somewhere, either admin or contributor? Could be a follow up.","commit_id":"bec3783b6440c20898c7314d0a473a2fbc692902"}],"placement/deploy.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2c49d58831d817430eae4a75adbec6930e274123","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from placement import util"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"profiler \u003d importutils.try_import(\u0027osprofiler.profiler\u0027)"},{"line_number":35,"context_line":"profiler_web \u003d importutils.try_import(\u0027osprofiler.web\u0027)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_2b723cae","line":34,"updated":"2019-06-12 20:56:04.000000000","message":"this name conflicts with line 43, so perhaps os_profiler and os_profiler_web to distinguish?","commit_id":"dbfcaa51fe03baa64e4d4f82c64da73c06e2bd0b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"148ef7b044e0c3d70e3851e91aee84a5ab8e31fc","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    fault_middleware \u003d fault_wrap.FaultWrapper"},{"line_number":69,"context_line":"    request_log \u003d requestlog.RequestLog"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    if os_profiler_web and conf.profiler.enabled:"},{"line_number":72,"context_line":"        osprofiler_middleware \u003d os_profiler_web.WsgiMiddleware.factory("},{"line_number":73,"context_line":"            {}, **conf.profiler)"},{"line_number":74,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_045dcb13","line":71,"updated":"2019-06-14 08:43:12.000000000","message":"In some test scenarios there won\u0027t be a \u0027conf.profiler\u0027 because those options are only registered some of the time[1]. The PlacementFixture needs to either register them, or we need to check for existence before searching on them here.\n\n[1] Following the principle of only registering the stuff that\u0027s actually being used.","commit_id":"2e2ba8a8bab8d9ff8fcfddb187b5d75b482b148e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8cc4fdd919e14fcfd841a535af09d5eb983acd91","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    fault_middleware \u003d fault_wrap.FaultWrapper"},{"line_number":69,"context_line":"    request_log \u003d requestlog.RequestLog"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    if os_profiler_web and conf.profiler.enabled:"},{"line_number":72,"context_line":"        osprofiler_middleware \u003d os_profiler_web.WsgiMiddleware.factory("},{"line_number":73,"context_line":"            {}, **conf.profiler)"},{"line_number":74,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fb8cfa7_fa412ca7","line":71,"in_reply_to":"9fb8cfa7_045dcb13","updated":"2019-06-14 11:39:08.000000000","message":"Good point. I added an extra condition. Now I tested it in nova functional env as well.","commit_id":"2e2ba8a8bab8d9ff8fcfddb187b5d75b482b148e"}],"placement/wsgi.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d1d0b681972b32c32f0d0f1251ec0256d2dfb016","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    # register placement\u0027s config options"},{"line_number":75,"context_line":"    conf.register_opts(config)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    if profiler:"},{"line_number":78,"context_line":"        profiler.set_defaults(config)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    _set_middleware_defaults()"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_62c6934c","line":78,"range":{"start_line":77,"start_character":4,"end_line":78,"end_character":37},"updated":"2019-06-20 13:43:03.000000000","message":"Ah I didn\u0027t know this was already in here.","commit_id":"bec3783b6440c20898c7314d0a473a2fbc692902"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"13f12eb54d99591f9f4422837fb8a670eb83dff2","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def setup_profiler(config):"},{"line_number":92,"context_line":"    if osprofiler and config.profiler.enabled:"},{"line_number":93,"context_line":"        osprofiler.initializer.init_from_conf("},{"line_number":94,"context_line":"            conf\u003dconfig,"},{"line_number":95,"context_line":"            context\u003d{},"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_68468452","line":92,"range":{"start_line":92,"start_character":22,"end_line":92,"end_character":37},"updated":"2019-06-19 18:22:27.000000000","message":"Do you need to check if \u0027profiler\u0027 is in config here?","commit_id":"bec3783b6440c20898c7314d0a473a2fbc692902"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d1d0b681972b32c32f0d0f1251ec0256d2dfb016","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def setup_profiler(config):"},{"line_number":92,"context_line":"    if osprofiler and config.profiler.enabled:"},{"line_number":93,"context_line":"        osprofiler.initializer.init_from_conf("},{"line_number":94,"context_line":"            conf\u003dconfig,"},{"line_number":95,"context_line":"            context\u003d{},"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_82e627e8","line":92,"range":{"start_line":92,"start_character":22,"end_line":92,"end_character":37},"in_reply_to":"9fb8cfa7_42210f4d","updated":"2019-06-20 13:43:03.000000000","message":"OK I didn\u0027t see L78 obviously. How about my other comment:\n\nFWIW I remember adding osprofiler to the nova-generated config sample and docs:\n\nI28d35165ed77487cd49d560fb1eda4f1d640734e\n\nNot sure if that\u0027s something we\u0027d want to do here as well but it\u0027s probably going to be hard without some documentation somewhere in placement that osprofiler integration works.","commit_id":"bec3783b6440c20898c7314d0a473a2fbc692902"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7258a8e2407c143c6d8ae548df857c33ef38e83c","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def setup_profiler(config):"},{"line_number":92,"context_line":"    if osprofiler and config.profiler.enabled:"},{"line_number":93,"context_line":"        osprofiler.initializer.init_from_conf("},{"line_number":94,"context_line":"            conf\u003dconfig,"},{"line_number":95,"context_line":"            context\u003d{},"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fb8cfa7_42210f4d","line":92,"range":{"start_line":92,"start_character":22,"end_line":92,"end_character":37},"in_reply_to":"9fb8cfa7_68468452","updated":"2019-06-20 13:37:37.000000000","message":"It\u0027s a bit messy but we can assume that if osprofiler was imported then profiler was too, so the set_defaults at line 78 has been called and that does:\n\n    conf.register_opts(_PROFILER_OPTS, group\u003d_profiler_opt_group)               \n\nit\u0027s messy because the original implementation that added line 78 relied on global conf (and nova\u0027s conf) and placement itself never had any tests (or apparently, until gibi, anyone who cared about osprofiler) so it went a bit wonky.\n\nWhereas in deploy.py we have to be a little more cautious because that file is used by tests and the PlacementFixture without wsgi.py ever getting involved.","commit_id":"bec3783b6440c20898c7314d0a473a2fbc692902"}],"releasenotes/notes/fix-osprofiler-support-78b34a92c32fd30f.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"13f12eb54d99591f9f4422837fb8a670eb83dff2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    By fixing bug `story/2005842`_ the OsProfiler support works again in the"},{"line_number":5,"context_line":"    placement WSGI."},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    .. _story/2005842: https://storyboard.openstack.org/#!/story/2005842"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"9fb8cfa7_e87354b0","line":4,"range":{"start_line":4,"start_character":39,"end_line":4,"end_character":49},"updated":"2019-06-19 18:22:27.000000000","message":"nit: OSProfiler\n\nhttps://docs.openstack.org/osprofiler/latest/","commit_id":"bec3783b6440c20898c7314d0a473a2fbc692902"}]}
