)]}'
{"nova/cells/scheduler.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ed76946ba44a9f4ceacfce4f3a07c02282323397","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                    security_groups,"},{"line_number":108,"context_line":"                    block_device_mapping,"},{"line_number":109,"context_line":"                    num_instances, i)"},{"line_number":110,"context_line":"            block_device_mapping \u003d ("},{"line_number":111,"context_line":"                self.compute_api._bdm_validate_set_size_and_instance("},{"line_number":112,"context_line":"                    ctxt, instance, instance_type, block_device_mapping))"},{"line_number":113,"context_line":"            self.compute_api._create_block_device_mapping(block_device_mapping)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"            instances.append(instance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_bac5ad0b","line":112,"range":{"start_line":110,"start_character":12,"end_line":112,"end_character":73},"updated":"2016-07-07 23:08:11.000000000","message":"Why don\u0027t we do this before calling create_db_entry_for_new_instance ? Because _validate_bdm will add some overhead for getting images and volumes from glance/cinder for validation, which exposes a race window between the time that we create the instance, validate the bdm and then create the bdm. Before this change, we validated the bdms first, then created the instance and bdms.\n\nI think we\u0027re seeing that race here:\n\nhttp://logs.openstack.org/94/334094/7/gate/gate-tempest-dsvm-cells/9d1b349/logs/screen-n-cpu.txt.gz#_2016-07-06_09_40_29_672\n\nThat\u0027s in a cells v1 job run for this patch.","commit_id":"dc6a3f4abba9fd6cb52d11e31de641de57d1bfaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"927bf57f8fde98323963777c3a7342d838ad6c3c","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                    security_groups,"},{"line_number":108,"context_line":"                    block_device_mapping,"},{"line_number":109,"context_line":"                    num_instances, i)"},{"line_number":110,"context_line":"            block_device_mapping \u003d ("},{"line_number":111,"context_line":"                self.compute_api._bdm_validate_set_size_and_instance("},{"line_number":112,"context_line":"                    ctxt, instance, instance_type, block_device_mapping))"},{"line_number":113,"context_line":"            self.compute_api._create_block_device_mapping(block_device_mapping)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"            instances.append(instance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_daa2394b","line":112,"range":{"start_line":110,"start_character":12,"end_line":112,"end_character":73},"in_reply_to":"1aa78d24_bac5ad0b","updated":"2016-07-07 23:11:08.000000000","message":"The more I think about this though, the KeyError is on the compute, and it\u0027s from a libvirt guest uuid, and at this point we\u0027re just creating stuff in the DB, we haven\u0027t even hit the scheduler or started spawning an instance on the compute yet.","commit_id":"dc6a3f4abba9fd6cb52d11e31de641de57d1bfaa"}],"nova/compute/api.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7d40f93a6ce9c12834a7533a40b4936ca01ceaf7","unresolved":false,"context_lines":[{"line_number":1233,"context_line":"        # multiple times when more than one instance is booted in a single"},{"line_number":1234,"context_line":"        # request. This avoids \u0027id\u0027 being set and triggering the object dupe"},{"line_number":1235,"context_line":"        # detection"},{"line_number":1236,"context_line":"        db_block_device_mapping \u003d copy.deepcopy(block_device_mapping)"},{"line_number":1237,"context_line":"        # Create the BlockDeviceMapping objects in the db."},{"line_number":1238,"context_line":"        for bdm in db_block_device_mapping:"},{"line_number":1239,"context_line":"            # TODO(alaski): Why is this done?"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_999d15be","line":1236,"updated":"2016-06-28 15:55:45.000000000","message":"I know there is a bad example above, but you should use block_device_mapping.obj_clone() here I think.","commit_id":"ba57a1735ea1e4325cf08ba85c1b9d7a102b7f44"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"89eff5b9977a71acfbbc52bcf1ab199c134fcd14","unresolved":false,"context_lines":[{"line_number":1233,"context_line":"        # multiple times when more than one instance is booted in a single"},{"line_number":1234,"context_line":"        # request. This avoids \u0027id\u0027 being set and triggering the object dupe"},{"line_number":1235,"context_line":"        # detection"},{"line_number":1236,"context_line":"        db_block_device_mapping \u003d copy.deepcopy(block_device_mapping)"},{"line_number":1237,"context_line":"        # Create the BlockDeviceMapping objects in the db."},{"line_number":1238,"context_line":"        for bdm in db_block_device_mapping:"},{"line_number":1239,"context_line":"            # TODO(alaski): Why is this done?"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_9c4fc369","line":1236,"in_reply_to":"3aaa91ec_999d15be","updated":"2016-06-28 17:30:13.000000000","message":"Yep. I\u0027ll change if I respin or add a followup.","commit_id":"ba57a1735ea1e4325cf08ba85c1b9d7a102b7f44"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"63079415ebdd997026e1828b577401b3554c1dda","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"        instance_block_device_mapping \u003d block_device_mapping.obj_clone()"},{"line_number":1226,"context_line":"        for bdm in instance_block_device_mapping:"},{"line_number":1227,"context_line":"            bdm.volume_size \u003d self._volume_size(instance_type, bdm)"},{"line_number":1228,"context_line":"            bdm.instance_uuid \u003d instance.uuid"},{"line_number":1229,"context_line":"        return instance_block_device_mapping"},{"line_number":1230,"context_line":""},{"line_number":1231,"context_line":"    def _create_block_device_mapping(self, block_device_mapping):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_5a5129d8","line":1228,"updated":"2016-07-07 22:58:01.000000000","message":"Before this change, BDMs with volume_size \u003d\u003d 0 wouldn\u0027t have the instance_uuid set, but they wouldn\u0027t get created here either from what I can tell.","commit_id":"dc6a3f4abba9fd6cb52d11e31de641de57d1bfaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"63079415ebdd997026e1828b577401b3554c1dda","unresolved":false,"context_lines":[{"line_number":1414,"context_line":""},{"line_number":1415,"context_line":"    # This method remains because cellsv1 uses it in the scheduler"},{"line_number":1416,"context_line":"    def create_db_entry_for_new_instance(self, context, instance_type, image,"},{"line_number":1417,"context_line":"            instance, security_group, block_device_mapping, num_instances,"},{"line_number":1418,"context_line":"            index, shutdown_terminate\u003dFalse, create_instance\u003dTrue):"},{"line_number":1419,"context_line":"        \"\"\"Create an entry in the DB for this new instance,"},{"line_number":1420,"context_line":"        including any related table updates (such as security group,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_da5a392a","line":1417,"range":{"start_line":1417,"start_character":38,"end_line":1417,"end_character":58},"updated":"2016-07-07 22:58:01.000000000","message":"This is no longer used here.","commit_id":"dc6a3f4abba9fd6cb52d11e31de641de57d1bfaa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5b23cac43a578c568c897bd27921ae0630fe4763","unresolved":false,"context_lines":[{"line_number":1414,"context_line":""},{"line_number":1415,"context_line":"    # This method remains because cellsv1 uses it in the scheduler"},{"line_number":1416,"context_line":"    def create_db_entry_for_new_instance(self, context, instance_type, image,"},{"line_number":1417,"context_line":"            instance, security_group, block_device_mapping, num_instances,"},{"line_number":1418,"context_line":"            index, shutdown_terminate\u003dFalse, create_instance\u003dTrue):"},{"line_number":1419,"context_line":"        \"\"\"Create an entry in the DB for this new instance,"},{"line_number":1420,"context_line":"        including any related table updates (such as security group,"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_1a3b213a","line":1417,"range":{"start_line":1417,"start_character":38,"end_line":1417,"end_character":58},"in_reply_to":"1aa78d24_da5a392a","updated":"2016-07-07 23:04:03.000000000","message":"Ah but cells v1, damn it cells v1.","commit_id":"dc6a3f4abba9fd6cb52d11e31de641de57d1bfaa"}]}
