)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d716faef03704edf0fbd5e207d17cd74ca54e17b","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle V3 API PCI server race gracefully"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Handle gracefully the case where an instance is deleted inbetween"},{"line_number":10,"context_line":"the servers extension retreiving information about a server and the"},{"line_number":11,"context_line":"extensions hook calling the pci extension. Instead of propagating"},{"line_number":12,"context_line":"an InstanceNotFound exception further up, we catch it and simply"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2B8jA%3D","line":9,"updated":"2014-01-20 14:39:58.000000000","message":"s/inbetween/in between/","commit_id":"1cdb450c549a1f2e601c0cf50d518c9c00e2c9d3"}],"nova/api/openstack/compute/plugins/v3/pci.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f9c43313a544608a6c7e2dd2a5b5f35353632a3f","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            for dev in instance.pci_devices:"},{"line_number":61,"context_line":"                dev_id.append({\u0027id\u0027: dev[\u0027id\u0027]})"},{"line_number":62,"context_line":"        except exception.InstanceNotFound:"},{"line_number":63,"context_line":"            pass"},{"line_number":64,"context_line":"        server[\u0027%s:pci_devices\u0027 % Pci.alias] \u003d dev_id"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2Bms%3D","line":63,"updated":"2014-01-20 07:11:42.000000000","message":"I prefer to return HttpNotFound to user directly. The response with something ignored isn\u0027t real status of instance.","commit_id":"bf12c4ab294c9fea823fec7511b7de03456e736d"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"4d20fa52f8954263545bdf2cb88ceb6744a51b90","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            for dev in instance.pci_devices:"},{"line_number":61,"context_line":"                dev_id.append({\u0027id\u0027: dev[\u0027id\u0027]})"},{"line_number":62,"context_line":"        except exception.InstanceNotFound:"},{"line_number":63,"context_line":"            pass"},{"line_number":64,"context_line":"        server[\u0027%s:pci_devices\u0027 % Pci.alias] \u003d dev_id"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B%2BiE%3D","line":63,"in_reply_to":"AAAAUH%2F%2B%2Bms%3D","updated":"2014-01-20 09:47:56.000000000","message":"I think we explicitly don\u0027t want to return HTTPNotFound. The issue is we ask for a detailed list of servers, the servers code retrieves the information and then the extension hooks are called. By the time that happens some of those instances have already been deleted and the extension can not find any information about them now. So an HTTPNotFound will very confusing for the client as they didn\u0027t ask for a server in particular.","commit_id":"bf12c4ab294c9fea823fec7511b7de03456e736d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"80edc53159d9c22d8b13549ca0b2074e82ca7d51","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        try:"},{"line_number":60,"context_line":"            for dev in instance.pci_devices:"},{"line_number":61,"context_line":"                dev_id.append({\u0027id\u0027: dev[\u0027id\u0027]})"},{"line_number":62,"context_line":"        except exception.InstanceNotFound:"},{"line_number":63,"context_line":"            # NOTE(cyeoh): This is an ugly hack that we will come back and fix"},{"line_number":64,"context_line":"            # real soon. We should be avoiding any db access in extensions"},{"line_number":65,"context_line":"            # because of race conditions, but we have to work out how to do"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B8l4%3D","line":62,"updated":"2014-01-20 14:33:26.000000000","message":"Just hitting the .pci_devices attribute would trigger this, so I think it would be much better to do this:\n\n try:\n     devices \u003d instance.pci_devices\n except exception.InstanceNotFound:\n     pass\n\n for dev in devices:\n     ...\n\nAlso, agree with matt about the logging. I\u0027d say log it with the bug number even, as this really shouldn\u0027t stick around in the code for long, IMHO.","commit_id":"1cdb450c549a1f2e601c0cf50d518c9c00e2c9d3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ddad01acebb5d37e3b350fb080097150170638a7","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            # object converted to primitives. We want this is for now to avoid"},{"line_number":68,"context_line":"            # a specific gate race issue that seems to picking on just the"},{"line_number":69,"context_line":"            # pci extension though."},{"line_number":70,"context_line":"            pass"},{"line_number":71,"context_line":"        server[\u0027%s:pci_devices\u0027 % Pci.alias] \u003d dev_id"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B8wA%3D","line":70,"updated":"2014-01-20 14:17:32.000000000","message":"Would it make sense to log something here rather than just pass?  I realize this is a hack to fix a gate issue, but if it doesn\u0027t get fixed soon and ships with Icehouse, than someone could be left scratching their head why their request to this extension didn\u0027t fail but didn\u0027t return pci device information either.","commit_id":"1cdb450c549a1f2e601c0cf50d518c9c00e2c9d3"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"8a05f00e9af4ee49b18c31154d80e6821597c677","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            # object converted to primitives. We want this is for now to avoid"},{"line_number":68,"context_line":"            # a specific gate race issue that seems to picking on just the"},{"line_number":69,"context_line":"            # pci extension though."},{"line_number":70,"context_line":"            pass"},{"line_number":71,"context_line":"        server[\u0027%s:pci_devices\u0027 % Pci.alias] \u003d dev_id"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    @wsgi.extends"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B8m8%3D","line":70,"in_reply_to":"AAAAUH%2F%2B8wA%3D","updated":"2014-01-20 14:38:28.000000000","message":"We really need a generic fix for this before releasing icehouse. It not only affects the PCI extension but all extensions which extend servers, both V2 and V3. If I have to do another patch set I\u0027ll add a log message though.","commit_id":"1cdb450c549a1f2e601c0cf50d518c9c00e2c9d3"}],"nova/tests/api/openstack/compute/plugins/v3/test_pci.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ddad01acebb5d37e3b350fb080097150170638a7","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                         resp.obj[\u0027servers\u0027][0][\u0027os-pci:pci_devices\u0027])"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"class PciServerControllerTest1(test.NoDBTestCase):"},{"line_number":126,"context_line":"    def setUp(self):"},{"line_number":127,"context_line":"        super(PciServerControllerTest1, self).setUp()"},{"line_number":128,"context_line":"        self.controller \u003d pci.PciServerController()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B8uw%3D","line":125,"updated":"2014-01-20 14:17:32.000000000","message":"Seems you could have just extended PciServerControllerTest to re-use some of the setup there, the rest is overridden in the subclass.","commit_id":"1cdb450c549a1f2e601c0cf50d518c9c00e2c9d3"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"8a05f00e9af4ee49b18c31154d80e6821597c677","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                         resp.obj[\u0027servers\u0027][0][\u0027os-pci:pci_devices\u0027])"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"class PciServerControllerTest1(test.NoDBTestCase):"},{"line_number":126,"context_line":"    def setUp(self):"},{"line_number":127,"context_line":"        super(PciServerControllerTest1, self).setUp()"},{"line_number":128,"context_line":"        self.controller \u003d pci.PciServerController()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B8kg%3D","line":125,"in_reply_to":"AAAAUH%2F%2B8uw%3D","updated":"2014-01-20 14:38:28.000000000","message":"I can\u0027t just extend PciServerComtrollerTest with its current setUp because to trigger the bug pci_device needs to be not set in order to trigger the instance objects obj_load_attr. For the positive tests the instance object is faked up and doesn\u0027t take the db path which can trigger the bug the patch attempts to fix. They could possibly both be refactored a bit to share a common base class though.","commit_id":"1cdb450c549a1f2e601c0cf50d518c9c00e2c9d3"}]}
