)]}'
{"nova/objects/instance_group.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"51549d3a8155dfd8c855c6f8dda14c62dc088c33","unresolved":false,"context_lines":[{"line_number":528,"context_line":"            # NOTE(melwitt): This might happen if there\u0027s a failure right after"},{"line_number":529,"context_line":"            # the InstanceGroup was created and the migration is re-run."},{"line_number":530,"context_line":"            pass"},{"line_number":531,"context_line":"        db_api.instance_group_delete(context, db_group.uuid)"},{"line_number":532,"context_line":"        done +\u003d 1"},{"line_number":533,"context_line":"    return len(main_groups), done"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_32ab7b1f","line":531,"updated":"2016-08-09 08:27:13.000000000","message":"Do you think it is possible some old code can update instance_group in nova DB after instance creation in API db?","commit_id":"652202f75831ec932b69ca5352a22ccff526d36f"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1e323b5334eeecc3d61010517f0e7db56e4e062f","unresolved":false,"context_lines":[{"line_number":528,"context_line":"            # NOTE(melwitt): This might happen if there\u0027s a failure right after"},{"line_number":529,"context_line":"            # the InstanceGroup was created and the migration is re-run."},{"line_number":530,"context_line":"            pass"},{"line_number":531,"context_line":"        db_api.instance_group_delete(context, db_group.uuid)"},{"line_number":532,"context_line":"        done +\u003d 1"},{"line_number":533,"context_line":"    return len(main_groups), done"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_5ca5f844","line":531,"in_reply_to":"9ad45d7e_32ab7b1f","updated":"2016-08-10 22:42:03.000000000","message":"It depends on when the nova-manage command is run. If it\u0027s run after the upgrade is completed i.e. after all of the cluster is on the new code, then it shouldn\u0027t be possible for instance groups to be created in the nova/main db.\n\nBut if it\u0027s run in the middle of an upgrade, then there could be requests that come in and create instance groups in the main db after the nova-manage command was run. In that case, the operator would need to run the nova-manage command again at the end to move the stragglers.\n\nIIUC, in the future when we\u0027ll be looking at removing the code in this file that accesses the main db, we\u0027ll do something that would block an upgrade if instance groups are found in the main db, until the nova-manage migration command is run, to ensure that no instance group records exist in the main db anymore, before we remove the code that can access them.","commit_id":"652202f75831ec932b69ca5352a22ccff526d36f"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"9ea5efc1ae3fc66e12885776b3ff7f5bc72745df","unresolved":false,"context_lines":[{"line_number":528,"context_line":"            # NOTE(melwitt): This might happen if there\u0027s a failure right after"},{"line_number":529,"context_line":"            # the InstanceGroup was created and the migration is re-run."},{"line_number":530,"context_line":"            pass"},{"line_number":531,"context_line":"        db_api.instance_group_delete(context, db_group.uuid)"},{"line_number":532,"context_line":"        done +\u003d 1"},{"line_number":533,"context_line":"    return len(main_groups), done"}],"source_content_type":"text/x-python","patch_set":8,"id":"9ad45d7e_b48b6067","line":531,"in_reply_to":"9ad45d7e_5ca5f844","updated":"2016-08-11 06:40:42.000000000","message":"Yes, thanks. Theoretically with the case \"nova-manage in the middle of\nupgrade\" we can lose some data from nova db because of skipping\nalready migrated InstanceGroup.  It can be something:\n   created, group \u003d get_or_create()\n   if not created:\n       group.update(...)\nBut maybe it\u0027s overhead.","commit_id":"652202f75831ec932b69ca5352a22ccff526d36f"}],"nova/tests/functional/db/test_instance_group.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e48d0aa4ca48e03affc2b776b3f63e00563d77f4","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        key_func \u003d lambda model: model.uuid"},{"line_number":220,"context_line":"        api_models \u003d sorted(api_models, key\u003dkey_func)"},{"line_number":221,"context_line":"        orig_main_models \u003d sorted(orig_main_models, key\u003dkey_func)"},{"line_number":222,"context_line":"        ignore_fields \u003d (\u0027id\u0027, \u0027hosts\u0027, \u0027deleted\u0027, \u0027deleted_at\u0027, \u0027created_at\u0027,"},{"line_number":223,"context_line":"                         \u0027updated_at\u0027)"},{"line_number":224,"context_line":"        for i in range(len(api_models)):"},{"line_number":225,"context_line":"            for field in instance_group.InstanceGroup.fields:"},{"line_number":226,"context_line":"                if field not in ignore_fields:"},{"line_number":227,"context_line":"                    self.assertEqual(orig_main_models[i][field],"},{"line_number":228,"context_line":"                                     api_models[i][field])"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def test_migrate_instance_groups_skips_existing(self):"},{"line_number":231,"context_line":"        self._api_group(uuid\u003duuids.group)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_1d745afb","line":228,"range":{"start_line":222,"start_character":8,"end_line":228,"end_character":58},"updated":"2016-08-22 14:42:01.000000000","message":"Bah, I think I forgot to change this to:\n\n ovo_fixture.compare_obj(self, api_models, orig_main_models)","commit_id":"d35e1577c9510827b2a4802a294714340ccdee7c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"7155fcfe97f6cd17b0a0ee931c95f88cdcabfd66","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        key_func \u003d lambda model: model.uuid"},{"line_number":220,"context_line":"        api_models \u003d sorted(api_models, key\u003dkey_func)"},{"line_number":221,"context_line":"        orig_main_models \u003d sorted(orig_main_models, key\u003dkey_func)"},{"line_number":222,"context_line":"        ignore_fields \u003d (\u0027id\u0027, \u0027hosts\u0027, \u0027deleted\u0027, \u0027deleted_at\u0027, \u0027created_at\u0027,"},{"line_number":223,"context_line":"                         \u0027updated_at\u0027)"},{"line_number":224,"context_line":"        for i in range(len(api_models)):"},{"line_number":225,"context_line":"            for field in instance_group.InstanceGroup.fields:"},{"line_number":226,"context_line":"                if field not in ignore_fields:"},{"line_number":227,"context_line":"                    self.assertEqual(orig_main_models[i][field],"},{"line_number":228,"context_line":"                                     api_models[i][field])"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def test_migrate_instance_groups_skips_existing(self):"},{"line_number":231,"context_line":"        self._api_group(uuid\u003duuids.group)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_9695ba88","line":228,"range":{"start_line":222,"start_character":8,"end_line":228,"end_character":58},"in_reply_to":"1ac06dbe_1d745afb","updated":"2016-08-22 18:00:03.000000000","message":"Nevermind -- upon trying to do this I find this is 1) comparing sqlalchemy objects 2) the id etc will be different as the data was migrated, so there isn\u0027t a much better way to do this (other than ignore_fields should be a set).","commit_id":"d35e1577c9510827b2a4802a294714340ccdee7c"}],"releasenotes/notes/bp-cells-instance-groups-api-db-910a44ef5f2f7769.yaml":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"3c0a043c7bc4bd7ae47bb8b80bfbb44cef0f3acf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - Instance groups have been moved to the API database,"},{"line_number":4,"context_line":"    using an online data migration."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"bacf61ea_a9aa4817","line":3,"range":{"start_line":3,"start_character":20,"end_line":3,"end_character":29},"updated":"2016-08-03 19:27:15.000000000","message":"I\u0027m not sure what the correct tense is here. \"will be\" makes more sense to me here but someone smarter should confirm which way is more appropriate.","commit_id":"aef22a9c4c5a518b3a24a59993f68d3c758a0d50"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"146f0ddc888b387aeddf2c35f109a3b0fdd1f208","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - Instance groups have been moved to the API database,"},{"line_number":4,"context_line":"    using an online data migration."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"bacf61ea_5d96e294","line":3,"range":{"start_line":3,"start_character":20,"end_line":3,"end_character":29},"in_reply_to":"bacf61ea_89530439","updated":"2016-08-03 20:51:51.000000000","message":"Thanks for providing alternate text. :) Will update.","commit_id":"aef22a9c4c5a518b3a24a59993f68d3c758a0d50"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"831ea3227f76674414cac1c245aa04903034e201","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - Instance groups have been moved to the API database,"},{"line_number":4,"context_line":"    using an online data migration."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"bacf61ea_89530439","line":3,"range":{"start_line":3,"start_character":20,"end_line":3,"end_character":29},"in_reply_to":"bacf61ea_a9aa4817","updated":"2016-08-03 19:31:15.000000000","message":"\"have been\" doesn\u0027t sound right for a manual task that requires running a command to run the migration. I\u0027d probably say something more along the lines of \"The nova-manage db online_data_migrations command will now migrate server groups to the API database. New server groups will be automatically created in the API database but existing server groups must be manually migrated using that command.\"","commit_id":"aef22a9c4c5a518b3a24a59993f68d3c758a0d50"}]}
