)]}'
{"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"414ac019ef187a35b7386d50c6a1345b38f24eb9","unresolved":false,"context_lines":[{"line_number":571,"context_line":"                instance.hostname \u003d self._default_host_name(instance.uuid)"},{"line_number":572,"context_line":"            else:"},{"line_number":573,"context_line":"                instance.hostname \u003d utils.sanitize_hostname(new_name)"},{"line_number":574,"context_line":"        instance.save()"},{"line_number":575,"context_line":"        return instance"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def _check_config_drive(self, config_drive):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_a140eb36","side":"PARENT","line":574,"updated":"2016-04-08 15:15:32.000000000","message":"I was thinking this would create the cells v1 case but it shouldn\u0027t since we now create the instance in the DB after we call this method rather than before.","commit_id":"b69296eb74edab12de161fce50e3a65ea18172f0"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"6eca5e79c4d9da5427d7888cbba953b744ca25b6","unresolved":false,"context_lines":[{"line_number":571,"context_line":"                instance.hostname \u003d self._default_host_name(instance.uuid)"},{"line_number":572,"context_line":"            else:"},{"line_number":573,"context_line":"                instance.hostname \u003d utils.sanitize_hostname(new_name)"},{"line_number":574,"context_line":"        instance.save()"},{"line_number":575,"context_line":"        return instance"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def _check_config_drive(self, config_drive):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_37ced9b4","side":"PARENT","line":574,"in_reply_to":"9a061dce_41b8efe5","updated":"2016-04-08 16:10:10.000000000","message":"Exactly. This just becomes part of the initial instance population rather than an update afterwards.","commit_id":"b69296eb74edab12de161fce50e3a65ea18172f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"022acd7bb688e6b4aa83a7db872d0a08dd950819","unresolved":false,"context_lines":[{"line_number":571,"context_line":"                instance.hostname \u003d self._default_host_name(instance.uuid)"},{"line_number":572,"context_line":"            else:"},{"line_number":573,"context_line":"                instance.hostname \u003d utils.sanitize_hostname(new_name)"},{"line_number":574,"context_line":"        instance.save()"},{"line_number":575,"context_line":"        return instance"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def _check_config_drive(self, config_drive):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_41b8efe5","side":"PARENT","line":574,"in_reply_to":"9a061dce_a140eb36","updated":"2016-04-08 15:17:44.000000000","message":"s/create/break/","commit_id":"b69296eb74edab12de161fce50e3a65ea18172f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"414ac019ef187a35b7386d50c6a1345b38f24eb9","unresolved":false,"context_lines":[{"line_number":972,"context_line":"                        instance_uuid, base_options, req_spec, security_groups,"},{"line_number":973,"context_line":"                        num_instances, i)"},{"line_number":974,"context_line":""},{"line_number":975,"context_line":"                # Create an instance object, but do not store in db yet."},{"line_number":976,"context_line":"                instance \u003d objects.Instance(context\u003dcontext)"},{"line_number":977,"context_line":"                instance.uuid \u003d instance_uuid"},{"line_number":978,"context_line":"                instance.update(base_options)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_e64839cf","line":975,"updated":"2016-04-08 15:15:32.000000000","message":"Why are we doing this between creating the build request and instance mapping? Couldn\u0027t we just do this after the instance mapping is created like we were doing before when we called create_db_entry_for_new_instance?","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"6eca5e79c4d9da5427d7888cbba953b744ca25b6","unresolved":false,"context_lines":[{"line_number":972,"context_line":"                        instance_uuid, base_options, req_spec, security_groups,"},{"line_number":973,"context_line":"                        num_instances, i)"},{"line_number":974,"context_line":""},{"line_number":975,"context_line":"                # Create an instance object, but do not store in db yet."},{"line_number":976,"context_line":"                instance \u003d objects.Instance(context\u003dcontext)"},{"line_number":977,"context_line":"                instance.uuid \u003d instance_uuid"},{"line_number":978,"context_line":"                instance.update(base_options)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_17d2b534","line":975,"in_reply_to":"9a061dce_61dc1347","updated":"2016-04-08 16:10:10.000000000","message":"Right. Since a change in direction on BuildRequest was requested so that it just stores a serialized instance object the instance needs to be populated, but not created, here. The followup patches end up using this.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fa6f0485db18d49f8029aa3665caa369b5dc2bfb","unresolved":false,"context_lines":[{"line_number":972,"context_line":"                        instance_uuid, base_options, req_spec, security_groups,"},{"line_number":973,"context_line":"                        num_instances, i)"},{"line_number":974,"context_line":""},{"line_number":975,"context_line":"                # Create an instance object, but do not store in db yet."},{"line_number":976,"context_line":"                instance \u003d objects.Instance(context\u003dcontext)"},{"line_number":977,"context_line":"                instance.uuid \u003d instance_uuid"},{"line_number":978,"context_line":"                instance.update(base_options)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_61dc1347","line":975,"in_reply_to":"9a061dce_e64839cf","updated":"2016-04-08 15:17:19.000000000","message":"Oh I guess so that the next patch in the series can use the serialized instance for the BuildRequest object:\n\nhttps://review.openstack.org/#/c/298455/8/nova/compute/api.py@944","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"414ac019ef187a35b7386d50c6a1345b38f24eb9","unresolved":false,"context_lines":[{"line_number":980,"context_line":"                        instance, boot_meta, i, security_groups,"},{"line_number":981,"context_line":"                        instance_type, num_instances, shutdown_terminate)"},{"line_number":982,"context_line":""},{"line_number":983,"context_line":"                self._validate_bdm(context, instance, instance_type,"},{"line_number":984,"context_line":"                        block_device_mapping)"},{"line_number":985,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":986,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"},{"line_number":987,"context_line":"                # for it need to instead look for the RequestSpec."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_c651b5da","line":984,"range":{"start_line":983,"start_character":16,"end_line":984,"end_character":45},"updated":"2016-04-08 15:15:32.000000000","message":"At first I was going to say that we\u0027re missing the error handling that this has in the other method, but that case was handling it to destroy the instance that was created, but at this point we haven\u0027t actually created the instance in the database, so we should be OK not handling any specific errors here and just let the generic exception handling below take care of it.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"fa5876236da297903ceca70a305f9895e0d3d0cb","unresolved":false,"context_lines":[{"line_number":980,"context_line":"                        instance, boot_meta, i, security_groups,"},{"line_number":981,"context_line":"                        instance_type, num_instances, shutdown_terminate)"},{"line_number":982,"context_line":""},{"line_number":983,"context_line":"                self._validate_bdm(context, instance, instance_type,"},{"line_number":984,"context_line":"                        block_device_mapping)"},{"line_number":985,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":986,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"},{"line_number":987,"context_line":"                # for it need to instead look for the RequestSpec."}],"source_content_type":"text/x-python","patch_set":2,"id":"7a1b2928_d43798e1","line":984,"range":{"start_line":983,"start_character":16,"end_line":984,"end_character":45},"in_reply_to":"9a061dce_3fc6a616","updated":"2016-04-11 14:57:23.000000000","message":"I would be very interested in that use case :)\n\nI think it\u0027s a fair thing to say that if we can return you an error in your API request you don\u0027t get an instance in the db.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0ee7200748d98533dc1cb8aabd0afa2cca95d03e","unresolved":false,"context_lines":[{"line_number":980,"context_line":"                        instance, boot_meta, i, security_groups,"},{"line_number":981,"context_line":"                        instance_type, num_instances, shutdown_terminate)"},{"line_number":982,"context_line":""},{"line_number":983,"context_line":"                self._validate_bdm(context, instance, instance_type,"},{"line_number":984,"context_line":"                        block_device_mapping)"},{"line_number":985,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":986,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"},{"line_number":987,"context_line":"                # for it need to instead look for the RequestSpec."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_3fc6a616","line":984,"range":{"start_line":983,"start_character":16,"end_line":984,"end_character":45},"in_reply_to":"9a061dce_97d085f9","updated":"2016-04-08 19:20:21.000000000","message":"Me neither...I\u0027ll just blame you if it turns out someone was relying on this in their production cloud. :)","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"6eca5e79c4d9da5427d7888cbba953b744ca25b6","unresolved":false,"context_lines":[{"line_number":980,"context_line":"                        instance, boot_meta, i, security_groups,"},{"line_number":981,"context_line":"                        instance_type, num_instances, shutdown_terminate)"},{"line_number":982,"context_line":""},{"line_number":983,"context_line":"                self._validate_bdm(context, instance, instance_type,"},{"line_number":984,"context_line":"                        block_device_mapping)"},{"line_number":985,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":986,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"},{"line_number":987,"context_line":"                # for it need to instead look for the RequestSpec."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_97d085f9","line":984,"range":{"start_line":983,"start_character":16,"end_line":984,"end_character":45},"in_reply_to":"9a061dce_c651b5da","updated":"2016-04-08 16:10:10.000000000","message":"Right, it should be mostly functionally equivalent. It does mean that this error results in no instance in the db while before it resulted in a deleted instance in the db. Being strict this is a change for users who query deleted instances, however I can\u0027t see any value in a deleted instance that failed this early in the boot process.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"414ac019ef187a35b7386d50c6a1345b38f24eb9","unresolved":false,"context_lines":[{"line_number":999,"context_line":"                # that the instance is scheduled to."},{"line_number":1000,"context_line":"                # NOTE(alaski): Instance and block device creation are going"},{"line_number":1001,"context_line":"                # to move to the conductor."},{"line_number":1002,"context_line":"                instance.create()"},{"line_number":1003,"context_line":"                self._create_block_device_mapping(instance_type, instance.uuid,"},{"line_number":1004,"context_line":"                        block_device_mapping)"},{"line_number":1005,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_86917d55","line":1002,"updated":"2016-04-08 15:15:32.000000000","message":"Hmm, we should probably add the instance to \u0027instances\u0027 here so if _create_block_device_mapping raises an exception we\u0027ll destroy the instance in the error handling below.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"6eca5e79c4d9da5427d7888cbba953b744ca25b6","unresolved":false,"context_lines":[{"line_number":999,"context_line":"                # that the instance is scheduled to."},{"line_number":1000,"context_line":"                # NOTE(alaski): Instance and block device creation are going"},{"line_number":1001,"context_line":"                # to move to the conductor."},{"line_number":1002,"context_line":"                instance.create()"},{"line_number":1003,"context_line":"                self._create_block_device_mapping(instance_type, instance.uuid,"},{"line_number":1004,"context_line":"                        block_device_mapping)"},{"line_number":1005,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_b7ee69b2","line":1002,"in_reply_to":"9a061dce_86917d55","updated":"2016-04-08 16:10:10.000000000","message":"Can do.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"414ac019ef187a35b7386d50c6a1345b38f24eb9","unresolved":false,"context_lines":[{"line_number":1041,"context_line":"        except Exception:"},{"line_number":1042,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1043,"context_line":"                try:"},{"line_number":1044,"context_line":"                    for instance in instances:"},{"line_number":1045,"context_line":"                        try:"},{"line_number":1046,"context_line":"                            instance.destroy()"},{"line_number":1047,"context_line":"                        except exception.ObjectActionError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_c6a9b57d","line":1044,"updated":"2016-04-08 15:15:32.000000000","message":"I just noticed this now, but if we failed somewhere, should be destroying the request spec or build request objects from the DB? It would be a separate change if so.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"b1314909fa47e19ff89184662e1a8624fd331be0","unresolved":false,"context_lines":[{"line_number":1041,"context_line":"        except Exception:"},{"line_number":1042,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1043,"context_line":"                try:"},{"line_number":1044,"context_line":"                    for instance in instances:"},{"line_number":1045,"context_line":"                        try:"},{"line_number":1046,"context_line":"                            instance.destroy()"},{"line_number":1047,"context_line":"                        except exception.ObjectActionError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a1b2928_b4e81c7e","line":1044,"in_reply_to":"9a061dce_817327e7","updated":"2016-04-11 15:18:48.000000000","message":"This warrants some investigation, but it does look like a bug here.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d4d6023a57f1b1b43fd517d6fcf4a49403e2eef7","unresolved":false,"context_lines":[{"line_number":1041,"context_line":"        except Exception:"},{"line_number":1042,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1043,"context_line":"                try:"},{"line_number":1044,"context_line":"                    for instance in instances:"},{"line_number":1045,"context_line":"                        try:"},{"line_number":1046,"context_line":"                            instance.destroy()"},{"line_number":1047,"context_line":"                        except exception.ObjectActionError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_817327e7","line":1044,"in_reply_to":"9a061dce_c6a9b57d","updated":"2016-04-08 15:29:30.000000000","message":"Hmm, along that same line, I just realized that if we created the instance and then created the BlockDeviceMapping for that instance, if we fail after that and start deleting instances, that\u0027s going to fail because of the foreign key constraint on the BDM table for the instance, so we\u0027d have to actually delete the BDMs first and then the instance, right? Like if we went over quota on adding server group members after creating the instance and BDMs, then we\u0027d get here and try to delete the instance which I think would fail because of the constraint from the BDMs table, but because of the exception context we\u0027re in, it\u0027s dropped silently, like a fart in the wind....","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"b1314909fa47e19ff89184662e1a8624fd331be0","unresolved":false,"context_lines":[{"line_number":1041,"context_line":"        except Exception:"},{"line_number":1042,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1043,"context_line":"                try:"},{"line_number":1044,"context_line":"                    for instance in instances:"},{"line_number":1045,"context_line":"                        try:"},{"line_number":1046,"context_line":"                            instance.destroy()"},{"line_number":1047,"context_line":"                        except exception.ObjectActionError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a1b2928_34f36ca0","line":1044,"in_reply_to":"9a061dce_c6a9b57d","updated":"2016-04-11 15:18:48.000000000","message":"Yeah, we should be cleaning those up.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"414ac019ef187a35b7386d50c6a1345b38f24eb9","unresolved":false,"context_lines":[{"line_number":1441,"context_line":"        self._populate_instance_names(instance, num_instances)"},{"line_number":1442,"context_line":"        instance.shutdown_terminate \u003d shutdown_terminate"},{"line_number":1443,"context_line":"        if num_instances \u003e 1:"},{"line_number":1444,"context_line":"            instance \u003d self._apply_instance_name_template(context, instance,"},{"line_number":1445,"context_line":"                                                          index)"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_2b495a8f","line":1444,"updated":"2016-04-08 15:15:32.000000000","message":"You dropped the comment from russellb in here, is that intentional?","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"6eca5e79c4d9da5427d7888cbba953b744ca25b6","unresolved":false,"context_lines":[{"line_number":1441,"context_line":"        self._populate_instance_names(instance, num_instances)"},{"line_number":1442,"context_line":"        instance.shutdown_terminate \u003d shutdown_terminate"},{"line_number":1443,"context_line":"        if num_instances \u003e 1:"},{"line_number":1444,"context_line":"            instance \u003d self._apply_instance_name_template(context, instance,"},{"line_number":1445,"context_line":"                                                          index)"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_17ed958e","line":1444,"in_reply_to":"9a061dce_2b495a8f","updated":"2016-04-08 16:10:10.000000000","message":"Yes. The instance UUID is available much earlier now due to a previous change so that comment no longer applies.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"414ac019ef187a35b7386d50c6a1345b38f24eb9","unresolved":false,"context_lines":[{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"        return instance"},{"line_number":1448,"context_line":""},{"line_number":1449,"context_line":"    # This method remains because cellsv1 uses it in the scheduler"},{"line_number":1450,"context_line":"    def create_db_entry_for_new_instance(self, context, instance_type, image,"},{"line_number":1451,"context_line":"            instance, security_group, block_device_mapping, num_instances,"},{"line_number":1452,"context_line":"            index, shutdown_terminate\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_cb4a5eac","line":1449,"updated":"2016-04-08 15:15:32.000000000","message":"Wouldn\u0027t it be better to just move this into the cells v1 API code rather than rely in inheriting it from the base compute API class which is not using it.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"414ac019ef187a35b7386d50c6a1345b38f24eb9","unresolved":false,"context_lines":[{"line_number":1447,"context_line":"        return instance"},{"line_number":1448,"context_line":""},{"line_number":1449,"context_line":"    # This method remains because cellsv1 uses it in the scheduler"},{"line_number":1450,"context_line":"    def create_db_entry_for_new_instance(self, context, instance_type, image,"},{"line_number":1451,"context_line":"            instance, security_group, block_device_mapping, num_instances,"},{"line_number":1452,"context_line":"            index, shutdown_terminate\u003dFalse):"},{"line_number":1453,"context_line":"        \"\"\"Create an entry in the DB for this new instance,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_86acdd36","line":1450,"updated":"2016-04-08 15:15:32.000000000","message":"What this method is doing is still in _provision_instances, and the same order, couldn\u0027t we just continue to use this method but pass a kwarg to tell it whether or not to actually create the instance in the DB? I realize that would be slightly confusing given the name of the method, but then we could avoid some duplication.","commit_id":"a67b0f5bc37dcfb0a3852ae818bf09e87de54611"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"cb464e0370637725370254fb870ac66ecc909334","unresolved":false,"context_lines":[{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"        instance.shutdown_terminate \u003d shutdown_terminate"},{"line_number":1456,"context_line":""},{"line_number":1457,"context_line":"        self.security_group_api.ensure_default(context)"},{"line_number":1458,"context_line":"        instance.create()"},{"line_number":1459,"context_line":""},{"line_number":1460,"context_line":"        if num_instances \u003e 1:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a18252c_75aa281b","side":"PARENT","line":1457,"updated":"2016-04-11 21:18:58.000000000","message":"Dan, this is where that method is called previously. But this is called within the \"for i in range...\" loop on line 966 and it only needs to be called once because it\u0027s not at all related to the instance, just the context which does not change in the loop.","commit_id":"52b9b1408af970514039f977c2133e66d845e50f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"25ff425f08be990efcf61c1debedf2aa0597fc50","unresolved":false,"context_lines":[{"line_number":1454,"context_line":""},{"line_number":1455,"context_line":"        instance.shutdown_terminate \u003d shutdown_terminate"},{"line_number":1456,"context_line":""},{"line_number":1457,"context_line":"        self.security_group_api.ensure_default(context)"},{"line_number":1458,"context_line":"        instance.create()"},{"line_number":1459,"context_line":""},{"line_number":1460,"context_line":"        if num_instances \u003e 1:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a18252c_78f21d9c","side":"PARENT","line":1457,"in_reply_to":"5a18252c_75aa281b","updated":"2016-04-11 21:43:47.000000000","message":"Huh, okay, thanks. My find-in-page failed me here I guess.","commit_id":"52b9b1408af970514039f977c2133e66d845e50f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9bcb767a2d16faab82275a577743a5072121bbc5","unresolved":false,"context_lines":[{"line_number":959,"context_line":"                context, instance_type, min_count, max_count)"},{"line_number":960,"context_line":"        security_groups \u003d self.security_group_api.populate_security_groups("},{"line_number":961,"context_line":"                security_groups)"},{"line_number":962,"context_line":"        self.security_group_api.ensure_default(context)"},{"line_number":963,"context_line":"        LOG.debug(\"Going to run %s instances...\", num_instances)"},{"line_number":964,"context_line":"        instances \u003d []"},{"line_number":965,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a18252c_d5d5fcb9","line":962,"updated":"2016-04-11 21:14:37.000000000","message":"I don\u0027t see where this is being done on the old side. This is more than cleanup, yes?","commit_id":"32559d3edd30ac785518a931b4787215f33c6b3e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9bcb767a2d16faab82275a577743a5072121bbc5","unresolved":false,"context_lines":[{"line_number":1486,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1487,"context_line":"                if create_instance:"},{"line_number":1488,"context_line":"                    instance.destroy()"},{"line_number":1489,"context_line":"                else:"},{"line_number":1490,"context_line":"                    pass"},{"line_number":1491,"context_line":""},{"line_number":1492,"context_line":"        if create_instance:"},{"line_number":1493,"context_line":"            # Because of the foreign key the bdm can\u0027t be created unless the"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a18252c_9564244a","line":1490,"range":{"start_line":1489,"start_character":0,"end_line":1490,"end_character":24},"updated":"2016-04-11 21:14:37.000000000","message":"I this part really necessary?","commit_id":"32559d3edd30ac785518a931b4787215f33c6b3e"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"cb464e0370637725370254fb870ac66ecc909334","unresolved":false,"context_lines":[{"line_number":1486,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1487,"context_line":"                if create_instance:"},{"line_number":1488,"context_line":"                    instance.destroy()"},{"line_number":1489,"context_line":"                else:"},{"line_number":1490,"context_line":"                    pass"},{"line_number":1491,"context_line":""},{"line_number":1492,"context_line":"        if create_instance:"},{"line_number":1493,"context_line":"            # Because of the foreign key the bdm can\u0027t be created unless the"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a18252c_b5304009","line":1490,"range":{"start_line":1489,"start_character":0,"end_line":1490,"end_character":24},"in_reply_to":"5a18252c_9564244a","updated":"2016-04-11 21:18:58.000000000","message":"Heh, I don\u0027t think so.","commit_id":"32559d3edd30ac785518a931b4787215f33c6b3e"}],"nova/tests/unit/api/openstack/compute/test_block_device_mapping.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"414ac019ef187a35b7386d50c6a1345b38f24eb9","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        self.assertRaises(exc.HTTPBadRequest, self._test_create, params,"},{"line_number":301,"context_line":"                          no_image\u003dTrue)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def test_create_instance_bdm_api_validation_fails(self):"},{"line_number":304,"context_line":"        self.validation_fail_test_validate_called \u003d False"},{"line_number":305,"context_line":"        self.validation_fail_instance_destroy_called \u003d False"},{"line_number":306,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_81d96786","side":"PARENT","line":303,"updated":"2016-04-08 15:15:32.000000000","message":"This is still used in the cells v1 case so it seems wrong to remove it, but it would need to be adjusted to just calling the create_db_entry_for_new_instance method.","commit_id":"b69296eb74edab12de161fce50e3a65ea18172f0"}]}
