)]}'
{"neutron/plugins/ml2/drivers/type_flat.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"d2f85733d0b2f6147362199765cc0aec3a15121a","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                LOG.debug(_(\"Reserving flat network on physical network %s\"),"},{"line_number":106,"context_line":"                          physical_network)"},{"line_number":107,"context_line":"                alloc \u003d FlatAllocation(physical_network\u003dphysical_network)"},{"line_number":108,"context_line":"                session.add(alloc)"},{"line_number":109,"context_line":"        except (os_exc.DBError, os_exc.DBDuplicateEntry) as e:"},{"line_number":110,"context_line":"            if isinstance(e.inner_error, sa_exc.IntegrityError):"},{"line_number":111,"context_line":"                raise exc.FlatNetworkInUse(physical_network\u003dphysical_network)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9PdQ%3D","line":108,"updated":"2013-12-13 16:04:27.000000000","message":"that kind of exception catching rearranging could lead to an issue, that appears now and then: http://stackoverflow.com/questions/9525220/sqlalchemy-raises-none-causes-typeerror\nIt seems to be an issue with eventlet.\nAnyway, the things is that exception is being thrown by __exit__ block of with statement where transaction is being committed, and not by .add() statement itself.\nSo it could actually be better to perform manual commit, just to make sure:\n\n with session.begin(subtransactions\u003dTrue):\t\n     try:\n         LOG.debug(_(\"Reserving flat network on physical network %s\"),\n                           physical_network)\n         alloc \u003d FlatAllocation(physical_network\u003dphysical_network)\n         session.add(alloc)\n         session.flush()\n     except ...","commit_id":"97eb826c10d0a0c5dce7b683fe7d70158a9a2abb"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"9626710c7050a295cb494b6d7f62c8e96193a2b5","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                LOG.debug(_(\"Reserving flat network on physical network %s\"),"},{"line_number":106,"context_line":"                          physical_network)"},{"line_number":107,"context_line":"                alloc \u003d FlatAllocation(physical_network\u003dphysical_network)"},{"line_number":108,"context_line":"                session.add(alloc)"},{"line_number":109,"context_line":"        except (os_exc.DBError, os_exc.DBDuplicateEntry) as e:"},{"line_number":110,"context_line":"            if isinstance(e.inner_error, sa_exc.IntegrityError):"},{"line_number":111,"context_line":"                raise exc.FlatNetworkInUse(physical_network\u003dphysical_network)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9KbM%3D","line":108,"in_reply_to":"AAAATn%2F9PdQ%3D","updated":"2013-12-16 05:31:11.000000000","message":"Done","commit_id":"97eb826c10d0a0c5dce7b683fe7d70158a9a2abb"}]}
