)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"90b9a35e0fe42918e7fab44c067670257661d7e3","unresolved":false,"context_lines":[{"line_number":14,"context_line":"to add support for testing the migration with grenade.  However,"},{"line_number":15,"context_line":"that will have to wait until grenade support for neutron has"},{"line_number":16,"context_line":"merged."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Implements: blueprint ml2-deprecated-plugin-migration"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I1eb908c866e19f72e61f687d56a0bc391cdb4760"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAWH%2F%2F8fQ%3D","line":17,"updated":"2014-03-12 19:14:01.000000000","message":"DocImpact","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"e1e51c062fedcf3661964695ae84889f3f1757ab","unresolved":false,"context_lines":[{"line_number":14,"context_line":"to add support for testing the migration with grenade.  However,"},{"line_number":15,"context_line":"that will have to wait until grenade support for neutron has"},{"line_number":16,"context_line":"merged."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Implements: blueprint ml2-deprecated-plugin-migration"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I1eb908c866e19f72e61f687d56a0bc391cdb4760"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAWH%2F%2F4Gs%3D","line":17,"in_reply_to":"AAAAWH%2F%2F8fQ%3D","updated":"2014-03-13 07:53:16.000000000","message":"Done","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"}],"bin/neutron-migrate-to-ml2":[{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"c5465be8e47a5715524f7e2c93c1d0017f0a1811","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"   It will be necessary to upgrade the database to the target release"},{"line_number":29,"context_line":"   via neutron-db-manage before attempting to migrate to ml2."},{"line_number":30,"context_line":"   Initially, only the icehouse release is supported."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"   This script does not automate configuration migration."},{"line_number":33,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAVX%2F%2Fo3c%3D","line":30,"updated":"2014-03-02 07:24:44.000000000","message":"question: what if ML2 tables changes after this script is merged? Is it necessary to upgrade the database by running neutron-db-manage again after this script is called?","commit_id":"f7b2dcf2b73429d567d67b81f38fe5121ff0c7c1"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3a2e8a5dc78fdb6f467fe67995e86502a32211f2","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"   It will be necessary to upgrade the database to the target release"},{"line_number":29,"context_line":"   via neutron-db-manage before attempting to migrate to ml2."},{"line_number":30,"context_line":"   Initially, only the icehouse release is supported."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"   This script does not automate configuration migration."},{"line_number":33,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAVn%2F%2Fajs%3D","line":30,"in_reply_to":"AAAAVX%2F%2Fo3c%3D","updated":"2014-03-06 08:10:42.000000000","message":"The procedure will be:\n\n- migrate ovs or lb db to icehouse\n- migrate db to ml2\n\nThis script will have to be updated if the db state for icehouse changes, as it is likely to do up until release.","commit_id":"f7b2dcf2b73429d567d67b81f38fe5121ff0c7c1"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"683b32b651afc221aa7b3e3595c9a49735e3aebc","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"   It will be necessary to upgrade the database to the target release"},{"line_number":29,"context_line":"   via neutron-db-manage before attempting to migrate to ml2."},{"line_number":30,"context_line":"   Initially, only the icehouse release is supported."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"   This script does not automate configuration migration."},{"line_number":33,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAVn%2F%2FSR4%3D","line":30,"in_reply_to":"AAAAVn%2F%2Fajs%3D","updated":"2014-03-07 02:10:49.000000000","message":"Maru,\n\nGot it. Thanks for the clarification!","commit_id":"f7b2dcf2b73429d567d67b81f38fe5121ff0c7c1"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3a76d3500c0ad7996a1bc94d5be5dee266460c8b","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        engine.execute(\u0027DROP TABLE %s\u0027 % table_name)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def define_ml2_tables_for_icehouse(metadata):"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    sa.Table("},{"line_number":130,"context_line":"        \u0027arista_provisioned_nets\u0027, metadata,"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAVX%2F%2F7Fw%3D","line":127,"updated":"2014-02-27 11:10:39.000000000","message":"Would it cause problems creating ml2.ini prior to db migration? It would create needed tables using alembic.","commit_id":"f7b2dcf2b73429d567d67b81f38fe5121ff0c7c1"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"271381ed46465e3fa40eb85422e5210ad52d27c1","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        engine.execute(\u0027DROP TABLE %s\u0027 % table_name)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def define_ml2_tables_for_icehouse(metadata):"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    sa.Table("},{"line_number":130,"context_line":"        \u0027arista_provisioned_nets\u0027, metadata,"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAVX%2F%2FpIs%3D","line":127,"in_reply_to":"AAAAVX%2F%2F7Fw%3D","updated":"2014-03-02 05:58:02.000000000","message":"No, it would not cause problems to have the tables pre-existing.  The tables are created with sqlalchemy\u0027s metadata.create_all(), which only creates tables if they do not already exist.","commit_id":"f7b2dcf2b73429d567d67b81f38fe5121ff0c7c1"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"040d93394bf1f649a85c378d3d316d8331cdb9ba","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        engine.execute(\u0027DROP TABLE %s\u0027 % table_name)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def define_ml2_tables_for_icehouse(metadata):"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    sa.Table("},{"line_number":130,"context_line":"        \u0027arista_provisioned_nets\u0027, metadata,"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAVn%2F%2F63o%3D","line":127,"in_reply_to":"AAAAVX%2F%2FpIs%3D","updated":"2014-03-03 12:32:08.000000000","message":"My point was if ml2 plugin would be included as core plugin during db migration, it would create tables from this function automatically and you won\u0027t have to do it manually here.","commit_id":"f7b2dcf2b73429d567d67b81f38fe5121ff0c7c1"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"3a2e8a5dc78fdb6f467fe67995e86502a32211f2","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        engine.execute(\u0027DROP TABLE %s\u0027 % table_name)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def define_ml2_tables_for_icehouse(metadata):"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    sa.Table("},{"line_number":130,"context_line":"        \u0027arista_provisioned_nets\u0027, metadata,"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAVn%2F%2Fah0%3D","line":127,"in_reply_to":"AAAAVn%2F%2F63o%3D","updated":"2014-03-06 08:10:42.000000000","message":"The goal is to have the ml2 tables created in a known state so that migration from lb/ovs can be guaranteed to work.  As you say, it should be possible to have the script target a given db revision instead of manually creating the tables.  Can you provide an example of the steps that would be required?","commit_id":"f7b2dcf2b73429d567d67b81f38fe5121ff0c7c1"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d63d449efe76c08c6c1cef26f87c9c7ef99b796a","unresolved":false,"context_lines":[{"line_number":59,"context_line":"import argparse"},{"line_number":60,"context_line":"import sys"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"from oslo.config import cfg"},{"line_number":63,"context_line":"import sqlalchemy as sa"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"from neutron.extensions import portbindings"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FXnY%3D","line":62,"updated":"2014-03-07 09:34:56.000000000","message":"Is it needed?","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1a5635d8aafd35b60e46987599eaf1d9f51814c5","unresolved":false,"context_lines":[{"line_number":59,"context_line":"import argparse"},{"line_number":60,"context_line":"import sys"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"from oslo.config import cfg"},{"line_number":63,"context_line":"import sqlalchemy as sa"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"from neutron.extensions import portbindings"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FItc%3D","line":62,"in_reply_to":"AAAAVn%2F%2FXnY%3D","updated":"2014-03-08 12:21:13.000000000","message":"Done","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d63d449efe76c08c6c1cef26f87c9c7ef99b796a","unresolved":false,"context_lines":[{"line_number":63,"context_line":"import sqlalchemy as sa"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"from neutron.extensions import portbindings"},{"line_number":66,"context_line":"from neutron.plugins.common import constants"},{"line_number":67,"context_line":"from neutron.plugins.linuxbridge.common import constants as lb_constants"},{"line_number":68,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":69,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FXmI%3D","line":66,"updated":"2014-03-07 09:34:56.000000000","message":"This module isn\u0027t used.","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1a5635d8aafd35b60e46987599eaf1d9f51814c5","unresolved":false,"context_lines":[{"line_number":63,"context_line":"import sqlalchemy as sa"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"from neutron.extensions import portbindings"},{"line_number":66,"context_line":"from neutron.plugins.common import constants"},{"line_number":67,"context_line":"from neutron.plugins.linuxbridge.common import constants as lb_constants"},{"line_number":68,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":69,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FItY%3D","line":66,"in_reply_to":"AAAAVn%2F%2FXmI%3D","updated":"2014-03-08 12:21:13.000000000","message":"Done","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d63d449efe76c08c6c1cef26f87c9c7ef99b796a","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        # Migrating network segments requires loading the data to python"},{"line_number":114,"context_line":"        # so that a uuid can be generated for each segment."},{"line_number":115,"context_line":"        source_table \u003d sa.Table(self.segment_table_name, metadata,"},{"line_number":116,"context_line":"                                autoload\u003dTrue, autoload_with\u003dengine)"},{"line_number":117,"context_line":"        source_bindings \u003d engine.execute(source_table.select())"},{"line_number":118,"context_line":"        ml2_bindings \u003d [dict(x) for x in source_bindings]"},{"line_number":119,"context_line":"        for binding in ml2_bindings:"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FWlE%3D","line":116,"updated":"2014-03-07 09:34:56.000000000","message":"Since \"create_all()\" was already called at this point, would metadata.tables[self.segment_table_name] work?","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1a5635d8aafd35b60e46987599eaf1d9f51814c5","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        # Migrating network segments requires loading the data to python"},{"line_number":114,"context_line":"        # so that a uuid can be generated for each segment."},{"line_number":115,"context_line":"        source_table \u003d sa.Table(self.segment_table_name, metadata,"},{"line_number":116,"context_line":"                                autoload\u003dTrue, autoload_with\u003dengine)"},{"line_number":117,"context_line":"        source_bindings \u003d engine.execute(source_table.select())"},{"line_number":118,"context_line":"        ml2_bindings \u003d [dict(x) for x in source_bindings]"},{"line_number":119,"context_line":"        for binding in ml2_bindings:"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FIt0%3D","line":116,"in_reply_to":"AAAAVn%2F%2FWlE%3D","updated":"2014-03-08 12:21:13.000000000","message":"Nope.  metadata.tables only knows about tables that are defined with it or that are autoloaded.  This script purposely avoids reusing the metadata object that defines all the tables in neutron proper, so explicit autoloading is required.","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d63d449efe76c08c6c1cef26f87c9c7ef99b796a","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            sa.PrimaryKeyConstraint(\u0027binding_id\u0027),"},{"line_number":195,"context_line":"        )"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        sa.Table("},{"line_number":199,"context_line":"            \u0027cisco_ml2_credentials\u0027, metadata,"},{"line_number":200,"context_line":"            sa.Column(\u0027credential_id\u0027, sa.String(length\u003d255), nullable\u003dTrue),"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FXk8%3D","line":197,"updated":"2014-03-07 09:34:56.000000000","message":"Only one line","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1a5635d8aafd35b60e46987599eaf1d9f51814c5","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            sa.PrimaryKeyConstraint(\u0027binding_id\u0027),"},{"line_number":195,"context_line":"        )"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        sa.Table("},{"line_number":199,"context_line":"            \u0027cisco_ml2_credentials\u0027, metadata,"},{"line_number":200,"context_line":"            sa.Column(\u0027credential_id\u0027, sa.String(length\u003d255), nullable\u003dTrue),"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FItg%3D","line":197,"in_reply_to":"AAAAVn%2F%2FXk8%3D","updated":"2014-03-08 12:21:13.000000000","message":"Done","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d63d449efe76c08c6c1cef26f87c9c7ef99b796a","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        sa.Table("},{"line_number":271,"context_line":"            \u0027ml2_vxlan_allocations\u0027, metadata,"},{"line_number":272,"context_line":"            sa.Column(\u0027vxlan_vni\u0027, sa.Integer, nullable\u003dFalse,"},{"line_number":273,"context_line":"                  autoincrement\u003dFalse),"},{"line_number":274,"context_line":"            sa.Column(\u0027allocated\u0027, sa.Boolean, nullable\u003dFalse),"},{"line_number":275,"context_line":"            sa.PrimaryKeyConstraint(\u0027vxlan_vni\u0027),"},{"line_number":276,"context_line":"        )"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FXlM%3D","line":273,"updated":"2014-03-07 09:34:56.000000000","message":"4 more spaces needed for correct indent.","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1a5635d8aafd35b60e46987599eaf1d9f51814c5","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        sa.Table("},{"line_number":271,"context_line":"            \u0027ml2_vxlan_allocations\u0027, metadata,"},{"line_number":272,"context_line":"            sa.Column(\u0027vxlan_vni\u0027, sa.Integer, nullable\u003dFalse,"},{"line_number":273,"context_line":"                  autoincrement\u003dFalse),"},{"line_number":274,"context_line":"            sa.Column(\u0027allocated\u0027, sa.Boolean, nullable\u003dFalse),"},{"line_number":275,"context_line":"            sa.PrimaryKeyConstraint(\u0027vxlan_vni\u0027),"},{"line_number":276,"context_line":"        )"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FItk%3D","line":273,"in_reply_to":"AAAAVn%2F%2FXlM%3D","updated":"2014-03-08 12:21:13.000000000","message":"Done","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d63d449efe76c08c6c1cef26f87c9c7ef99b796a","unresolved":false,"context_lines":[{"line_number":356,"context_line":"    args \u003d parser.parse_args()"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    try:"},{"line_number":359,"context_line":"        migrate_func \u003d migrate_map[args.release][args.plugin]()"},{"line_number":360,"context_line":"    except KeyError:"},{"line_number":361,"context_line":"        msg \u003d _(\u0027Support for migrating %(plugin)s for release \u0027"},{"line_number":362,"context_line":"                \u0027%(release)s is not yet implemented\u0027)"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FXps%3D","line":359,"updated":"2014-03-07 09:34:56.000000000","message":"How about passing args.connection to constructor and creating self.engine there?","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"1a5635d8aafd35b60e46987599eaf1d9f51814c5","unresolved":false,"context_lines":[{"line_number":356,"context_line":"    args \u003d parser.parse_args()"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    try:"},{"line_number":359,"context_line":"        migrate_func \u003d migrate_map[args.release][args.plugin]()"},{"line_number":360,"context_line":"    except KeyError:"},{"line_number":361,"context_line":"        msg \u003d _(\u0027Support for migrating %(plugin)s for release \u0027"},{"line_number":362,"context_line":"                \u0027%(release)s is not yet implemented\u0027)"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAVn%2F%2FIto%3D","line":359,"in_reply_to":"AAAAVn%2F%2FXps%3D","updated":"2014-03-08 12:21:13.000000000","message":"I\u0027d prefer to keep the current approach of separating plugin-specific config (__init__) from migration-specific config (__call__).","commit_id":"dc044a4f2c0cc992d147525d8ba4f331e4c6dc1e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"dc76f85d7a281e05da9f4a326f6434d1f9edeb89","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Known Limitations:"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"   - THIS SCRIPT IS DESTRUCTIVE!  Make sure to backup your"},{"line_number":25,"context_line":"   Neutron database before running this script, in case anything goes"},{"line_number":26,"context_line":"   wrong."},{"line_number":27,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAVn%2F%2B01w%3D","line":24,"updated":"2014-03-11 22:40:44.000000000","message":"Is this absolutely necessary?\n\nIs it worth considering cloning the db ahead of the migration, and revert the operation in case something goes wrong? Something along the lines:\n\nmain:\n  \n  clone_db\n  try:\n      perform_migration\n  except:\n      drop_new_db\n      recover_from_clone\n\n\nYou sort of already save the tables (if explicitly asked by the user), so I guess that\u0027s shouldn\u0027t be a super-hard addition; that would improve the UX of this script quite a bit.\n\nAlso, can we add a prompt before the migration, to make sure the admin realizes what he\u0027s doing? I wish myself that I had a Y/n prompt so many times in my life ;)","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"90b9a35e0fe42918e7fab44c067670257661d7e3","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Known Limitations:"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"   - THIS SCRIPT IS DESTRUCTIVE!  Make sure to backup your"},{"line_number":25,"context_line":"   Neutron database before running this script, in case anything goes"},{"line_number":26,"context_line":"   wrong."},{"line_number":27,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAWH%2F%2F8dM%3D","line":24,"in_reply_to":"AAAAVn%2F%2B01w%3D","updated":"2014-03-12 19:14:01.000000000","message":"Maru picked this up because the original assignee failed to start the task  To save time and since this should only be run once, I suggested to Maru that we take the shortcut and require that the database be backed up prior to running this script.  Via the bug fix process we can add make this script more robust, but for now I think a once migration works.","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"23bd098dcb3050da8052c78fb235cce1fd7470dd","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Known Limitations:"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"   - THIS SCRIPT IS DESTRUCTIVE!  Make sure to backup your"},{"line_number":25,"context_line":"   Neutron database before running this script, in case anything goes"},{"line_number":26,"context_line":"   wrong."},{"line_number":27,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAWH%2F%2Fx4Q%3D","line":24,"in_reply_to":"AAAAWH%2F%2F4HE%3D","updated":"2014-03-13 21:20:45.000000000","message":"That\u0027s ok.","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"e1e51c062fedcf3661964695ae84889f3f1757ab","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Known Limitations:"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"   - THIS SCRIPT IS DESTRUCTIVE!  Make sure to backup your"},{"line_number":25,"context_line":"   Neutron database before running this script, in case anything goes"},{"line_number":26,"context_line":"   wrong."},{"line_number":27,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAWH%2F%2F4HE%3D","line":24,"in_reply_to":"AAAAWH%2F%2F8dM%3D","updated":"2014-03-13 07:53:16.000000000","message":"I didn\u0027t bother with a y/n confirmation because running the script requires providing details that (to me) imply that the user knows what is going to happen.  Invoking the script without providing both a plugin target and a db url will cause no harm.  Is that not sufficient?","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"dc76f85d7a281e05da9f4a326f6434d1f9edeb89","unresolved":false,"context_lines":[{"line_number":29,"context_line":"   via neutron-db-manage before attempting to migrate to ml2."},{"line_number":30,"context_line":"   Initially, only the icehouse release is supported."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"   - This script does not automate configuration migration."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Example usage:"},{"line_number":35,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAVn%2F%2B008%3D","line":32,"updated":"2014-03-11 22:40:44.000000000","message":"Is it worthwhile listing the DB backend\u0027s (e.g. postgres vs mysql)?","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"e1e51c062fedcf3661964695ae84889f3f1757ab","unresolved":false,"context_lines":[{"line_number":29,"context_line":"   via neutron-db-manage before attempting to migrate to ml2."},{"line_number":30,"context_line":"   Initially, only the icehouse release is supported."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"   - This script does not automate configuration migration."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Example usage:"},{"line_number":35,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAWH%2F%2F4J0%3D","line":32,"in_reply_to":"AAAAVn%2F%2B008%3D","updated":"2014-03-13 07:53:16.000000000","message":"I\u0027m not sure why it would be necessary, since there is nothing db-specific about the migration.","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"23bd098dcb3050da8052c78fb235cce1fd7470dd","unresolved":false,"context_lines":[{"line_number":29,"context_line":"   via neutron-db-manage before attempting to migrate to ml2."},{"line_number":30,"context_line":"   Initially, only the icehouse release is supported."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"   - This script does not automate configuration migration."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Example usage:"},{"line_number":35,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAWH%2F%2Fx24%3D","line":32,"in_reply_to":"AAAAWH%2F%2F4J0%3D","updated":"2014-03-13 21:20:45.000000000","message":"In the past we\u0027ve seen that some migrations didn\u0027t work exactly the same across different DB backends. It\u0027s a matter of \u0027supportability\u0027 of this script. Even though this should work with any DB, can we guarantee that it will without having tested it?\n\nTo this aim, I will be testing this with postgres, assuming that you\u0027ve tested with MySql.\n\nAnyway..feel free to ignore","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"dc76f85d7a281e05da9f4a326f6434d1f9edeb89","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Example usage:"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"  ./neutron-migrate-to-ml2 openvswitch mysql://login:pass@127.0.0.1/neutron"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"To manually test migration from ovs to ml2 with devstack:"},{"line_number":39,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAVn%2F%2B0y0%3D","line":36,"updated":"2014-03-11 22:40:44.000000000","message":"do we need the ./ ? In theory we have the entry hook. But that leads me to the next question: is this patch accompanied by a patch to openstack-manuals, that contains these details?","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"e1e51c062fedcf3661964695ae84889f3f1757ab","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Example usage:"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"  ./neutron-migrate-to-ml2 openvswitch mysql://login:pass@127.0.0.1/neutron"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"To manually test migration from ovs to ml2 with devstack:"},{"line_number":39,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAWH%2F%2F4Js%3D","line":36,"in_reply_to":"AAAAVn%2F%2B0y0%3D","updated":"2014-03-13 07:53:16.000000000","message":"I\u0027ll fix the script reference.  RE: manuals, I\u0027m adding a DocImpact tag as per Mark\u0027s comment.","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"dc76f85d7a281e05da9f4a326f6434d1f9edeb89","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            ml2_network_segments \u003d metadata.tables[\u0027ml2_network_segments\u0027]"},{"line_number":121,"context_line":"            engine.execute(ml2_network_segments.insert(), ml2_bindings)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def migrate_gre_allocations(self, engine):"},{"line_number":124,"context_line":"        pass"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def migrate_gre_endpoints(self, engine):"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAVn%2F%2B0zk%3D","line":123,"updated":"2014-03-11 22:40:44.000000000","message":"what are these for?","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"e1e51c062fedcf3661964695ae84889f3f1757ab","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            ml2_network_segments \u003d metadata.tables[\u0027ml2_network_segments\u0027]"},{"line_number":121,"context_line":"            engine.execute(ml2_network_segments.insert(), ml2_bindings)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def migrate_gre_allocations(self, engine):"},{"line_number":124,"context_line":"        pass"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def migrate_gre_endpoints(self, engine):"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAWH%2F%2F4Ic%3D","line":123,"in_reply_to":"AAAAVn%2F%2B0zk%3D","updated":"2014-03-13 07:53:16.000000000","message":"I realize that it\u0027s not clear that this is a base class that OVS and LB migrations can customize so I\u0027ll change the name to \u0027BaseMigrateToMl2_Icehouse\u0027 to make it clear.  In the case of these methods, they are called as part of the main migration and overridden for OVS to transfer tunnel configuration.","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"23bd098dcb3050da8052c78fb235cce1fd7470dd","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            ml2_network_segments \u003d metadata.tables[\u0027ml2_network_segments\u0027]"},{"line_number":121,"context_line":"            engine.execute(ml2_network_segments.insert(), ml2_bindings)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def migrate_gre_allocations(self, engine):"},{"line_number":124,"context_line":"        pass"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def migrate_gre_endpoints(self, engine):"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAWH%2F%2Fx2g%3D","line":123,"in_reply_to":"AAAAWH%2F%2F4Ic%3D","updated":"2014-03-13 21:20:45.000000000","message":"a docstring will be useful or a comment will be helpful","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"90b9a35e0fe42918e7fab44c067670257661d7e3","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        parser.error(msg % {\u0027plugin\u0027: args.plugin, \u0027release\u0027: args.release})"},{"line_number":361,"context_line":"    else:"},{"line_number":362,"context_line":"        migrate_func(args.connection, args.save_tables)"},{"line_number":363,"context_line":"        sys.exit(0)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAWH%2F%2F8ck%3D","line":363,"updated":"2014-03-12 19:14:01.000000000","message":"When main returns with None the exit value should 0.","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3c15ef86126c449e664ccbb88c7b6062fd3eec2c","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        parser.error(msg % {\u0027plugin\u0027: args.plugin, \u0027release\u0027: args.release})"},{"line_number":361,"context_line":"    else:"},{"line_number":362,"context_line":"        migrate_func(args.connection, args.save_tables)"},{"line_number":363,"context_line":"        sys.exit(0)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAWH%2F%2Fh4k%3D","line":363,"in_reply_to":"AAAAWH%2F%2F4IY%3D","updated":"2014-03-17 09:47:12.000000000","message":"I believe he means the sys.exit(0) is redundant.","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"e1e51c062fedcf3661964695ae84889f3f1757ab","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        parser.error(msg % {\u0027plugin\u0027: args.plugin, \u0027release\u0027: args.release})"},{"line_number":361,"context_line":"    else:"},{"line_number":362,"context_line":"        migrate_func(args.connection, args.save_tables)"},{"line_number":363,"context_line":"        sys.exit(0)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAWH%2F%2F4IY%3D","line":363,"in_reply_to":"AAAAWH%2F%2F8ck%3D","updated":"2014-03-13 07:53:16.000000000","message":"I\u0027m not sure I follow.  Do you want sys.exit after line 367?  Better error handling? Something else?","commit_id":"e67a11197befffa195a616b9a0aea6ca4fb26556"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"8861aabece7dc83b3895515408b7c3c9fa572180","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env python"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2B5XQ%3D","line":1,"updated":"2014-03-21 21:35:06.000000000","message":"I think we should moving this file in the tree to neutron/db/migrations and ending it with a .py so we can get flake8 checking on it.","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"5e57558e9113606b4bed14e48bf8823e9e1e4caa","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env python"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2014 Red Hat, Inc."},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2Bzf4%3D","line":1,"in_reply_to":"AAAAWH%2F%2B5XQ%3D","updated":"2014-03-24 07:43:07.000000000","message":"Done","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"cb49158f99e03ead24725620aaec7e580d4cea18","unresolved":false,"context_lines":[{"line_number":62,"context_line":"import sqlalchemy as sa"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"from neutron.extensions import portbindings"},{"line_number":65,"context_line":"from neutron.plugins.linuxbridge.common import constants as lb_constants"},{"line_number":66,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2Fa40%3D","line":65,"updated":"2014-03-18 01:33:25.000000000","message":"In distributions where each plugin is a separate package, doesn\u0027t this import require the linuxbridge plugin package to be installed when migrating from openvswitch to ml2? Maybe duplicating content from this import in this file is OK to avoid this dependency.","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"5e57558e9113606b4bed14e48bf8823e9e1e4caa","unresolved":false,"context_lines":[{"line_number":62,"context_line":"import sqlalchemy as sa"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"from neutron.extensions import portbindings"},{"line_number":65,"context_line":"from neutron.plugins.linuxbridge.common import constants as lb_constants"},{"line_number":66,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2FSpY%3D","line":65,"in_reply_to":"AAAAWH%2F%2Fa40%3D","updated":"2014-03-24 07:43:07.000000000","message":"Done","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"cb49158f99e03ead24725620aaec7e580d4cea18","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        self.drop_old_tables(engine, save_tables)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def migrate_binding_dict(self, binding):"},{"line_number":108,"context_line":"        binding[\u0027id\u0027] \u003d uuidutils.generate_uuid()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def migrate_network_segments(self, engine, metadata):"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2Fauk%3D","line":107,"updated":"2014-03-18 01:33:25.000000000","message":"How about calling this migrate_segment_dict() so that it isn\u0027t confused with the port binding table?","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"5e57558e9113606b4bed14e48bf8823e9e1e4caa","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        self.drop_old_tables(engine, save_tables)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def migrate_binding_dict(self, binding):"},{"line_number":108,"context_line":"        binding[\u0027id\u0027] \u003d uuidutils.generate_uuid()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def migrate_network_segments(self, engine, metadata):"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2FSpU%3D","line":107,"in_reply_to":"AAAAWH%2F%2Fauk%3D","updated":"2014-03-24 07:43:07.000000000","message":"Done","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"cb49158f99e03ead24725620aaec7e580d4cea18","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        # so that a uuid can be generated for each segment."},{"line_number":113,"context_line":"        source_table \u003d sa.Table(self.segment_table_name, metadata,"},{"line_number":114,"context_line":"                                autoload\u003dTrue, autoload_with\u003dengine)"},{"line_number":115,"context_line":"        source_bindings \u003d engine.execute(source_table.select())"},{"line_number":116,"context_line":"        ml2_bindings \u003d [dict(x) for x in source_bindings]"},{"line_number":117,"context_line":"        for binding in ml2_bindings:"},{"line_number":118,"context_line":"            self.migrate_binding_dict(binding)"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2FauY%3D","line":115,"updated":"2014-03-18 01:33:25.000000000","message":"source_bindings-\u003esource_segments?","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"5e57558e9113606b4bed14e48bf8823e9e1e4caa","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        # so that a uuid can be generated for each segment."},{"line_number":113,"context_line":"        source_table \u003d sa.Table(self.segment_table_name, metadata,"},{"line_number":114,"context_line":"                                autoload\u003dTrue, autoload_with\u003dengine)"},{"line_number":115,"context_line":"        source_bindings \u003d engine.execute(source_table.select())"},{"line_number":116,"context_line":"        ml2_bindings \u003d [dict(x) for x in source_bindings]"},{"line_number":117,"context_line":"        for binding in ml2_bindings:"},{"line_number":118,"context_line":"            self.migrate_binding_dict(binding)"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2FSpQ%3D","line":115,"in_reply_to":"AAAAWH%2F%2FauY%3D","updated":"2014-03-24 07:43:07.000000000","message":"Done","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"cb49158f99e03ead24725620aaec7e580d4cea18","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        source_table \u003d sa.Table(self.segment_table_name, metadata,"},{"line_number":114,"context_line":"                                autoload\u003dTrue, autoload_with\u003dengine)"},{"line_number":115,"context_line":"        source_bindings \u003d engine.execute(source_table.select())"},{"line_number":116,"context_line":"        ml2_bindings \u003d [dict(x) for x in source_bindings]"},{"line_number":117,"context_line":"        for binding in ml2_bindings:"},{"line_number":118,"context_line":"            self.migrate_binding_dict(binding)"},{"line_number":119,"context_line":"        if ml2_bindings:"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2FauQ%3D","line":116,"updated":"2014-03-18 01:33:25.000000000","message":"ml2_bindings-\u003eml2_segments?","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"5e57558e9113606b4bed14e48bf8823e9e1e4caa","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        source_table \u003d sa.Table(self.segment_table_name, metadata,"},{"line_number":114,"context_line":"                                autoload\u003dTrue, autoload_with\u003dengine)"},{"line_number":115,"context_line":"        source_bindings \u003d engine.execute(source_table.select())"},{"line_number":116,"context_line":"        ml2_bindings \u003d [dict(x) for x in source_bindings]"},{"line_number":117,"context_line":"        for binding in ml2_bindings:"},{"line_number":118,"context_line":"            self.migrate_binding_dict(binding)"},{"line_number":119,"context_line":"        if ml2_bindings:"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2FSpM%3D","line":116,"in_reply_to":"AAAAWH%2F%2FauQ%3D","updated":"2014-03-24 07:43:07.000000000","message":"Done","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"cb49158f99e03ead24725620aaec7e580d4cea18","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def migrate_port_bindings(self, engine):"},{"line_number":138,"context_line":"        #FIXME(marun) Should values be provided for any of the following?"},{"line_number":139,"context_line":"        #             profile, vif_details, segment"},{"line_number":140,"context_line":"        engine.execute(sa.text(\"\"\""},{"line_number":141,"context_line":"          INSERT INTO ml2_port_bindings (port_id, host, vif_type, driver)"},{"line_number":142,"context_line":"            SELECT port_id, host, :vif_type as vif_type, :driver_type as driver"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2Fays%3D","line":139,"updated":"2014-03-18 01:33:25.000000000","message":"The segment field for a bound port should be the UUID of the bound network segment. If this is empty, the ML2 plugin\u0027s implementation of the get_device_details RPC will not return the segment info to the L2 agent, and a warning will be logged.\n\nConsidering the issue above, and that the vif_details value will be important once https://bugs.launchpad.net/nova/+bug/1112912 is fixed, I\u0027m starting to think that the DB migration tool should leave all the ports unbound (vif_type \u003d VIF_TYPE_UNBOUND, vif_details \u003d {} (empty string is OK), segment \u003d None, driver \u003d None), and that this patch should depend on the fix I\u0027m working on for https://launchpad.net/bugs/1276391, where the plugin will establish the binding whenever its needed if the port is unbound, including in get operations and the get_device_details RPC. See item 6 in https://docs.google.com/document/d/1k8tAqfQr8Ujzx5TzpXTYEUaym-0U-pE3YL9wjrS8cDg for details.","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"5e57558e9113606b4bed14e48bf8823e9e1e4caa","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def migrate_port_bindings(self, engine):"},{"line_number":138,"context_line":"        #FIXME(marun) Should values be provided for any of the following?"},{"line_number":139,"context_line":"        #             profile, vif_details, segment"},{"line_number":140,"context_line":"        engine.execute(sa.text(\"\"\""},{"line_number":141,"context_line":"          INSERT INTO ml2_port_bindings (port_id, host, vif_type, driver)"},{"line_number":142,"context_line":"            SELECT port_id, host, :vif_type as vif_type, :driver_type as driver"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2BzgE%3D","line":139,"in_reply_to":"AAAAWH%2F%2Fays%3D","updated":"2014-03-24 07:43:07.000000000","message":"Done - the segment field will now be now populated.","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"cb49158f99e03ead24725620aaec7e580d4cea18","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                \u0027portbindingports\u0027,"},{"line_number":315,"context_line":"            ])"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def migrate_gre_allocations(self, engine):"},{"line_number":318,"context_line":"        engine.execute(\"\"\""},{"line_number":319,"context_line":"          INSERT INTO ml2_gre_allocations"},{"line_number":320,"context_line":"            SELECT tunnel_id as gre_id, allocated"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2FaqQ%3D","line":317,"updated":"2014-03-18 01:33:25.000000000","message":"With the openvswitch plugin, tunnels can be either GRE or VXLAN, depending on the server\u0027s tunnel_type config value. The migration tool needs to either read this config param or (more likely) take an argument selecting which type of ML2 tunnel allocations should be created from the openvswitch tunnel allocations.","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"5e57558e9113606b4bed14e48bf8823e9e1e4caa","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                \u0027portbindingports\u0027,"},{"line_number":315,"context_line":"            ])"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def migrate_gre_allocations(self, engine):"},{"line_number":318,"context_line":"        engine.execute(\"\"\""},{"line_number":319,"context_line":"          INSERT INTO ml2_gre_allocations"},{"line_number":320,"context_line":"            SELECT tunnel_id as gre_id, allocated"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAWH%2F%2B0Ic%3D","line":317,"in_reply_to":"AAAAWH%2F%2FaqQ%3D","updated":"2014-03-24 07:43:07.000000000","message":"Done","commit_id":"bf25670e294ffbc21d310bcdac45c0a50796f63d"}],"setup.cfg":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8fbe4b0ce95afb19a13dcd3c7202c6301c8bfbc5","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    bin/neutron-rootwrap"},{"line_number":72,"context_line":"    bin/quantum-rootwrap-xen-dom0"},{"line_number":73,"context_line":"    bin/neutron-rootwrap-xen-dom0"},{"line_number":74,"context_line":"    bin/migrate-to-ml2"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"[global]"},{"line_number":77,"context_line":"setup-hooks \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":2,"id":"AAAAU3%2F%2FdTA%3D","line":74,"updated":"2014-02-26 14:55:16.000000000","message":"suggestion: may be neutron-migrate-to-ml2 , as it\u0027s system wide.","commit_id":"02050c8a4fa8599f3b456ab1b486994f4e0d2856"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"924ce5db4cb078587522bea899f8402479759ac5","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    bin/neutron-rootwrap"},{"line_number":72,"context_line":"    bin/quantum-rootwrap-xen-dom0"},{"line_number":73,"context_line":"    bin/neutron-rootwrap-xen-dom0"},{"line_number":74,"context_line":"    bin/migrate-to-ml2"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"[global]"},{"line_number":77,"context_line":"setup-hooks \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":2,"id":"AAAAVX%2F%2F9fg%3D","line":74,"in_reply_to":"AAAAU3%2F%2FdTA%3D","updated":"2014-02-27 05:49:04.000000000","message":"Done.\n\nPlease -1 when you comment on things that require reviewer action, as this one clearly does.","commit_id":"02050c8a4fa8599f3b456ab1b486994f4e0d2856"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9ec3da0640d233536d40b5c99ad4a0332c701624","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    bin/neutron-rootwrap"},{"line_number":72,"context_line":"    bin/quantum-rootwrap-xen-dom0"},{"line_number":73,"context_line":"    bin/neutron-rootwrap-xen-dom0"},{"line_number":74,"context_line":"    bin/migrate-to-ml2"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"[global]"},{"line_number":77,"context_line":"setup-hooks \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":2,"id":"AAAAVX%2F%2F9Bg%3D","line":74,"in_reply_to":"AAAAVX%2F%2F9fg%3D","updated":"2014-02-27 06:46:31.000000000","message":"Thanks, I will ;)","commit_id":"02050c8a4fa8599f3b456ab1b486994f4e0d2856"}]}
