)]}'
{"neutron/plugins/bigswitch/plugin.py":[{"author":{"_account_id":7591,"name":"Kanzhe Jiang","email":"kanzhe@gmail.com","username":"kanzhe"},"change_message_id":"816dc7170490fa4a6611abc94f8318745b539052","unresolved":false,"context_lines":[{"line_number":804,"context_line":"            port \u003d super(NeutronRestProxyV2, self).get_port(context, port_id)"},{"line_number":805,"context_line":"            # Tenant ID must come from network in case the network is shared"},{"line_number":806,"context_line":"            tenid \u003d self._get_port_net_tenantid(context, port)"},{"line_number":807,"context_line":"            self.servers.rest_delete_port(tenid, port[\u0027network_id\u0027], port_id)"},{"line_number":808,"context_line":"            super(NeutronRestProxyV2, self).delete_port(context, port_id)"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"    def create_subnet(self, context, subnet):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2B7bE%3D","line":807,"updated":"2014-03-21 16:06:54.000000000","message":"The rest call to the backend should be made after the DB transaction.","commit_id":"3f9d9f4c32f904db84c804a4eef6f39d513beb02"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a163f1042526a20c909d6afe0db48eead99d3457","unresolved":false,"context_lines":[{"line_number":804,"context_line":"            port \u003d super(NeutronRestProxyV2, self).get_port(context, port_id)"},{"line_number":805,"context_line":"            # Tenant ID must come from network in case the network is shared"},{"line_number":806,"context_line":"            tenid \u003d self._get_port_net_tenantid(context, port)"},{"line_number":807,"context_line":"            self.servers.rest_delete_port(tenid, port[\u0027network_id\u0027], port_id)"},{"line_number":808,"context_line":"            super(NeutronRestProxyV2, self).delete_port(context, port_id)"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"    def create_subnet(self, context, subnet):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2B7ZI%3D","line":807,"in_reply_to":"AAAAWH%2F%2B7bE%3D","updated":"2014-03-21 16:10:31.000000000","message":"Done","commit_id":"3f9d9f4c32f904db84c804a4eef6f39d513beb02"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"change_message_id":"457e67280e7f63cee76d143d081f514bdd43bd5e","unresolved":false,"context_lines":[{"line_number":805,"context_line":"            # Tenant ID must come from network in case the network is shared"},{"line_number":806,"context_line":"            tenid \u003d self._get_port_net_tenantid(context, port)"},{"line_number":807,"context_line":"            self._delete_port(context, port_id)"},{"line_number":808,"context_line":"            self.servers.rest_delete_port(tenid, port[\u0027network_id\u0027], port_id)"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":811,"context_line":"        LOG.debug(_(\"NeutronRestProxyV2: create_subnet() called\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B6wI%3D","line":808,"updated":"2014-03-21 17:38:15.000000000","message":"so if rest_delete_port fails, the transaction is rolled back?","commit_id":"083324df06828e1b8fb97220b7415c2a28ee16c4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"b377a8d1b2c5e16ab8e97b4af3c7e5c3330da307","unresolved":false,"context_lines":[{"line_number":805,"context_line":"            # Tenant ID must come from network in case the network is shared"},{"line_number":806,"context_line":"            tenid \u003d self._get_port_net_tenantid(context, port)"},{"line_number":807,"context_line":"            self._delete_port(context, port_id)"},{"line_number":808,"context_line":"            self.servers.rest_delete_port(tenid, port[\u0027network_id\u0027], port_id)"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":811,"context_line":"        LOG.debug(_(\"NeutronRestProxyV2: create_subnet() called\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2Bscs%3D","line":808,"in_reply_to":"AAAAWH%2F%2B6us%3D","updated":"2014-03-25 01:11:26.000000000","message":"If the backend operation fails, it is ok to undo the transaction in most cases.\nI would argue indeed that if the backend returns \"resurce not found\", you might just log the error and not raise or rollback.\n\nAlso, in case of errors causing a rollback it might be worth setting the status to \"ERROR\" afterwards.","commit_id":"083324df06828e1b8fb97220b7415c2a28ee16c4"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"56010df3fece4f66d58736b355c99f3713fc85e9","unresolved":false,"context_lines":[{"line_number":805,"context_line":"            # Tenant ID must come from network in case the network is shared"},{"line_number":806,"context_line":"            tenid \u003d self._get_port_net_tenantid(context, port)"},{"line_number":807,"context_line":"            self._delete_port(context, port_id)"},{"line_number":808,"context_line":"            self.servers.rest_delete_port(tenid, port[\u0027network_id\u0027], port_id)"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":811,"context_line":"        LOG.debug(_(\"NeutronRestProxyV2: create_subnet() called\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2B6us%3D","line":808,"in_reply_to":"AAAAWH%2F%2B6wI%3D","updated":"2014-03-21 17:40:29.000000000","message":"Yep. The transaction starts on 801 and by calling _delete_port directly, it doesn\u0027t start another transaction. If rest_delete_port fails it will rollback to the db at 801.","commit_id":"083324df06828e1b8fb97220b7415c2a28ee16c4"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b3a38d78f68eab27a38ab3f1cb8a63ebdb253a53","unresolved":false,"context_lines":[{"line_number":805,"context_line":"            # Tenant ID must come from network in case the network is shared"},{"line_number":806,"context_line":"            tenid \u003d self._get_port_net_tenantid(context, port)"},{"line_number":807,"context_line":"            self._delete_port(context, port_id)"},{"line_number":808,"context_line":"            self.servers.rest_delete_port(tenid, port[\u0027network_id\u0027], port_id)"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":811,"context_line":"        LOG.debug(_(\"NeutronRestProxyV2: create_subnet() called\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BUzs%3D","line":808,"in_reply_to":"AAAAWH%2F%2BVHM%3D","updated":"2014-03-27 16:04:47.000000000","message":"This is currently a synchronous operation. Any error received from the backend controller means the change attempted was not committed. This will raise an exception in the rest call which will roll back the DB transaction here. The backend in this case will still be in sync with the configuration at that point.","commit_id":"083324df06828e1b8fb97220b7415c2a28ee16c4"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"5fa295cbcc28337bde2c4667b3610ebcd3a9d3e3","unresolved":false,"context_lines":[{"line_number":805,"context_line":"            # Tenant ID must come from network in case the network is shared"},{"line_number":806,"context_line":"            tenid \u003d self._get_port_net_tenantid(context, port)"},{"line_number":807,"context_line":"            self._delete_port(context, port_id)"},{"line_number":808,"context_line":"            self.servers.rest_delete_port(tenid, port[\u0027network_id\u0027], port_id)"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":811,"context_line":"        LOG.debug(_(\"NeutronRestProxyV2: create_subnet() called\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BVHM%3D","line":808,"in_reply_to":"AAAAWH%2F%2BsP4%3D","updated":"2014-03-27 15:37:35.000000000","message":"even if it\u0027s functioning normally the configuration running on the backend is not in sync with the desired configuration.\nERROR is the best thing that approximates what the author of the patch wants to achieve here.\n\nBtw, is the rest operation synchronous in your model?","commit_id":"083324df06828e1b8fb97220b7415c2a28ee16c4"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"eb2d5476b03ffe611a76a33f6e3efe5c68834a7a","unresolved":false,"context_lines":[{"line_number":805,"context_line":"            # Tenant ID must come from network in case the network is shared"},{"line_number":806,"context_line":"            tenid \u003d self._get_port_net_tenantid(context, port)"},{"line_number":807,"context_line":"            self._delete_port(context, port_id)"},{"line_number":808,"context_line":"            self.servers.rest_delete_port(tenid, port[\u0027network_id\u0027], port_id)"},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"    def create_subnet(self, context, subnet):"},{"line_number":811,"context_line":"        LOG.debug(_(\"NeutronRestProxyV2: create_subnet() called\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BsP4%3D","line":808,"in_reply_to":"AAAAWH%2F%2Bscs%3D","updated":"2014-03-25 02:03:19.000000000","message":"rest_delete_port already ignores resource not found. You can see the logic for that in servermanager.py in the rest_action method. If the verb is \u0027DELETE\u0027, 404\u0027s are ignored. \n\nI\u0027m not sure about changing the status of the port to ERROR. Even though the transaction did fail, it doesn\u0027t necessarily mean there is anything wrong with the state of the port. The majority of the cases that could cause a failure are due to the controller being unavailable at the time (e.g. connectivity issue or in the middle of an upgrade). Does it make sense to put the port in the error state in this case when it\u0027s actually functioning normally from the perspective of the VM and the backend controller?","commit_id":"083324df06828e1b8fb97220b7415c2a28ee16c4"}]}
