)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"9e443c3d434c00cbc5758818d774ff754faaf7b6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Network: ensure that ports are \u0027unset\u0027 when instance is deleted"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Commit a141206e9dfd31955b9b31d9e5a7f73bbd8510ca ensured that user defined"},{"line_number":10,"context_line":"ports were not deleted when an instance is deleted or rescheduled. The"},{"line_number":11,"context_line":"problem with this commit is that it did not reset the \u0027device_id\u0027 and"},{"line_number":12,"context_line":"\u0027device_owner\u0027 of the port. This leads to port leakage and eventually a tenant"},{"line_number":13,"context_line":"is unable to launch any instances as their port quota has exceeded the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1ae5cdf2_f7fc4974","line":10,"updated":"2014-06-13 11:31:37.000000000","message":"\"when an instance is deleted\"\n\ne.g. shutdown_instance() does not get called with any requested_networks from delete_instance()\n\nI haven\u0027t tested, but it looks to me like we do delete user-defined ports when an instance is deleted, but not when a build fails","commit_id":"803d59e9f409a59403b2ce55040acc02e14eee28"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":1812,"name":"p-draigbrady","email":"P@draigBrady.com","username":"p-draigbrady"},"change_message_id":"267766b5f98fa793b7cb375b04675389c71712f3","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        ports_to_skip \u003d [port_id for nets, fips, port_id in requested_networks]"},{"line_number":410,"context_line":"        ports \u003d set(ports) - set(ports_to_skip)"},{"line_number":411,"context_line":"        # Reset device_id and device_owner for the ports that are skipped"},{"line_number":412,"context_line":"        if len(ports_to_skip):"},{"line_number":413,"context_line":"            for port in ports_to_skip:"},{"line_number":414,"context_line":"                port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: \u0027\u0027, \u0027device_owner\u0027: \u0027\u0027}}"},{"line_number":415,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_24eb14dd","line":412,"updated":"2014-06-12 01:32:58.000000000","message":"The len() is redundant. You should be able to just go with the for loop which is a noop with the empty set","commit_id":"3f0e1ed173be7dfa489fdaeb1ae1d07256b44888"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"23a843c76e629d7df1aab9b02329fa7e993f8069","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        ports_to_skip \u003d [port_id for nets, fips, port_id in requested_networks]"},{"line_number":410,"context_line":"        ports \u003d set(ports) - set(ports_to_skip)"},{"line_number":411,"context_line":"        # Reset device_id and device_owner for the ports that are skipped"},{"line_number":412,"context_line":"        if len(ports_to_skip):"},{"line_number":413,"context_line":"            for port in ports_to_skip:"},{"line_number":414,"context_line":"                port_req_body \u003d {\u0027port\u0027: {\u0027device_id\u0027: \u0027\u0027, \u0027device_owner\u0027: \u0027\u0027}}"},{"line_number":415,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_62234758","line":412,"in_reply_to":"1ae5cdf2_24eb14dd","updated":"2014-06-12 06:44:58.000000000","message":"Done","commit_id":"3f0e1ed173be7dfa489fdaeb1ae1d07256b44888"},{"author":{"_account_id":1812,"name":"p-draigbrady","email":"P@draigBrady.com","username":"p-draigbrady"},"change_message_id":"267766b5f98fa793b7cb375b04675389c71712f3","unresolved":false,"context_lines":[{"line_number":415,"context_line":"                try:"},{"line_number":416,"context_line":"                    neutronv2.get_client(context).update_port(port,"},{"line_number":417,"context_line":"                                                              port_req_body)"},{"line_number":418,"context_line":"                except Exception:"},{"line_number":419,"context_line":"                    LOG.debug(\u0027Unable to reset device ID for port %s\u0027, port,"},{"line_number":420,"context_line":"                              instance\u003dinstance)"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_2470743f","line":418,"updated":"2014-06-12 01:32:58.000000000","message":"could this be narrowed to specific exception(s)?","commit_id":"3f0e1ed173be7dfa489fdaeb1ae1d07256b44888"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"23a843c76e629d7df1aab9b02329fa7e993f8069","unresolved":false,"context_lines":[{"line_number":415,"context_line":"                try:"},{"line_number":416,"context_line":"                    neutronv2.get_client(context).update_port(port,"},{"line_number":417,"context_line":"                                                              port_req_body)"},{"line_number":418,"context_line":"                except Exception:"},{"line_number":419,"context_line":"                    LOG.debug(\u0027Unable to reset device ID for port %s\u0027, port,"},{"line_number":420,"context_line":"                              instance\u003dinstance)"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_22d4df1e","line":418,"in_reply_to":"1ae5cdf2_2470743f","updated":"2014-06-12 06:44:58.000000000","message":"i think here we need to catch all exceptions as we do not want the operation to be terminated","commit_id":"3f0e1ed173be7dfa489fdaeb1ae1d07256b44888"},{"author":{"_account_id":1812,"name":"p-draigbrady","email":"P@draigBrady.com","username":"p-draigbrady"},"change_message_id":"267766b5f98fa793b7cb375b04675389c71712f3","unresolved":false,"context_lines":[{"line_number":417,"context_line":"                                                              port_req_body)"},{"line_number":418,"context_line":"                except Exception:"},{"line_number":419,"context_line":"                    LOG.debug(\u0027Unable to reset device ID for port %s\u0027, port,"},{"line_number":420,"context_line":"                              instance\u003dinstance)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        for port in ports:"},{"line_number":423,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_8496a83c","line":420,"updated":"2014-06-12 01:32:58.000000000","message":"If normal debug is appropriate, though this seems like info() might be better?","commit_id":"3f0e1ed173be7dfa489fdaeb1ae1d07256b44888"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"23a843c76e629d7df1aab9b02329fa7e993f8069","unresolved":false,"context_lines":[{"line_number":417,"context_line":"                                                              port_req_body)"},{"line_number":418,"context_line":"                except Exception:"},{"line_number":419,"context_line":"                    LOG.debug(\u0027Unable to reset device ID for port %s\u0027, port,"},{"line_number":420,"context_line":"                              instance\u003dinstance)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        for port in ports:"},{"line_number":423,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_42d9eb55","line":420,"in_reply_to":"1ae5cdf2_8496a83c","updated":"2014-06-12 06:44:58.000000000","message":"Done","commit_id":"3f0e1ed173be7dfa489fdaeb1ae1d07256b44888"},{"author":{"_account_id":1678,"name":"Tiantian Gao","email":"gtt116@gmail.com","username":"gtt116"},"change_message_id":"85520732f810a445988bf7beaa8f9e39168de440","unresolved":false,"context_lines":[{"line_number":415,"context_line":"                neutronv2.get_client(context).update_port(port,"},{"line_number":416,"context_line":"                                                          port_req_body)"},{"line_number":417,"context_line":"            except Exception:"},{"line_number":418,"context_line":"                LOG.info(_(\u0027Unable to reset device ID for port %s\u0027), port,"},{"line_number":419,"context_line":"                         instance\u003dinstance)"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        for port in ports:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_9011ddb1","line":418,"updated":"2014-06-17 14:35:57.000000000","message":"How about LOG.warn(), and print out the concrete exception here?","commit_id":"803d59e9f409a59403b2ce55040acc02e14eee28"}]}
