)]}'
{"neutron/db/migration/alembic_migrations/mysql_engine.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"6e85708ab14ea5f62361967b32efb04dde5e7725","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def get_engine():"},{"line_number":21,"context_line":"    \"\"\"Get mysql engine from command line flags"},{"line_number":22,"context_line":"       or neutron config file"},{"line_number":23,"context_line":"       or return default from model_base."}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_653cfd2f","line":20,"updated":"2015-06-12 05:06:21.000000000","message":"Such functions are going there https://github.com/openstack/neutron/blob/master/neutron/db/migration/__init__.py not in a separate file.","commit_id":"d9f284524fdd2f9968a848c0a5f2ff0195dc4007"},{"author":{"_account_id":13671,"name":"Vladislav Belogrudov","email":"v.belogrudov@yadro.com","username":"vb"},"change_message_id":"98aea2368f7052c8f114ffade8b4e66c61afc850","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def get_engine():"},{"line_number":21,"context_line":"    \"\"\"Get mysql engine from command line flags"},{"line_number":22,"context_line":"       or neutron config file"},{"line_number":23,"context_line":"       or return default from model_base."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_28b008dd","line":20,"in_reply_to":"1af86dd1_653cfd2f","updated":"2015-06-16 12:02:33.000000000","message":"Thanks a lot Ann, will do!","commit_id":"d9f284524fdd2f9968a848c0a5f2ff0195dc4007"}],"neutron/db/migration/alembic_migrations/versions/327ee5fde2c7_set_innodb_engine.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"d55dac2bb799fe12953547b18b824e1c28095455","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    dialect \u003d op.get_bind().dialect.name"},{"line_number":41,"context_line":"    engine \u003d mysql_engine.get_engine()"},{"line_number":42,"context_line":"    if dialect \u003d\u003d \u0027mysql\u0027 and engine \u003d\u003d \u0027InnoDB\u0027:"},{"line_number":43,"context_line":"        for table in TABLES:"},{"line_number":44,"context_line":"            op.execute(\"ALTER TABLE %s ENGINE\u003dInnoDB\" % table)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_9faf442b","line":43,"updated":"2015-06-11 17:58:31.000000000","message":"Changing existed migration is possible only in case if it does not work. This is not that case.","commit_id":"d9f284524fdd2f9968a848c0a5f2ff0195dc4007"},{"author":{"_account_id":13671,"name":"Vladislav Belogrudov","email":"v.belogrudov@yadro.com","username":"vb"},"change_message_id":"98aea2368f7052c8f114ffade8b4e66c61afc850","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    dialect \u003d op.get_bind().dialect.name"},{"line_number":41,"context_line":"    engine \u003d mysql_engine.get_engine()"},{"line_number":42,"context_line":"    if dialect \u003d\u003d \u0027mysql\u0027 and engine \u003d\u003d \u0027InnoDB\u0027:"},{"line_number":43,"context_line":"        for table in TABLES:"},{"line_number":44,"context_line":"            op.execute(\"ALTER TABLE %s ENGINE\u003dInnoDB\" % table)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_7be25cd7","line":43,"in_reply_to":"1af86dd1_25c1652f","updated":"2015-06-16 12:02:33.000000000","message":":) Thank you very much Ann! I will re-base and will do other necessary modifications.","commit_id":"d9f284524fdd2f9968a848c0a5f2ff0195dc4007"},{"author":{"_account_id":13671,"name":"Vladislav Belogrudov","email":"v.belogrudov@yadro.com","username":"vb"},"change_message_id":"fa413da5f30f508e2cddcf0f08fed82f468e2521","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    dialect \u003d op.get_bind().dialect.name"},{"line_number":41,"context_line":"    engine \u003d mysql_engine.get_engine()"},{"line_number":42,"context_line":"    if dialect \u003d\u003d \u0027mysql\u0027 and engine \u003d\u003d \u0027InnoDB\u0027:"},{"line_number":43,"context_line":"        for table in TABLES:"},{"line_number":44,"context_line":"            op.execute(\"ALTER TABLE %s ENGINE\u003dInnoDB\" % table)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_d901556c","line":43,"in_reply_to":"3afb71cf_9faf442b","updated":"2015-06-11 19:56:06.000000000","message":"this script tries to set tables to InnoDB unconditionally, disregarding what engine actually is required by users. If user specifies other engine via \"upgrade --mysql-engine\u003dsome_other_engine\" this script still resets the tables to InnoDB. This is kind of the hardest lock-in for most of OpenStack projects (hard-coded InnoDB strings). \n\nThe fix is to check if user actually wants to run different engine for MySQL. If not - mysql_engine.get_engine() will return \u0027InnoDB\u0027 and the code will work as before. For example users can run MySQL with MyISAM/InnoDB/NDBCLUSTER engines, MariaDB adds to these CONNECT and few others. \n\nWith hard-coded strings these engines and users are out of luck. I am trying to run NDB (MySQL Cluster) and even setting --mysql-engine\u003dNDBCLUSTER still produces tables for InnoDB.","commit_id":"d9f284524fdd2f9968a848c0a5f2ff0195dc4007"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"6e85708ab14ea5f62361967b32efb04dde5e7725","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    dialect \u003d op.get_bind().dialect.name"},{"line_number":41,"context_line":"    engine \u003d mysql_engine.get_engine()"},{"line_number":42,"context_line":"    if dialect \u003d\u003d \u0027mysql\u0027 and engine \u003d\u003d \u0027InnoDB\u0027:"},{"line_number":43,"context_line":"        for table in TABLES:"},{"line_number":44,"context_line":"            op.execute(\"ALTER TABLE %s ENGINE\u003dInnoDB\" % table)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_25c1652f","line":43,"in_reply_to":"3afb71cf_d901556c","updated":"2015-06-12 05:06:21.000000000","message":"I know what this migration is doing I create this one. :)\n\nThis migration was added because there were issues with other engines, so we can\u0027t guarantee that migrations will work with them. Also there was issue with heal_script, test_models and  MyISAM. \n\nThis migration won\u0027t be changed. I want to pay you attention that I suggest to rebase on https://review.openstack.org/188005 this change deletes this migration and heal_script, so after that it will be possible to think about such changes. If you don\u0027t want to rebase just wait before it will be merged. But all of this hard-coded InnoDB was created because we can\u0027t guarantee that all migrations will work properly with other engines. \n\nIt is bad that we --mysql-engine that didn\u0027t work propely. We should work on that.\n\nNova also has restrictions on usage InnoDB https://github.com/openstack/nova/blob/master/nova/tests/unit/db/test_migrations.py#L718.","commit_id":"d9f284524fdd2f9968a848c0a5f2ff0195dc4007"}]}
