)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"40fa79f42c684851d05c0ce8016bb60507290086","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     oorgeron \u003coctave.orgeron@oracle.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-02-08 16:46:53 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Closes-bug: 1662624"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":" Enables MySQL Cluster support for Keystone"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a430d35_cf8ab463","line":7,"updated":"2017-02-09 05:56:33.000000000","message":"This could be moved to the bottom of the message, after a description of why the change is needed.","commit_id":"7729450ac504e73fbf79e60d5fac4de94ca0059a"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"40fa79f42c684851d05c0ce8016bb60507290086","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Closes-bug: 1662624"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":" Enables MySQL Cluster support for Keystone"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Idf6e1f65ddb07e85ce864477aead976fd9a6af27"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a430d35_afb8082b","line":9,"updated":"2017-02-09 05:56:33.000000000","message":"This would make a great title line for the commit message. We have some good examples of various commit messages on our wiki: \n\nhttps://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"7729450ac504e73fbf79e60d5fac4de94ca0059a"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"ea95c3207fbcc88562a4a99d78381e5177649b86","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Closes-bug: 1662624"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":" Enables MySQL Cluster support for Keystone"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Idf6e1f65ddb07e85ce864477aead976fd9a6af27"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa31d9ce_73d8b21e","line":9,"in_reply_to":"1a430d35_afb8082b","updated":"2017-02-09 22:20:20.000000000","message":"I\u0027ll fix this up. \n\nThanks,\nOctave","commit_id":"7729450ac504e73fbf79e60d5fac4de94ca0059a"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"b9f727509689c730ed1f2f223f26067cc74377a7","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-bug: 1662624"},{"line_number":17,"context_line":"Implements: blueprint mysql-cluster-support"},{"line_number":18,"context_line":"Change-Id: Idf6e1f65ddb07e85ce864477aead976fd9a6af27"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa31d9ce_4013c75c","line":18,"updated":"2017-02-10 04:08:11.000000000","message":"you can make this patch depend on the oslo.db one by writing out:\n\n  Depends-On: I9f1fd2a87fdf75332de2339d3ff4f08ce9220dcf\n\nin the commit message","commit_id":"188c77c2dab9af0be68fdcfa610c7e77243009cf"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"4b811ae1cd2a27284c3c8436506ebfa96d50132b","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-bug: 1662624"},{"line_number":17,"context_line":"Implements: blueprint mysql-cluster-support"},{"line_number":18,"context_line":"Change-Id: Idf6e1f65ddb07e85ce864477aead976fd9a6af27"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa31d9ce_c3d6bac4","line":18,"in_reply_to":"fa31d9ce_4013c75c","updated":"2017-02-10 20:45:54.000000000","message":"I\u0027ll add this in. Thanks, Octave","commit_id":"188c77c2dab9af0be68fdcfa610c7e77243009cf"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"81201d3b0cf14625233f9e82ae8c81a3c11887d0","unresolved":false,"context_lines":[{"line_number":10,"context_line":"allows operators to select from MySQL (InnoDB) or MySQL Cluster (NDB) as the storage engine"},{"line_number":11,"context_line":"backend. This patch implements minor fixes to the ordering of column changes to handle"},{"line_number":12,"context_line":"the dropping and adding of foreign key constraints, as NDB is more strict on these"},{"line_number":13,"context_line":"operations."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-bug: 1662624"},{"line_number":16,"context_line":"Implements: blueprint mysql-cluster-support"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a30ddce_a9aeaf7e","line":13,"updated":"2017-03-09 17:41:12.000000000","message":"This needs to be described in a release note so that operators are aware.","commit_id":"9245c53046e0988a15fdbf22cd5a2f641dd5990b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"79d1a4cc8ad4d33144f76a6bce39b2ddc5fa6e40","unresolved":false,"context_lines":[{"line_number":10,"context_line":"allows operators to select from MySQL (InnoDB) or MySQL Cluster (NDB) as the storage engine"},{"line_number":11,"context_line":"backend. This patch implements minor fixes to the ordering of column changes to handle"},{"line_number":12,"context_line":"the dropping and adding of foreign key constraints, as NDB is more strict on these"},{"line_number":13,"context_line":"operations."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-bug: 1662624"},{"line_number":16,"context_line":"Implements: blueprint mysql-cluster-support"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a1ff146_c1722849","line":13,"in_reply_to":"3a1ff146_4072b6ae","updated":"2017-03-15 21:08:43.000000000","message":"We *just* merged some handy-dandy developer documentation for release notes. You can find them here:\n\nhttps://docs.openstack.org/developer/keystone/devref/development_best_practices.html#release-notes","commit_id":"9245c53046e0988a15fdbf22cd5a2f641dd5990b"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"b5c72c25661f4664a38b98b698eadff325a5fee0","unresolved":false,"context_lines":[{"line_number":10,"context_line":"allows operators to select from MySQL (InnoDB) or MySQL Cluster (NDB) as the storage engine"},{"line_number":11,"context_line":"backend. This patch implements minor fixes to the ordering of column changes to handle"},{"line_number":12,"context_line":"the dropping and adding of foreign key constraints, as NDB is more strict on these"},{"line_number":13,"context_line":"operations."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-bug: 1662624"},{"line_number":16,"context_line":"Implements: blueprint mysql-cluster-support"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a1ff146_4072b6ae","line":13,"in_reply_to":"9a30ddce_a9aeaf7e","updated":"2017-03-15 19:43:20.000000000","message":"Agreed. What is the process for me to update the keystone release notes?","commit_id":"9245c53046e0988a15fdbf22cd5a2f641dd5990b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"81201d3b0cf14625233f9e82ae8c81a3c11887d0","unresolved":false,"context_lines":[{"line_number":12,"context_line":"the dropping and adding of foreign key constraints, as NDB is more strict on these"},{"line_number":13,"context_line":"operations."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-bug: 1662624"},{"line_number":16,"context_line":"Implements: blueprint mysql-cluster-support"},{"line_number":17,"context_line":"Depends-On: I9f1fd2a87fdf75332de2339d3ff4f08ce9220dcf"},{"line_number":18,"context_line":"Change-Id: Idf6e1f65ddb07e85ce864477aead976fd9a6af27"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a30ddce_09f89b7a","line":15,"updated":"2017-03-09 17:41:12.000000000","message":"This bug report consists of multiple steps but it doesn\u0027t look like this review implements all of them?","commit_id":"9245c53046e0988a15fdbf22cd5a2f641dd5990b"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"b5c72c25661f4664a38b98b698eadff325a5fee0","unresolved":false,"context_lines":[{"line_number":12,"context_line":"the dropping and adding of foreign key constraints, as NDB is more strict on these"},{"line_number":13,"context_line":"operations."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-bug: 1662624"},{"line_number":16,"context_line":"Implements: blueprint mysql-cluster-support"},{"line_number":17,"context_line":"Depends-On: I9f1fd2a87fdf75332de2339d3ff4f08ce9220dcf"},{"line_number":18,"context_line":"Change-Id: Idf6e1f65ddb07e85ce864477aead976fd9a6af27"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3a1ff146_80d90e86","line":15,"in_reply_to":"9a30ddce_09f89b7a","updated":"2017-03-15 19:43:20.000000000","message":"Fortunately, with the changes I\u0027m making to oslo_db, I\u0027ll only need to make the changes that are in this patch as I\u0027ve moved a great deal of the logic up to that level.","commit_id":"9245c53046e0988a15fdbf22cd5a2f641dd5990b"}],"keystone/common/sql/contract_repo/versions/012_contract_add_domain_id_to_idp.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"b9f727509689c730ed1f2f223f26067cc74377a7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"fa31d9ce_801dbf68","updated":"2017-02-10 04:08:11.000000000","message":"this is the only change that makes me a bit nervous","commit_id":"188c77c2dab9af0be68fdcfa610c7e77243009cf"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"4b811ae1cd2a27284c3c8436506ebfa96d50132b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"fa31d9ce_c3179a4f","in_reply_to":"fa31d9ce_801dbf68","updated":"2017-02-10 20:45:54.000000000","message":"Hi Steve,\n\nThe bits I\u0027ve added here are to remove and then add back the foreign key constraint around the table column alter for domain_id in the identity_provider table on line 35. InnoDB is very relaxed about these types of changes, while NDB is more strict. However, there are other examples of the proper flows being done when updating a table or column that has foreign key constraints. If you look at 014_contract_add_domain_id_to_user_table.py, you\u0027ll see that it does the FKC drops before making the table changes, which is the right way to do these table modifications. I\u0027ve tested this on InnoDB and NDB, without any error messages in the db_sync operation. \n\nLet me know if you have any other concerns.\n\nThanks,\nOctave","commit_id":"188c77c2dab9af0be68fdcfa610c7e77243009cf"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"97d411f840f34090db1bab02c80315ead00f4b5d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        migrate_engine.execute(drop_idp_insert_trigger)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def _get_fk_name(inspector, table, fk_column):"},{"line_number":57,"context_line":"    for fk in inspector.get_foreign_keys(table):"},{"line_number":58,"context_line":"        if fk_column in fk[\u0027constrained_columns\u0027]:"},{"line_number":59,"context_line":"            return fk[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_90595c5d","line":56,"updated":"2017-03-01 17:22:28.000000000","message":"Assuming this can be documented, this probably belongs in keystone.common.sql.upgrades","commit_id":"9245c53046e0988a15fdbf22cd5a2f641dd5990b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"79d1a4cc8ad4d33144f76a6bce39b2ddc5fa6e40","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        migrate_engine.execute(drop_idp_insert_trigger)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def _get_fk_name(inspector, table, fk_column):"},{"line_number":57,"context_line":"    for fk in inspector.get_foreign_keys(table):"},{"line_number":58,"context_line":"        if fk_column in fk[\u0027constrained_columns\u0027]:"},{"line_number":59,"context_line":"            return fk[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a1ff146_c1d788eb","line":56,"in_reply_to":"3a1ff146_a01e0a61","updated":"2017-03-15 21:08:43.000000000","message":"I don\u0027t see a problem with that. Docs would be nice, too.","commit_id":"9245c53046e0988a15fdbf22cd5a2f641dd5990b"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"b5c72c25661f4664a38b98b698eadff325a5fee0","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        migrate_engine.execute(drop_idp_insert_trigger)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def _get_fk_name(inspector, table, fk_column):"},{"line_number":57,"context_line":"    for fk in inspector.get_foreign_keys(table):"},{"line_number":58,"context_line":"        if fk_column in fk[\u0027constrained_columns\u0027]:"},{"line_number":59,"context_line":"            return fk[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a1ff146_a01e0a61","line":56,"in_reply_to":"ba2be162_90595c5d","updated":"2017-03-15 19:43:20.000000000","message":"I did see this in a few other sqlalchemy scripts in Keystone. I do agree we should move this to a common place. Are you okay with me making that change as part of this patch?","commit_id":"9245c53046e0988a15fdbf22cd5a2f641dd5990b"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"833872e9eb85ce53228021f6cdc896f36150b68f","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    # Add foreign key back"},{"line_number":38,"context_line":"    fkc.create()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    if upgrades.USE_TRIGGERS:"},{"line_number":41,"context_line":"        if migrate_engine.name \u003d\u003d \u0027postgresql\u0027:"},{"line_number":42,"context_line":"            drop_idp_insert_trigger \u003d ("}],"source_content_type":"text/x-python","patch_set":7,"id":"ffe62b97_707e031a","line":39,"updated":"2017-03-27 19:19:21.000000000","message":"For the duration of time that this constraint does not exist at the database level, is the application enforcing a similar constraint? I wouldn\u0027t want L38 to fail because an invalid project ID was slipped into this table.","commit_id":"a8d2c7027af4eee83311dd19c71c8d2a24a4fdc8"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"877f920acf06966c2b16c733c4f15621a41b163f","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    # Add foreign key back"},{"line_number":38,"context_line":"    fkc.create()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    if upgrades.USE_TRIGGERS:"},{"line_number":41,"context_line":"        if migrate_engine.name \u003d\u003d \u0027postgresql\u0027:"},{"line_number":42,"context_line":"            drop_idp_insert_trigger \u003d ("}],"source_content_type":"text/x-python","patch_set":7,"id":"dfeb2761_f0ff2e32","line":39,"in_reply_to":"ffe62b97_707e031a","updated":"2017-03-30 19:55:21.000000000","message":"I haven\u0027t seen any examples of Keystone or other services doing anything intelligent in these use cases where a constraint is dropped, table is changed, and then the constraint is recreated. There are other examples in keystone already that do this, look at 014_contract_add_domain_id_to_user_table.py for example.","commit_id":"a8d2c7027af4eee83311dd19c71c8d2a24a4fdc8"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"fcee3da69eb6ccfbfd0714e144104919a7dab3d1","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    project_table \u003d sql.Table(\u0027project\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    # Drop foreign key constraint first"},{"line_number":29,"context_line":"    fk_name \u003d upgrades.get_fk_name(inspector, \u0027identity_provider\u0027, \u0027domain_id\u0027)"},{"line_number":30,"context_line":"    fkc \u003d migrate.ForeignKeyConstraint(columns\u003d[idp_table.c.domain_id],"},{"line_number":31,"context_line":"                                       refcolumns\u003d[project_table.c.id],"},{"line_number":32,"context_line":"                                       name\u003dfk_name)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_efd616c4","line":29,"updated":"2017-07-22 02:27:59.000000000","message":"only  \"if ndb.ndb_status(engine)\", drops and recreates like these can be non-performant, lock tables, etc. and are unnecessary","commit_id":"7e38beca82b68eb13eee4686670e387f6938c78b"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"7822b627ea4c868075b229a32e4e51fae4376b6c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    project_table \u003d sql.Table(\u0027project\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    # Drop foreign key constraint first"},{"line_number":29,"context_line":"    fk_name \u003d upgrades.get_fk_name(inspector, \u0027identity_provider\u0027, \u0027domain_id\u0027)"},{"line_number":30,"context_line":"    fkc \u003d migrate.ForeignKeyConstraint(columns\u003d[idp_table.c.domain_id],"},{"line_number":31,"context_line":"                                       refcolumns\u003d[project_table.c.id],"},{"line_number":32,"context_line":"                                       name\u003dfk_name)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_0d893074","line":29,"in_reply_to":"ff346bd7_efd616c4","updated":"2017-07-24 23:09:32.000000000","message":"This is something that should be fixed regardless of NDB. There are actually other examples of foreign keys being dropped and recreated in Keystone. This one was just missed for some reason.","commit_id":"7e38beca82b68eb13eee4686670e387f6938c78b"}],"keystone/common/sql/contract_repo/versions/015_contract_update_federated_user_domain.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"97d411f840f34090db1bab02c80315ead00f4b5d","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        migrate_engine.execute(drop_trigger_stmt)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def _get_fk_name(inspector, table, fk_column):"},{"line_number":73,"context_line":"    for fk in inspector.get_foreign_keys(table):"},{"line_number":74,"context_line":"        if fk_column in fk[\u0027constrained_columns\u0027]:"},{"line_number":75,"context_line":"            return fk[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba2be162_702148b4","line":72,"updated":"2017-03-01 17:22:28.000000000","message":"Same as the other file -- which is why this deserves to be in a common module.","commit_id":"9245c53046e0988a15fdbf22cd5a2f641dd5990b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"81201d3b0cf14625233f9e82ae8c81a3c11887d0","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        migrate_engine.execute(drop_trigger_stmt)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def _get_fk_name(inspector, table, fk_column):"},{"line_number":73,"context_line":"    for fk in inspector.get_foreign_keys(table):"},{"line_number":74,"context_line":"        if fk_column in fk[\u0027constrained_columns\u0027]:"},{"line_number":75,"context_line":"            return fk[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_e94187aa","line":72,"in_reply_to":"ba2be162_702148b4","updated":"2017-03-09 17:41:12.000000000","message":"++ I\u0027d like to see this somewhere common instead of duplicating code.","commit_id":"9245c53046e0988a15fdbf22cd5a2f641dd5990b"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"833872e9eb85ce53228021f6cdc896f36150b68f","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    # Add foreign keys back"},{"line_number":56,"context_line":"    fkc1.create()"},{"line_number":57,"context_line":"    fkc2.create()"},{"line_number":58,"context_line":"    fkc3.create()"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    if upgrades.USE_TRIGGERS:"},{"line_number":61,"context_line":"        if migrate_engine.name \u003d\u003d \u0027postgresql\u0027:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ffe62b97_f08fb320","line":58,"updated":"2017-03-27 19:19:21.000000000","message":"Same comment/question as previous file.","commit_id":"a8d2c7027af4eee83311dd19c71c8d2a24a4fdc8"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"fcee3da69eb6ccfbfd0714e144104919a7dab3d1","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    inspector \u003d reflection.Inspector.from_engine(migrate_engine)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    user_table \u003d sql.Table(\u0027user\u0027, meta, autoload\u003dTrue)"},{"line_number":26,"context_line":"    local_usr_table \u003d sql.Table(\u0027local_user\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":"    nlocal_usr_table \u003d sql.Table(\u0027nonlocal_user\u0027, meta, autoload\u003dTrue)"},{"line_number":28,"context_line":"    project_table \u003d sql.Table(\u0027project\u0027, meta, autoload\u003dTrue)"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_8fef8a86","line":26,"updated":"2017-07-22 02:27:59.000000000","message":"all of this must be only for ndb, the autoloads here, changes, adds, drops, all take time and are complex","commit_id":"7e38beca82b68eb13eee4686670e387f6938c78b"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"7822b627ea4c868075b229a32e4e51fae4376b6c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    inspector \u003d reflection.Inspector.from_engine(migrate_engine)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    user_table \u003d sql.Table(\u0027user\u0027, meta, autoload\u003dTrue)"},{"line_number":26,"context_line":"    local_usr_table \u003d sql.Table(\u0027local_user\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":"    nlocal_usr_table \u003d sql.Table(\u0027nonlocal_user\u0027, meta, autoload\u003dTrue)"},{"line_number":28,"context_line":"    project_table \u003d sql.Table(\u0027project\u0027, meta, autoload\u003dTrue)"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_0dd81051","line":26,"in_reply_to":"ff346bd7_8fef8a86","updated":"2017-07-24 23:09:32.000000000","message":"There are other examples in Keystone where foreign keys are dropped and recreated around tables changes. These ones were missed for some reason. If we want to do something smart here, perhaps we should have oslo.db intercept these kinds of table changes and do the right thing with foreign keys. If you\u0027re looking for an example of this elsewhere in keystone already, you can look in the scripts:\n\n014_contract_add_domain_id_to_user_table.py\n092_make_implied_roles_fks_cascaded.py\n\nPoint here is that this isn\u0027t specific to NDB. InnoDB is a bit forgiving around this. If we want to make the databases more portable, we should be following proper SQL flows when updating stuff.","commit_id":"7e38beca82b68eb13eee4686670e387f6938c78b"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"65c14658a169a2ba3333af6b6e0083cc93f568df","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    project_table \u003d sql.Table(\u0027project\u0027, meta, autoload\u003dTrue)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    # Drop foreign key constraints first"},{"line_number":34,"context_line":"    fk1_name \u003d utils.get_foreign_key_constraint_name(inspector,"},{"line_number":35,"context_line":"                                                     \u0027local_user\u0027,"},{"line_number":36,"context_line":"                                                     \u0027user_id\u0027)"},{"line_number":37,"context_line":"    fkc1 \u003d migrate.ForeignKeyConstraint(columns\u003d[local_usr_table.c.user_id,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9f436f4f_ceff32a9","line":34,"updated":"2017-08-14 19:19:56.000000000","message":"OK, I\u0027m going to pull the \"reduce boilerplate\" handle on this one again, this is all kinds of detailed, brittle stuff that can be 100% automated.   Internally it should be using alembic ops so that we don\u0027t need to go through the whole effort of autoloading the whole table which is completely unnecessary.\n\nthe one feature that isn\u0027t built into SQLAlchemy reflection right now is the ability to locate all the referents for a given column, so the API function will for now still refer to the names of tables we care about.  however, it can do everything else internally quite simply and will look like this:\n\n    from oslo_db.sqlalchemy.util import recreate_fks\n\n    with recreate_fks(\n        migrate_engine, \"user_table\", \n        referents\u003d[\n            \"local_user\", \"nonlocal_user\", \"project\"\n        ]):\n        user_table.c.domain_id.alter(nullable\u003dFalse)\n\nisn\u0027t that a lot nicer / easier to read?","commit_id":"6adbf27e74510f5049a442df6eacd903a7409e78"}],"keystone/common/sql/migrate_repo/versions/067_kilo.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"40fa79f42c684851d05c0ce8016bb60507290086","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_ef2e9041","side":"PARENT","line":1,"updated":"2017-02-09 05:56:33.000000000","message":"Are we allowed to make modifications to this repo now that we have switched to using the rolling upgrade model?","commit_id":"66d3c3493c001528cd4e08c1acd078365feab9bd"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"ea95c3207fbcc88562a4a99d78381e5177649b86","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"# not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"# a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa31d9ce_534e4ec2","side":"PARENT","line":1,"in_reply_to":"1a430d35_ef2e9041","updated":"2017-02-09 22:20:20.000000000","message":"I\u0027ve had to make this change so that the base database schema will work with MySQL Cluster (NDB). It only affects the setting of the mysql_engine setting based on the mysql_storage_engine setting from oslo.db in the keystone.conf file. It shouldn\u0027t change anything for users who are using MySQL (InnoDB).","commit_id":"66d3c3493c001528cd4e08c1acd078365feab9bd"}],"keystone/common/sql/migrate_repo/versions/081_add_endpoint_policy_table.py":[{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"ef9c421f70f65c9489ecb276e973f85bd6e516d5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        sql.Column(\u0027region_id\u0027, sql.String(64),"},{"line_number":52,"context_line":"                   nullable\u003dTrue),"},{"line_number":53,"context_line":"        sql.UniqueConstraint(\u0027endpoint_id\u0027, \u0027service_id\u0027, \u0027region_id\u0027),"},{"line_number":54,"context_line":"        mysql_engine\u003dCONF.database.mysql_storage_engine,"},{"line_number":55,"context_line":"        mysql_charset\u003d\u0027utf8\u0027)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    endpoint_policy_table.create(migrate_engine, checkfirst\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_fd8b1366","line":54,"updated":"2017-02-13 20:07:27.000000000","message":"OK.  So I would propose that passing through \"mysql_storage_engine\" plainly like this is too fine grained.  It implies that someone could stick \"MyISAM\" or \"ARIA\" in there, which is not the case; things will break badly.  In oslo.db, the fact that one wants to use \"ndb\" should be a coarse-grained configuration setting; \"CONF.database.mysql_use_ndb\"; then here, mysql_engine would call upon an oslo_db function called \"get_effective_mysql_engine(conn)\" - it\u0027s passed a Connection or Engine (migrate_engine here is an Engine).  Connection/Engine.info will have the \"use_ndb\" flag inside of it which was set up within oslo.db.engines.create_engine().   This allows the consumption of CONF.database.* to remain local to the Engine object that gets set up without a separate need to track CONF.* settings to it; then oslo.db is called upon to make the determination what it means to be \"ndb\" or \"non ndb\".","commit_id":"0d7b46ad950e93a55a7cd73ce63f945fd3e852fe"}],"keystone/common/sql/upgrades.py":[{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"fcee3da69eb6ccfbfd0714e144104919a7dab3d1","unresolved":false,"context_lines":[{"line_number":346,"context_line":"    _sync_repo(repo_name\u003dCONTRACT_REPO)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"def get_fk_name(inspector, table, fk_column):"},{"line_number":350,"context_line":"    \"\"\"Find the name of foreign key in a table."},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    This will use the inspecter object on a given table and column with"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_0f039a44","line":349,"updated":"2017-07-22 02:27:59.000000000","message":"is this not in oslo.db?   it\u0027s being repeated throughout multiple projects and should be a library function","commit_id":"7e38beca82b68eb13eee4686670e387f6938c78b"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"7822b627ea4c868075b229a32e4e51fae4376b6c","unresolved":false,"context_lines":[{"line_number":346,"context_line":"    _sync_repo(repo_name\u003dCONTRACT_REPO)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"def get_fk_name(inspector, table, fk_column):"},{"line_number":350,"context_line":"    \"\"\"Find the name of foreign key in a table."},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    This will use the inspecter object on a given table and column with"}],"source_content_type":"text/x-python","patch_set":13,"id":"ff346bd7_8de3e005","line":349,"in_reply_to":"ff346bd7_0f039a44","updated":"2017-07-24 23:09:32.000000000","message":"I\u0027m all for moving this to oslo.db and making it accessible globally.","commit_id":"7e38beca82b68eb13eee4686670e387f6938c78b"}],"releasenotes/notes/bug-1662624-1f3e2e6ff50b564c.yaml":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"bb7a703ea3e8222a37ddf2b47aba767b33f6c917","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    MySQL Cluster (NDB) which is stricter on SQL operations against tables."},{"line_number":8,"context_line":"    Additionally, adds the get_fk_name() to upgrades module to assist in"},{"line_number":9,"context_line":"    the process of preserving the foreign key names when doing these drop"},{"line_number":10,"context_line":"    and re-create operations."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"1a1ced50_d95cf527","line":10,"updated":"2017-03-17 18:39:10.000000000","message":"Just to double check - there isn\u0027t anything an operator needs to do to consume these changes is there?","commit_id":"a8d2c7027af4eee83311dd19c71c8d2a24a4fdc8"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"833872e9eb85ce53228021f6cdc896f36150b68f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    MySQL Cluster (NDB) which is stricter on SQL operations against tables."},{"line_number":8,"context_line":"    Additionally, adds the get_fk_name() to upgrades module to assist in"},{"line_number":9,"context_line":"    the process of preserving the foreign key names when doing these drop"},{"line_number":10,"context_line":"    and re-create operations."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"ffe62b97_10a8d774","line":10,"in_reply_to":"1a1ced50_5f91c5ef","updated":"2017-03-27 19:19:21.000000000","message":"I don\u0027t think that\u0027s necessary.","commit_id":"a8d2c7027af4eee83311dd19c71c8d2a24a4fdc8"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"a54037303c7eec253d1139009247c31153a2cc7f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    MySQL Cluster (NDB) which is stricter on SQL operations against tables."},{"line_number":8,"context_line":"    Additionally, adds the get_fk_name() to upgrades module to assist in"},{"line_number":9,"context_line":"    the process of preserving the foreign key names when doing these drop"},{"line_number":10,"context_line":"    and re-create operations."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"1a1ced50_5f91c5ef","line":10,"in_reply_to":"1a1ced50_d95cf527","updated":"2017-03-17 19:56:23.000000000","message":"The changes in these patches don\u0027t require any operator intervention. If an operator wants to use MySQL Cluster (NDB), they only need to to set \"mysql_enable_ndb\u003dTrue\" in the keystone.conf file. I can add that to the release note, if that makes sense.","commit_id":"a8d2c7027af4eee83311dd19c71c8d2a24a4fdc8"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"877f920acf06966c2b16c733c4f15621a41b163f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    MySQL Cluster (NDB) which is stricter on SQL operations against tables."},{"line_number":8,"context_line":"    Additionally, adds the get_fk_name() to upgrades module to assist in"},{"line_number":9,"context_line":"    the process of preserving the foreign key names when doing these drop"},{"line_number":10,"context_line":"    and re-create operations."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"dfeb2761_10b17290","line":10,"in_reply_to":"ffe62b97_10a8d774","updated":"2017-03-30 19:55:21.000000000","message":"If folks agree that we don\u0027t need this release note, I\u0027ll remove it.","commit_id":"a8d2c7027af4eee83311dd19c71c8d2a24a4fdc8"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"3acab22b4de45465216a29d8135aacc44779c5ac","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    MySQL Cluster (NDB) which is stricter on SQL operations against tables."},{"line_number":8,"context_line":"    Additionally, adds the get_fk_name() to upgrades module to assist in"},{"line_number":9,"context_line":"    the process of preserving the foreign key names when doing these drop"},{"line_number":10,"context_line":"    and re-create operations."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"1f1a1f67_68e06697","line":10,"updated":"2017-07-14 16:53:26.000000000","message":"I think this change looks good - but it would be nice to either link to some documentation for deployers to know how to set up and consume this change. \n\nWhat does an operator need to do to make this work on new installations? \n\nWhat does an operator need to do to make this work on upgrades with existing databases?","commit_id":"f1663c1a410cebb1c4cd8732294a5692170f7d23"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f91f8f71936b4cb4647df3c0abd9dc2b261e8afb","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    and re-create operations. Operators should take note that when enabling"},{"line_number":11,"context_line":"    MySQL Cluster (NDB), this is for new installations or migration"},{"line_number":12,"context_line":"    scenarios only. Refer to the oslo.db documentation here"},{"line_number":13,"context_line":"    https://docs.openstack.org/oslo.db/latest/reference/opts.html"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"1f1a1f67_2b51480f","line":13,"updated":"2017-07-14 17:03:23.000000000","message":"nit: could make this a link in rst.","commit_id":"2bb452c251097f0f6af358831434a8e3ab451f54"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4c85f0a6e40da2bb3e417bcfaa4c2e415e5b1399","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    and re-create operations. Operators should take note that when enabling"},{"line_number":11,"context_line":"    MySQL Cluster (NDB), this is for new installations or migration"},{"line_number":12,"context_line":"    scenarios only. Refer to the oslo.db documentation here"},{"line_number":13,"context_line":"    https://docs.openstack.org/oslo.db/latest/reference/opts.html"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"1f1a1f67_ebcfd0ad","line":13,"in_reply_to":"1f1a1f67_2b51480f","updated":"2017-07-14 17:07:01.000000000","message":"Could do something like:\n\n  Please refer to the `oslo.db documentation \u003chttps://docs.openstack.org/oslo.db/latest/reference/opts.html \u003e`_\n  for more information","commit_id":"2bb452c251097f0f6af358831434a8e3ab451f54"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"c62fd5b2be40040087b29490125d9a15006a2991","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    and re-create operations. Operators should take note that when enabling"},{"line_number":11,"context_line":"    MySQL Cluster (NDB), this is for new installations or migration"},{"line_number":12,"context_line":"    scenarios only. Refer to the oslo.db documentation here"},{"line_number":13,"context_line":"    https://docs.openstack.org/oslo.db/latest/reference/opts.html"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"1f1a1f67_0bcd6cb7","line":13,"in_reply_to":"1f1a1f67_2b51480f","updated":"2017-07-14 17:06:57.000000000","message":"Sure, is there another way to put in the release note?","commit_id":"2bb452c251097f0f6af358831434a8e3ab451f54"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2d3f99847d6928777fc779263ac4c2bbdd69d207","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    the process of preserving the foreign key names when doing these drop"},{"line_number":10,"context_line":"    and re-create operations. Operators should take note that when enabling"},{"line_number":11,"context_line":"    MySQL Cluster (NDB), this is for new installations or migration"},{"line_number":12,"context_line":"    scenarios only. For more information, please refer to the "},{"line_number":13,"context_line":"    `oslo.db documentation \u003chttps://docs.openstack.org/oslo.db/latest/reference/opts.html \u003e`_"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"1f1a1f67_2ba5c8b5","line":12,"updated":"2017-07-14 17:14:20.000000000","message":"whitespace","commit_id":"c63c567d5f15e783b053e3e76be2f7f963b7e7b0"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"7f52224114231d73921a9caa2d4e0727fe8117a2","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    the process of preserving the foreign key names when doing these drop"},{"line_number":10,"context_line":"    and re-create operations. Operators should take note that when enabling"},{"line_number":11,"context_line":"    MySQL Cluster (NDB), this is for new installations or migration"},{"line_number":12,"context_line":"    scenarios only. For more information, please refer to the "},{"line_number":13,"context_line":"    `oslo.db documentation \u003chttps://docs.openstack.org/oslo.db/latest/reference/opts.html \u003e`_"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"1f1a1f67_4bb924ca","line":12,"in_reply_to":"1f1a1f67_2ba5c8b5","updated":"2017-07-14 17:17:34.000000000","message":"Fixed, thanks for catching!","commit_id":"c63c567d5f15e783b053e3e76be2f7f963b7e7b0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"461e9b96efac2680a16f04461ce54c4ed3d42831","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    and re-create operations. Operators should take note that when enabling"},{"line_number":11,"context_line":"    MySQL Cluster (NDB), this is for new installations or migration"},{"line_number":12,"context_line":"    scenarios only. For more information, please refer to the"},{"line_number":13,"context_line":"    `oslo.db documentation \u003chttps://docs.openstack.org/oslo.db/latest/reference/opts.html \u003e`_"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"1f1a1f67_e13ed1d8","line":13,"updated":"2017-07-14 18:39:23.000000000","message":"I think there is a rogue space after `html` here that is causing this to fail?","commit_id":"5c73bf0c6cdcd3c671f92363e2eb7bff05176e0e"},{"author":{"_account_id":19283,"name":"Octave Orgeron","email":"octave.orgeron@oracle.com","username":"oorgeron"},"change_message_id":"c3f516d02c79af4f465f1901159b644b6bd9d343","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    and re-create operations. Operators should take note that when enabling"},{"line_number":11,"context_line":"    MySQL Cluster (NDB), this is for new installations or migration"},{"line_number":12,"context_line":"    scenarios only. For more information, please refer to the"},{"line_number":13,"context_line":"    `oslo.db documentation \u003chttps://docs.openstack.org/oslo.db/latest/reference/opts.html \u003e`_"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"1f1a1f67_dc3cd8c9","line":13,"in_reply_to":"1f1a1f67_e13ed1d8","updated":"2017-07-14 18:43:15.000000000","message":"I removed the whitespace. Let\u0027s see if this works, if not, I\u0027ll add the []\u0027s.","commit_id":"5c73bf0c6cdcd3c671f92363e2eb7bff05176e0e"}]}
