)]}'
{"nova/compute/api.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"5d7b19697010c8fb6d2f297de6c827eda7945fc5","unresolved":false,"context_lines":[{"line_number":1176,"context_line":"            block_device_mapping\u003dblock_device_mapping,"},{"line_number":1177,"context_line":"            legacy_bdm\u003dFalse)"},{"line_number":1178,"context_line":""},{"line_number":1179,"context_line":"        build_requests \u003d []"},{"line_number":1180,"context_line":"        request_spec \u003d objects.RequestSpec()"},{"line_number":1181,"context_line":"        self.compute_task_api.schedule_and_build_instances("},{"line_number":1182,"context_line":"            context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a8bc5a2_c64d389b","line":1179,"updated":"2016-09-27 18:51:57.000000000","message":"This line and below shouldn\u0027t be here yet. I see that you\u0027ve made schedule_and_build_instances a nop for now but instead you should do this the opposite way. Add schedule_and_build_instances in one patch, add the new RPC methods in the next patch, then a patch that switches to calling this code rather than line 1167-1177 above.","commit_id":"0fe9b5ed8b16ac8ae21d348272b5255cf48d8a81"}],"nova/conductor/api.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"99f9be9d07af464ff13fab4e7a1a157b09012897","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                legacy_bdm\u003dlegacy_bdm)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def schedule_and_build_instances(self, context, build_requests,"},{"line_number":127,"context_line":"                                     request_spec, filter_properties, image,"},{"line_number":128,"context_line":"                                     admin_password, injected_files,"},{"line_number":129,"context_line":"                                     requested_networks, block_device_mapping):"},{"line_number":130,"context_line":"        self.conductor_compute_rpcapi.schedule_and_build_instances("}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_b38f8874","line":127,"range":{"start_line":127,"start_character":38,"end_line":127,"end_character":68},"updated":"2016-11-04 14:59:44.000000000","message":"given the RequestSpec object provides the fields related to the filter_props and request_spec legacy dicts, I\u0027d prefer to only use a parameter either called spec_obj or request_spec and not adding filter_properties","commit_id":"7ab11da0d8aced23cb83a605c29760461072083d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3442e752749c35a3d44fb737b52cba28a9ced09c","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        self.conductor_compute_rpcapi.schedule_and_build_instances("},{"line_number":131,"context_line":"            context, build_requests, request_spec, filter_properties, image,"},{"line_number":132,"context_line":"            admin_password, injected_files, requested_networks,"},{"line_number":133,"context_line":"            block_device_mapping)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def unshelve_instance(self, context, instance, request_spec\u003dNone):"},{"line_number":136,"context_line":"        self.conductor_compute_rpcapi.unshelve_instance(context,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a629dbe_dd5fa973","line":133,"updated":"2016-11-07 15:39:11.000000000","message":"Right here we lose the security groups that the boot request included.","commit_id":"7ab11da0d8aced23cb83a605c29760461072083d"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"1850249c7eafb74917b8a8c29c53ff60612bf44b","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        self.conductor_compute_rpcapi.schedule_and_build_instances("},{"line_number":131,"context_line":"            context, build_requests, request_spec, filter_properties, image,"},{"line_number":132,"context_line":"            admin_password, injected_files, requested_networks,"},{"line_number":133,"context_line":"            block_device_mapping)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def unshelve_instance(self, context, instance, request_spec\u003dNone):"},{"line_number":136,"context_line":"        self.conductor_compute_rpcapi.unshelve_instance(context,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a629dbe_4d19cf87","line":133,"in_reply_to":"9a629dbe_dd5fa973","updated":"2016-11-09 10:21:04.000000000","message":"IIUC Andrew\u0027s idea he used security groups from build_request.instance.","commit_id":"7ab11da0d8aced23cb83a605c29760461072083d"}],"nova/conductor/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7cdd36694fdef093462b896e3308ec5227c2dfcd","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        # scheduler.utils methods to directly use the RequestSpec object"},{"line_number":577,"context_line":"        if not isinstance(request_spec, objects.RequestSpec):"},{"line_number":578,"context_line":"            spec_obj \u003d objects.RequestSpec.from_primitives("},{"line_number":579,"context_line":"                context, request_spec, filter_properties)"},{"line_number":580,"context_line":"        else:"},{"line_number":581,"context_line":"            spec_obj \u003d request_spec"},{"line_number":582,"context_line":"        hosts \u003d self.scheduler_client.select_destinations(context, spec_obj)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_afd08a20","line":579,"updated":"2016-11-01 14:50:25.000000000","message":"We should ask Sylvain if this is still necessary.","commit_id":"b592de2b6a9a0bd443a31ace12bb471e61567201"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"1c6eb6e20e10ed45f3532828f1500e89c4d48f1e","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        # scheduler.utils methods to directly use the RequestSpec object"},{"line_number":577,"context_line":"        if not isinstance(request_spec, objects.RequestSpec):"},{"line_number":578,"context_line":"            spec_obj \u003d objects.RequestSpec.from_primitives("},{"line_number":579,"context_line":"                context, request_spec, filter_properties)"},{"line_number":580,"context_line":"        else:"},{"line_number":581,"context_line":"            spec_obj \u003d request_spec"},{"line_number":582,"context_line":"        hosts \u003d self.scheduler_client.select_destinations(context, spec_obj)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a629dbe_6ebdae67","line":579,"in_reply_to":"ba5da102_afd08a20","updated":"2016-11-09 10:19:49.000000000","message":"It would be great to clean up this.","commit_id":"b592de2b6a9a0bd443a31ace12bb471e61567201"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"07d344f2c1eb08e145b93f2e441de2f769e2c863","unresolved":false,"context_lines":[{"line_number":874,"context_line":"                # processed, and the build should halt here. Clean up the"},{"line_number":875,"context_line":"                # bdm and instance record."},{"line_number":876,"context_line":"                try:"},{"line_number":877,"context_line":"                    with try_target_cell(context, cell):"},{"line_number":878,"context_line":"                        instance.destroy()"},{"line_number":879,"context_line":"                except exception.InstanceNotFound:"},{"line_number":880,"context_line":"                    pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_9c4af724","line":877,"updated":"2016-11-02 14:51:53.000000000","message":"We don\u0027t do anything with the cell context yielded from the context manager, so I don\u0027t think this has any real effect.","commit_id":"b592de2b6a9a0bd443a31ace12bb471e61567201"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7cdd36694fdef093462b896e3308ec5227c2dfcd","unresolved":false,"context_lines":[{"line_number":878,"context_line":"                        instance.destroy()"},{"line_number":879,"context_line":"                except exception.InstanceNotFound:"},{"line_number":880,"context_line":"                    pass"},{"line_number":881,"context_line":"                for bdm in instance_bdms:"},{"line_number":882,"context_line":"                    try:"},{"line_number":883,"context_line":"                        bdm.destroy()"},{"line_number":884,"context_line":"                    except exception.ObjectActionError:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_efa8c222","line":881,"updated":"2016-11-01 14:50:25.000000000","message":"Why is this not inside the \"with try_target_cell\" block? The BDMs are inside the cell, yes?","commit_id":"b592de2b6a9a0bd443a31ace12bb471e61567201"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"1c6eb6e20e10ed45f3532828f1500e89c4d48f1e","unresolved":false,"context_lines":[{"line_number":878,"context_line":"                        instance.destroy()"},{"line_number":879,"context_line":"                except exception.InstanceNotFound:"},{"line_number":880,"context_line":"                    pass"},{"line_number":881,"context_line":"                for bdm in instance_bdms:"},{"line_number":882,"context_line":"                    try:"},{"line_number":883,"context_line":"                        bdm.destroy()"},{"line_number":884,"context_line":"                    except exception.ObjectActionError:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a629dbe_aea0a644","line":881,"in_reply_to":"ba5da102_efa8c222","updated":"2016-11-09 10:19:49.000000000","message":"Yes, I think this is a mistake.","commit_id":"b592de2b6a9a0bd443a31ace12bb471e61567201"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6918bbc20b5dc879db2360270b9857003d16e97f","unresolved":false,"context_lines":[{"line_number":813,"context_line":"                instance \u003d build_request.get_new_instance(context)"},{"line_number":814,"context_line":"                updates \u003d {\u0027vm_state\u0027: vm_states.ERROR, \u0027task_state\u0027: None}"},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"                with try_target_cell(context, cell0):"},{"line_number":817,"context_line":"                    instance.create()"},{"line_number":818,"context_line":"                    self._set_vm_state_and_notify("},{"line_number":819,"context_line":"                        context, instance.uuid, \u0027build_instances\u0027, updates,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_b6ed0fb9","line":816,"updated":"2016-11-02 17:15:37.000000000","message":"None of this is tested AFAICT.","commit_id":"e461bdb7ba7603719119f285681143b9929fc4f8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d9d8de545a1f2cd3e52832b552c4da55acaa73bf","unresolved":false,"context_lines":[{"line_number":866,"context_line":"            # handled the build process and would have created the mapping"},{"line_number":867,"context_line":"            inst_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":868,"context_line":"                context, instance.uuid)"},{"line_number":869,"context_line":"            if cell:"},{"line_number":870,"context_line":"                inst_mapping.cell_mapping \u003d cell"},{"line_number":871,"context_line":"                inst_mapping.save()"},{"line_number":872,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_6ad39504","line":869,"updated":"2016-11-02 15:30:30.000000000","message":"I think we can remove all of this now that we require cell setup to be completed before rolling to ocata.","commit_id":"e461bdb7ba7603719119f285681143b9929fc4f8"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"566886ae88acbec82d86f82120159643e358110f","unresolved":false,"context_lines":[{"line_number":866,"context_line":"            # handled the build process and would have created the mapping"},{"line_number":867,"context_line":"            inst_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":868,"context_line":"                context, instance.uuid)"},{"line_number":869,"context_line":"            if cell:"},{"line_number":870,"context_line":"                inst_mapping.cell_mapping \u003d cell"},{"line_number":871,"context_line":"                inst_mapping.save()"},{"line_number":872,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_e942983d","line":869,"in_reply_to":"ba5da102_6ad39504","updated":"2016-11-09 10:18:57.000000000","message":"Should we consider here people with cell v1 setup?\nI think there is possibility for them to not migrate on cells v2 right now.","commit_id":"e461bdb7ba7603719119f285681143b9929fc4f8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"99f9be9d07af464ff13fab4e7a1a157b09012897","unresolved":false,"context_lines":[{"line_number":845,"context_line":"                with obj_target_cell(inst, cell0):"},{"line_number":846,"context_line":"                    inst.destroy()"},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"    def schedule_and_build_instances(self, context, build_requests,"},{"line_number":849,"context_line":"                                     request_spec, filter_properties, image,"},{"line_number":850,"context_line":"                                     admin_password, injected_files,"},{"line_number":851,"context_line":"                                     requested_networks, block_device_mapping):"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_b3c30838","line":848,"updated":"2016-11-04 14:59:44.000000000","message":"should we honestly accept more than 1 instance cast for that RPC API ? Honestly, it\u0027s asynchronous so I\u0027d prefer to have N casts rather than one big cast here.\nI\u0027m actually agreeing with Laski\u0027s opinion that we should rather try to only accept one instance in our RPC API and mid-term think about deprecating the possibility for the API to accept more than one instance boot request at the same time.","commit_id":"7ab11da0d8aced23cb83a605c29760461072083d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f7c2c52c704cabc3c49cce951a96c6bf7621129f","unresolved":false,"context_lines":[{"line_number":845,"context_line":"                with obj_target_cell(inst, cell0):"},{"line_number":846,"context_line":"                    inst.destroy()"},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"    def schedule_and_build_instances(self, context, build_requests,"},{"line_number":849,"context_line":"                                     request_spec, filter_properties, image,"},{"line_number":850,"context_line":"                                     admin_password, injected_files,"},{"line_number":851,"context_line":"                                     requested_networks, block_device_mapping):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a629dbe_235a4884","line":848,"in_reply_to":"ba5da102_b3c30838","updated":"2016-11-07 16:13:09.000000000","message":"Nevermind that comment, not really worth it given we already do only one cast for multiple instances.","commit_id":"7ab11da0d8aced23cb83a605c29760461072083d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"99f9be9d07af464ff13fab4e7a1a157b09012897","unresolved":false,"context_lines":[{"line_number":846,"context_line":"                    inst.destroy()"},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"    def schedule_and_build_instances(self, context, build_requests,"},{"line_number":849,"context_line":"                                     request_spec, filter_properties, image,"},{"line_number":850,"context_line":"                                     admin_password, injected_files,"},{"line_number":851,"context_line":"                                     requested_networks, block_device_mapping):"},{"line_number":852,"context_line":"        legacy_spec \u003d request_spec.to_legacy_request_spec_dict()"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_3325385c","line":849,"range":{"start_line":849,"start_character":37,"end_line":849,"end_character":49},"updated":"2016-11-04 14:59:44.000000000","message":"same problem than I said in the previous change, we could imagine having different RequestSpec objects if we accept creating more than one instance.","commit_id":"7ab11da0d8aced23cb83a605c29760461072083d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"99f9be9d07af464ff13fab4e7a1a157b09012897","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        host_mapping_cache \u003d {}"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        for (build_request, host) in six.moves.zip(build_requests, hosts):"},{"line_number":865,"context_line":"            local_filter_props \u003d copy.deepcopy(filter_properties)"},{"line_number":866,"context_line":"            scheduler_utils.populate_filter_properties(local_filter_props,"},{"line_number":867,"context_line":"                                                       host)"},{"line_number":868,"context_line":"            instance \u003d build_request.get_new_instance(context)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba5da102_f3d10031","line":865,"updated":"2016-11-04 14:59:44.000000000","message":"here you should rather use request_spec.to_legacy_filter_props()","commit_id":"7ab11da0d8aced23cb83a605c29760461072083d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c2d40f5e84d8618bbf3e6d7e878ebcbb66d16265","unresolved":false,"context_lines":[{"line_number":767,"context_line":"                    migration\u003dmigration,"},{"line_number":768,"context_line":"                    host\u003dhost, node\u003dnode, limits\u003dlimits)"},{"line_number":769,"context_line":""},{"line_number":770,"context_line":"    # TODO(avolkov): move method to bdm"},{"line_number":771,"context_line":"    @staticmethod"},{"line_number":772,"context_line":"    def _volume_size(instance_type, bdm):"},{"line_number":773,"context_line":"        size \u003d bdm.get(\u0027volume_size\u0027)"},{"line_number":774,"context_line":"        # NOTE (ndipanov): inherit flavor size only for swap and ephemeral"},{"line_number":775,"context_line":"        if (size is None and bdm.get(\u0027source_type\u0027) \u003d\u003d \u0027blank\u0027 and"},{"line_number":776,"context_line":"                bdm.get(\u0027destination_type\u0027) \u003d\u003d \u0027local\u0027):"},{"line_number":777,"context_line":"            if bdm.get(\u0027guest_format\u0027) \u003d\u003d \u0027swap\u0027:"},{"line_number":778,"context_line":"                size \u003d instance_type.get(\u0027swap\u0027, 0)"},{"line_number":779,"context_line":"            else:"},{"line_number":780,"context_line":"                size \u003d instance_type.get(\u0027ephemeral_gb\u0027, 0)"},{"line_number":781,"context_line":"        return size"},{"line_number":782,"context_line":""},{"line_number":783,"context_line":"    def _create_block_device_mapping(self, instance_type, instance_uuid,"},{"line_number":784,"context_line":"                                     block_device_mapping):"},{"line_number":785,"context_line":"        \"\"\"Create the BlockDeviceMapping objects in the db."},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"        This method makes a copy of the list in order to avoid using the same"},{"line_number":788,"context_line":"        id field in case this is called for multiple instances."},{"line_number":789,"context_line":"        \"\"\""},{"line_number":790,"context_line":"        LOG.debug(\"block_device_mapping %s\", list(block_device_mapping),"},{"line_number":791,"context_line":"                  instance_uuid\u003dinstance_uuid)"},{"line_number":792,"context_line":"        instance_block_device_mapping \u003d copy.deepcopy(block_device_mapping)"},{"line_number":793,"context_line":"        for bdm in instance_block_device_mapping:"},{"line_number":794,"context_line":"            bdm.volume_size \u003d self._volume_size(instance_type, bdm)"},{"line_number":795,"context_line":"            bdm.instance_uuid \u003d instance_uuid"},{"line_number":796,"context_line":"            bdm.update_or_create()"},{"line_number":797,"context_line":"        return instance_block_device_mapping"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    def _bury_in_cell0(self, context, request_spec, exc,"},{"line_number":800,"context_line":"                       build_requests\u003dNone, instances\u003dNone):"}],"source_content_type":"text/x-python","patch_set":20,"id":"5a74a57a_db342b4c","line":797,"range":{"start_line":770,"start_character":4,"end_line":797,"end_character":44},"updated":"2016-11-22 22:52:31.000000000","message":"We already did this in _bdm_validate_set_size_and_instance in the compute API code and then set that result on the BuildRequesat object. It would be better IMO to return that same cloned BlockDeviceMappingList from _provision_instances in the Compute API and then pass that to the new conductor metohd so we don\u0027t need to redo this.","commit_id":"1774dafdbd41cc7e8643dd9327d8a970dbf62978"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fac269c72b9d3df50b3f241fe813521ec8a83177","unresolved":false,"context_lines":[{"line_number":787,"context_line":"        id field in case this is called for multiple instances."},{"line_number":788,"context_line":"        \"\"\""},{"line_number":789,"context_line":"        LOG.debug(\"block_device_mapping %s\", list(block_device_mapping),"},{"line_number":790,"context_line":"                  instance_uuid\u003dinstance_uuid)"},{"line_number":791,"context_line":"        instance_block_device_mapping \u003d copy.deepcopy(block_device_mapping)"},{"line_number":792,"context_line":"        for bdm in instance_block_device_mapping:"},{"line_number":793,"context_line":"            bdm.volume_size \u003d self._volume_size(instance_type, bdm)"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_f7533837","line":790,"updated":"2016-12-14 20:45:51.000000000","message":"This log message isn\u0027t particularly contextual. How about making the message \"Creating block device mapping: %s\"?","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0422742b635def6d2038be25cb9a99fd16d73085","unresolved":false,"context_lines":[{"line_number":787,"context_line":"        id field in case this is called for multiple instances."},{"line_number":788,"context_line":"        \"\"\""},{"line_number":789,"context_line":"        LOG.debug(\"block_device_mapping %s\", list(block_device_mapping),"},{"line_number":790,"context_line":"                  instance_uuid\u003dinstance_uuid)"},{"line_number":791,"context_line":"        instance_block_device_mapping \u003d copy.deepcopy(block_device_mapping)"},{"line_number":792,"context_line":"        for bdm in instance_block_device_mapping:"},{"line_number":793,"context_line":"            bdm.volume_size \u003d self._volume_size(instance_type, bdm)"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_b2dc6e74","line":790,"in_reply_to":"1a6eadb0_f7533837","updated":"2016-12-14 20:53:31.000000000","message":"It\u0027s leftover debug that should go away.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fac269c72b9d3df50b3f241fe813521ec8a83177","unresolved":false,"context_lines":[{"line_number":802,"context_line":"        Cell0 is the fake cell we schedule dead instances to when we can\u0027t"},{"line_number":803,"context_line":"        schedule them somewhere real. Requests that don\u0027t yet have instances"},{"line_number":804,"context_line":"        will get a new instance, created in cell0. Instances that have not yet"},{"line_number":805,"context_line":"        been created will be created in cell0. All build requests are destroyed"},{"line_number":806,"context_line":"        after we\u0027re done. Failure to delete a build request will trigger the"},{"line_number":807,"context_line":"        instance deletion, just like the happy path in"},{"line_number":808,"context_line":"        schedule_and_build_instances() below."}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_17335415","line":805,"updated":"2016-12-14 20:45:51.000000000","message":"Doesn\u0027t \"Requests that don\u0027t yet have instances will get a new instance, created in cell0\" mean the same as \"Instances that have not yet been created will be created in cell0\"?","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0422742b635def6d2038be25cb9a99fd16d73085","unresolved":false,"context_lines":[{"line_number":802,"context_line":"        Cell0 is the fake cell we schedule dead instances to when we can\u0027t"},{"line_number":803,"context_line":"        schedule them somewhere real. Requests that don\u0027t yet have instances"},{"line_number":804,"context_line":"        will get a new instance, created in cell0. Instances that have not yet"},{"line_number":805,"context_line":"        been created will be created in cell0. All build requests are destroyed"},{"line_number":806,"context_line":"        after we\u0027re done. Failure to delete a build request will trigger the"},{"line_number":807,"context_line":"        instance deletion, just like the happy path in"},{"line_number":808,"context_line":"        schedule_and_build_instances() below."}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_92c69298","line":805,"in_reply_to":"1a6eadb0_17335415","updated":"2016-12-14 20:53:31.000000000","message":"Not exactly, but I don\u0027t think it matters for the docstring, so I\u0027ll collapse into the latter.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fac269c72b9d3df50b3f241fe813521ec8a83177","unresolved":false,"context_lines":[{"line_number":809,"context_line":"        \"\"\""},{"line_number":810,"context_line":"        try:"},{"line_number":811,"context_line":"            cell0 \u003d objects.CellMapping.get_by_uuid("},{"line_number":812,"context_line":"                context, objects.CellMapping.CELL0_UUID)"},{"line_number":813,"context_line":"        except exception.CellMappingNotFound:"},{"line_number":814,"context_line":"            # Not yet setup for cellsv2. Instances will need to be written"},{"line_number":815,"context_line":"            # to the configured database. This will become a deployment"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_373850ef","line":812,"updated":"2016-12-14 20:45:51.000000000","message":"Consider caching this in memory in a future patch. Unless I\u0027m mistaken and the cell mapping for cell0 changes often?","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0422742b635def6d2038be25cb9a99fd16d73085","unresolved":false,"context_lines":[{"line_number":809,"context_line":"        \"\"\""},{"line_number":810,"context_line":"        try:"},{"line_number":811,"context_line":"            cell0 \u003d objects.CellMapping.get_by_uuid("},{"line_number":812,"context_line":"                context, objects.CellMapping.CELL0_UUID)"},{"line_number":813,"context_line":"        except exception.CellMappingNotFound:"},{"line_number":814,"context_line":"            # Not yet setup for cellsv2. Instances will need to be written"},{"line_number":815,"context_line":"            # to the configured database. This will become a deployment"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_3265beb4","line":812,"in_reply_to":"1a6eadb0_373850ef","updated":"2016-12-14 20:53:31.000000000","message":"I need to cache it at the object layer anyway, It\u0027s cached for lists in the subsequent patch that adds it. But yeah, will expand it later.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"269ff9815ea0053064d1f277bcf434aefe88f0e1","unresolved":false,"context_lines":[{"line_number":821,"context_line":""},{"line_number":822,"context_line":"        instances \u003d instances or []"},{"line_number":823,"context_line":"        instances_by_uuid \u003d {inst.uuid: inst for inst in instances}"},{"line_number":824,"context_line":"        for build_request in build_requests:"},{"line_number":825,"context_line":"            if build_request.instance_uuid not in instances_by_uuid:"},{"line_number":826,"context_line":"                # This is an instance object with no matching db entry."},{"line_number":827,"context_line":"                instance \u003d build_request.get_new_instance(context)"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_3aacf09f","line":824,"range":{"start_line":824,"start_character":29,"end_line":824,"end_character":43},"updated":"2016-12-13 22:12:52.000000000","message":"If build_requests is None, this will be a problem. Do we need\n\n build_requests \u003d build_requests or []\n\nlike we have for instances?","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6dd9d0d2db7d0286ecf5c57c9a1bd82aa8fd90cf","unresolved":false,"context_lines":[{"line_number":821,"context_line":""},{"line_number":822,"context_line":"        instances \u003d instances or []"},{"line_number":823,"context_line":"        instances_by_uuid \u003d {inst.uuid: inst for inst in instances}"},{"line_number":824,"context_line":"        for build_request in build_requests:"},{"line_number":825,"context_line":"            if build_request.instance_uuid not in instances_by_uuid:"},{"line_number":826,"context_line":"                # This is an instance object with no matching db entry."},{"line_number":827,"context_line":"                instance \u003d build_request.get_new_instance(context)"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_1de46039","line":824,"range":{"start_line":824,"start_character":29,"end_line":824,"end_character":43},"in_reply_to":"1a6eadb0_3aacf09f","updated":"2016-12-14 16:48:09.000000000","message":"Um, no, this is magic code that autmatically doe...\n\ner, yes.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"269ff9815ea0053064d1f277bcf434aefe88f0e1","unresolved":false,"context_lines":[{"line_number":828,"context_line":"                instances_by_uuid[instance.uuid] \u003d instance"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"        updates \u003d {\u0027vm_state\u0027: vm_states.ERROR, \u0027task_state\u0027: None}"},{"line_number":831,"context_line":"        legacy_spec \u003d request_spec.to_legacy_request_spec_dict()"},{"line_number":832,"context_line":"        for instance in instances_by_uuid.values():"},{"line_number":833,"context_line":"            with obj_target_cell(instance, cell0):"},{"line_number":834,"context_line":"                instance.create()"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_3d278a65","line":831,"updated":"2016-12-13 22:12:52.000000000","message":"Judging from other comments in this file, we only need the legacy version of the request spec because set_vm_state_and_notify can\u0027t handle a RequestSpec object yet.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4ef94a3759206638bfdebff4f8129ed881e34f6a","unresolved":false,"context_lines":[{"line_number":828,"context_line":"                instances_by_uuid[instance.uuid] \u003d instance"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"        updates \u003d {\u0027vm_state\u0027: vm_states.ERROR, \u0027task_state\u0027: None}"},{"line_number":831,"context_line":"        legacy_spec \u003d request_spec.to_legacy_request_spec_dict()"},{"line_number":832,"context_line":"        for instance in instances_by_uuid.values():"},{"line_number":833,"context_line":"            with obj_target_cell(instance, cell0):"},{"line_number":834,"context_line":"                instance.create()"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_f7218ab5","line":831,"in_reply_to":"1a6eadb0_3d278a65","updated":"2016-12-14 15:08:16.000000000","message":"I\u0027m not sure what you\u0027re saying here. Are you suggesting that I convert and store the requestspec only in legacy form in schedule_and_build_instances() so that i don\u0027t have to convert it again here?\n\nSylvain is going to be working on making the request spec object what we pass to schedule_instances soon, which will take care of the conversion on L860. Otherwise, we only convert the request spec to legacy if/when we bury a request in cell0 here.\n\nI certainly don\u0027t want to convert everything to legacy and only pass that around in here as it just makes it harder to finish the conversion to the object later. I think I\u0027m missing what should be changed here.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6dd9d0d2db7d0286ecf5c57c9a1bd82aa8fd90cf","unresolved":false,"context_lines":[{"line_number":828,"context_line":"                instances_by_uuid[instance.uuid] \u003d instance"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"        updates \u003d {\u0027vm_state\u0027: vm_states.ERROR, \u0027task_state\u0027: None}"},{"line_number":831,"context_line":"        legacy_spec \u003d request_spec.to_legacy_request_spec_dict()"},{"line_number":832,"context_line":"        for instance in instances_by_uuid.values():"},{"line_number":833,"context_line":"            with obj_target_cell(instance, cell0):"},{"line_number":834,"context_line":"                instance.create()"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_5d3b389c","line":831,"in_reply_to":"1a6eadb0_da559350","updated":"2016-12-14 16:48:09.000000000","message":"Sorry, I thought you were prescribing a change here and I couldn\u0027t suss out what it was in my peri-coffee stuper.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d59e92d4bc2ec65c86b29055a6e467ce224d2dd4","unresolved":false,"context_lines":[{"line_number":828,"context_line":"                instances_by_uuid[instance.uuid] \u003d instance"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"        updates \u003d {\u0027vm_state\u0027: vm_states.ERROR, \u0027task_state\u0027: None}"},{"line_number":831,"context_line":"        legacy_spec \u003d request_spec.to_legacy_request_spec_dict()"},{"line_number":832,"context_line":"        for instance in instances_by_uuid.values():"},{"line_number":833,"context_line":"            with obj_target_cell(instance, cell0):"},{"line_number":834,"context_line":"                instance.create()"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_da559350","line":831,"in_reply_to":"1a6eadb0_f7218ab5","updated":"2016-12-14 15:25:38.000000000","message":"I often comment for the benefit of other reviewers and myself when I have to look at something again. Not suggesting you convert anything.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"269ff9815ea0053064d1f277bcf434aefe88f0e1","unresolved":false,"context_lines":[{"line_number":833,"context_line":"            with obj_target_cell(instance, cell0):"},{"line_number":834,"context_line":"                instance.create()"},{"line_number":835,"context_line":"                self._set_vm_state_and_notify("},{"line_number":836,"context_line":"                    context, instance.uuid, \u0027build_instances\u0027, updates,"},{"line_number":837,"context_line":"                    exc, legacy_spec)"},{"line_number":838,"context_line":"                try:"},{"line_number":839,"context_line":"                    inst_mapping \u003d \\"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_9a226400","line":836,"range":{"start_line":836,"start_character":45,"end_line":836,"end_character":60},"updated":"2016-12-13 22:12:52.000000000","message":"Shouldn\u0027t this be schedule_and_build_instances?","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d59e92d4bc2ec65c86b29055a6e467ce224d2dd4","unresolved":false,"context_lines":[{"line_number":833,"context_line":"            with obj_target_cell(instance, cell0):"},{"line_number":834,"context_line":"                instance.create()"},{"line_number":835,"context_line":"                self._set_vm_state_and_notify("},{"line_number":836,"context_line":"                    context, instance.uuid, \u0027build_instances\u0027, updates,"},{"line_number":837,"context_line":"                    exc, legacy_spec)"},{"line_number":838,"context_line":"                try:"},{"line_number":839,"context_line":"                    inst_mapping \u003d \\"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_7a99df1e","line":836,"range":{"start_line":836,"start_character":45,"end_line":836,"end_character":60},"in_reply_to":"1a6eadb0_1ae9cb14","updated":"2016-12-14 15:25:38.000000000","message":"It\u0027s supposed to be the method name but you make a good point about what notification users currently expect. So nevermind my comment on that.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"49423af812bb059357bfe715098214096866d8c3","unresolved":false,"context_lines":[{"line_number":833,"context_line":"            with obj_target_cell(instance, cell0):"},{"line_number":834,"context_line":"                instance.create()"},{"line_number":835,"context_line":"                self._set_vm_state_and_notify("},{"line_number":836,"context_line":"                    context, instance.uuid, \u0027build_instances\u0027, updates,"},{"line_number":837,"context_line":"                    exc, legacy_spec)"},{"line_number":838,"context_line":"                try:"},{"line_number":839,"context_line":"                    inst_mapping \u003d \\"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_e1b9a37a","line":836,"range":{"start_line":836,"start_character":45,"end_line":836,"end_character":60},"in_reply_to":"1a6eadb0_1d69c08b","updated":"2016-12-15 08:49:40.000000000","message":"Jay pinged me to look at this particular question. Sorry for not reviewing the whole patch.\nI agree with Dan that changing this would break notification users. The passed in method name is only used in a log message and in the emitted legacy notification. So I think keeping \u0027build_instance\u0027 here is the less bad choice.\n\nWhen we will reach this point of the notification transformation I think we have to be careful not to tight the versioned notification to certain function names as that is an implementation detail the notification client should not know about. Instead of the function name we should use the name of the action executed in the notification. The set_vm_state_and_notify is currently used to emit compute_task.build_instances, compute_task.migrate_server and compute_task.rebuild_server legacy notifications I think the naming of the actions (build, migrate, rebuild) is OK in those event_types.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6dd9d0d2db7d0286ecf5c57c9a1bd82aa8fd90cf","unresolved":false,"context_lines":[{"line_number":833,"context_line":"            with obj_target_cell(instance, cell0):"},{"line_number":834,"context_line":"                instance.create()"},{"line_number":835,"context_line":"                self._set_vm_state_and_notify("},{"line_number":836,"context_line":"                    context, instance.uuid, \u0027build_instances\u0027, updates,"},{"line_number":837,"context_line":"                    exc, legacy_spec)"},{"line_number":838,"context_line":"                try:"},{"line_number":839,"context_line":"                    inst_mapping \u003d \\"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_1d69c08b","line":836,"range":{"start_line":836,"start_character":45,"end_line":836,"end_character":60},"in_reply_to":"1a6eadb0_7a99df1e","updated":"2016-12-14 16:48:09.000000000","message":"Yeah, I don\u0027t know for sure. We should ask a notification-knowing person.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4ef94a3759206638bfdebff4f8129ed881e34f6a","unresolved":false,"context_lines":[{"line_number":833,"context_line":"            with obj_target_cell(instance, cell0):"},{"line_number":834,"context_line":"                instance.create()"},{"line_number":835,"context_line":"                self._set_vm_state_and_notify("},{"line_number":836,"context_line":"                    context, instance.uuid, \u0027build_instances\u0027, updates,"},{"line_number":837,"context_line":"                    exc, legacy_spec)"},{"line_number":838,"context_line":"                try:"},{"line_number":839,"context_line":"                    inst_mapping \u003d \\"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_1ae9cb14","line":836,"range":{"start_line":836,"start_character":45,"end_line":836,"end_character":60},"in_reply_to":"1a6eadb0_9a226400","updated":"2016-12-14 15:08:16.000000000","message":"I dunno, maybe? This is the name that it was originally at the beginning of time, not the name that the method has been for the last however many years, right? I\u0027m assuming this may break some people listening for notifications about instance builds that are waiting for \"build_instances\" and not \"build_and_run_instances\" or \"schedule_and_build_instances\" ?","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"269ff9815ea0053064d1f277bcf434aefe88f0e1","unresolved":false,"context_lines":[{"line_number":857,"context_line":"                                     request_specs, image,"},{"line_number":858,"context_line":"                                     admin_password, injected_files,"},{"line_number":859,"context_line":"                                     requested_networks, block_device_mapping):"},{"line_number":860,"context_line":"        legacy_spec \u003d request_specs[0].to_legacy_request_spec_dict()"},{"line_number":861,"context_line":"        try:"},{"line_number":862,"context_line":"            hosts \u003d self._schedule_instances(context, legacy_spec,"},{"line_number":863,"context_line":"                        request_specs[0].to_legacy_filter_properties_dict())"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_ddd776eb","line":860,"updated":"2016-12-13 22:12:52.000000000","message":"More scheduler utils non objectness","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"269ff9815ea0053064d1f277bcf434aefe88f0e1","unresolved":false,"context_lines":[{"line_number":905,"context_line":""},{"line_number":906,"context_line":"            objects.InstanceAction.action_start("},{"line_number":907,"context_line":"                context, instance.uuid, instance_actions.CREATE,"},{"line_number":908,"context_line":"                want_result\u003dFalse)"},{"line_number":909,"context_line":""},{"line_number":910,"context_line":"            with obj_target_cell(instance, cell):"},{"line_number":911,"context_line":"                instance_bdms \u003d self._create_block_device_mapping("}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_bd78faf3","line":908,"updated":"2016-12-13 22:12:52.000000000","message":"FWIW, these updates are sent after creating the bdms in compute/api currently. And the instance action start is called right before the compute rpc ... It\u0027s not clear to me when we should be recording the action start, whether it should be before exception handling that would nil out the instance or after.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"269ff9815ea0053064d1f277bcf434aefe88f0e1","unresolved":false,"context_lines":[{"line_number":944,"context_line":"            legacy_secgroups \u003d [s.identifier"},{"line_number":945,"context_line":"                                for s in request_spec.security_groups]"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":"            with obj_target_cell(instance, cell):"},{"line_number":948,"context_line":"                self.compute_rpcapi.build_and_run_instance("},{"line_number":949,"context_line":"                    context, instance\u003dinstance, image\u003dimage,"},{"line_number":950,"context_line":"                    request_spec\u003drequest_spec,"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_7a2668cf","line":947,"range":{"start_line":947,"start_character":12,"end_line":947,"end_character":49},"updated":"2016-12-13 22:12:52.000000000","message":"I don\u0027t think this is needed. target_cell is only for database switching. The message queue will be switched according to the host kwarg.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d59e92d4bc2ec65c86b29055a6e467ce224d2dd4","unresolved":false,"context_lines":[{"line_number":944,"context_line":"            legacy_secgroups \u003d [s.identifier"},{"line_number":945,"context_line":"                                for s in request_spec.security_groups]"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":"            with obj_target_cell(instance, cell):"},{"line_number":948,"context_line":"                self.compute_rpcapi.build_and_run_instance("},{"line_number":949,"context_line":"                    context, instance\u003dinstance, image\u003dimage,"},{"line_number":950,"context_line":"                    request_spec\u003drequest_spec,"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_054df06b","line":947,"range":{"start_line":947,"start_character":12,"end_line":947,"end_character":49},"in_reply_to":"1a6eadb0_57bdde66","updated":"2016-12-14 15:25:38.000000000","message":"Well, target_cell originally did mq switching too and we took it out for the ClientRouter stuff and there were no plans to add it back. Maybe we should, now that we know we have this case.\n\nAbout the functional tests, that\u0027s kind of not how I thought it should be intended to work. That is, in this case what I was thinking with the _last_ctxt_mgr thing was that the \"local\" DB call in the cell would be using the last cell that was targeted with target_cell, and that way it uses the right DB. If that\u0027s not happening, then we may have other problems.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4ef94a3759206638bfdebff4f8129ed881e34f6a","unresolved":false,"context_lines":[{"line_number":944,"context_line":"            legacy_secgroups \u003d [s.identifier"},{"line_number":945,"context_line":"                                for s in request_spec.security_groups]"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":"            with obj_target_cell(instance, cell):"},{"line_number":948,"context_line":"                self.compute_rpcapi.build_and_run_instance("},{"line_number":949,"context_line":"                    context, instance\u003dinstance, image\u003dimage,"},{"line_number":950,"context_line":"                    request_spec\u003drequest_spec,"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_57bdde66","line":947,"range":{"start_line":947,"start_character":12,"end_line":947,"end_character":49},"in_reply_to":"1a6eadb0_7a2668cf","updated":"2016-12-14 15:08:16.000000000","message":"Oh, I thought we also had a goal of making it switch the mq bits as well. Otherwise the rpcapi has to look up hostmappings every time, even if we already know where it needs to go. I know it does that always now, but.. does it need to if we have already resolved it? Also, later when cells may call across each other to facilitate cross-cell migration, we\u0027ll need to be able to target another cell\u0027s mq to make those calls...\n\nSomething else to think about, for consistency, is that I think a bunch of our functional tests will break if we don\u0027t have this. If we don\u0027t target the cell here, when we fall-through the fake rpc call and directly call the resulting code, we will not be targeted to the right DB.\n\nThat may actually not be the case now because we\u0027re still cheating a bit, I\u0027ll have to go look. But still, I thought we wanted to do this.","commit_id":"9659bea2d79baf3101c439c3873e2186fbe06dac"}],"nova/tests/unit/conductor/test_conductor.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d9d8de545a1f2cd3e52832b552c4da55acaa73bf","unresolved":false,"context_lines":[{"line_number":1437,"context_line":"                         fake_notifier.NOTIFICATIONS[0].event_type)"},{"line_number":1438,"context_line":""},{"line_number":1439,"context_line":""},{"line_number":1440,"context_line":"class _ScheduleAndBuildIntanceTestCase(object):"},{"line_number":1441,"context_line":""},{"line_number":1442,"context_line":"    def setUp(self):"},{"line_number":1443,"context_line":"        super(_ScheduleAndBuildIntanceTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_caed81b8","line":1440,"updated":"2016-11-02 15:30:30.000000000","message":"Instance is misspelled.","commit_id":"e461bdb7ba7603719119f285681143b9929fc4f8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d9d8de545a1f2cd3e52832b552c4da55acaa73bf","unresolved":false,"context_lines":[{"line_number":1475,"context_line":"    @mock.patch("},{"line_number":1476,"context_line":"        \u0027nova.compute.rpcapi.ComputeAPI.build_and_run_instance\u0027)"},{"line_number":1477,"context_line":"    @mock.patch(\u0027nova.scheduler.rpcapi.SchedulerAPI.select_destinations\u0027)"},{"line_number":1478,"context_line":"    def test_compute_method_is_called("},{"line_number":1479,"context_line":"            self, select_destinations, build_and_run_instance):"},{"line_number":1480,"context_line":"        select_destinations.return_value \u003d [{\u0027host\u0027: \u0027fake-host\u0027,"},{"line_number":1481,"context_line":"                                             \u0027nodename\u0027: \u0027fake-nodename\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_4a86d1db","line":1478,"updated":"2016-11-02 15:30:30.000000000","message":"This doesn\u0027t test with a cell/host mapping in place, which is kindof the whole point :)","commit_id":"e461bdb7ba7603719119f285681143b9929fc4f8"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"566886ae88acbec82d86f82120159643e358110f","unresolved":false,"context_lines":[{"line_number":1475,"context_line":"    @mock.patch("},{"line_number":1476,"context_line":"        \u0027nova.compute.rpcapi.ComputeAPI.build_and_run_instance\u0027)"},{"line_number":1477,"context_line":"    @mock.patch(\u0027nova.scheduler.rpcapi.SchedulerAPI.select_destinations\u0027)"},{"line_number":1478,"context_line":"    def test_compute_method_is_called("},{"line_number":1479,"context_line":"            self, select_destinations, build_and_run_instance):"},{"line_number":1480,"context_line":"        select_destinations.return_value \u003d [{\u0027host\u0027: \u0027fake-host\u0027,"},{"line_number":1481,"context_line":"                                             \u0027nodename\u0027: \u0027fake-nodename\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_29c0107b","line":1478,"in_reply_to":"ba5da102_4a86d1db","updated":"2016-11-09 10:18:57.000000000","message":"Yes, this doesn\u0027t cover cell case. I planned to do it separately.","commit_id":"e461bdb7ba7603719119f285681143b9929fc4f8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d9d8de545a1f2cd3e52832b552c4da55acaa73bf","unresolved":false,"context_lines":[{"line_number":1509,"context_line":""},{"line_number":1510,"context_line":""},{"line_number":1511,"context_line":"class ConductorTaskTestCase("},{"line_number":1512,"context_line":"        _BaseTaskTestCase, _ScheduleAndBuildIntanceTestCase,"},{"line_number":1513,"context_line":"        test_compute.BaseTestCase):"},{"line_number":1514,"context_line":"    \"\"\"ComputeTaskManager Tests.\"\"\""},{"line_number":1515,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_4a5df177","line":1512,"updated":"2016-11-02 15:30:30.000000000","message":"I don\u0027t really see why this needs to be mixed in like this.","commit_id":"e461bdb7ba7603719119f285681143b9929fc4f8"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"566886ae88acbec82d86f82120159643e358110f","unresolved":false,"context_lines":[{"line_number":1509,"context_line":""},{"line_number":1510,"context_line":""},{"line_number":1511,"context_line":"class ConductorTaskTestCase("},{"line_number":1512,"context_line":"        _BaseTaskTestCase, _ScheduleAndBuildIntanceTestCase,"},{"line_number":1513,"context_line":"        test_compute.BaseTestCase):"},{"line_number":1514,"context_line":"    \"\"\"ComputeTaskManager Tests.\"\"\""},{"line_number":1515,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_cdb15f91","line":1512,"in_reply_to":"ba5da102_4a5df177","updated":"2016-11-09 10:18:57.000000000","message":"Yep, it looks strange ). As I wanted to have several tests for new method I didn\u0027t like naming:\ntest_schedule_and_build_instance_do_something, I preferred to make separate class for that.","commit_id":"e461bdb7ba7603719119f285681143b9929fc4f8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6b325f8fc0ce15bbf47c22bab06256cf5243fb0e","unresolved":false,"context_lines":[{"line_number":1439,"context_line":"        def _build_and_run_instance(ctxt, *args, **kwargs):"},{"line_number":1440,"context_line":"            self.assertTrue(kwargs[\u0027instance\u0027].id)"},{"line_number":1441,"context_line":"            self.assertEqual(1, len(kwargs[\u0027block_device_mapping\u0027]))"},{"line_number":1442,"context_line":"            # FIXME(danms): How to validate the db connection here?"},{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"        self.start_service(\u0027compute\u0027, host\u003d\u0027fake-host\u0027)"},{"line_number":1445,"context_line":"        build_and_run_instance.side_effect \u003d _build_and_run_instance"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a6eadb0_fd715745","line":1442,"updated":"2016-12-14 21:15:01.000000000","message":"Maybe you could mock out the obj_target_cell() context manager with a function that inspects the passed-in context argument for a transport URL/DB connection and then just yield out of the mock?","commit_id":"bcbfee183e74f696085fcd5c18aff333fc5f1403"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6b325f8fc0ce15bbf47c22bab06256cf5243fb0e","unresolved":false,"context_lines":[{"line_number":1470,"context_line":""},{"line_number":1471,"context_line":"        # Because of the cache, this should only be called twice,"},{"line_number":1472,"context_line":"        # once for the first and once for the third request."},{"line_number":1473,"context_line":"        get_hostmapping.side_effect \u003d self.host_mappings.values()"},{"line_number":1474,"context_line":""},{"line_number":1475,"context_line":"        build_request2 \u003d fake_build_request.fake_req_obj(self.ctxt)"},{"line_number":1476,"context_line":"        del build_request2.instance.id"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a6eadb0_1d91b347","line":1473,"updated":"2016-12-14 21:15:01.000000000","message":"I don\u0027t see where self.host_mappings is defined? It\u0027s not in either test_conductor\u0027s test classes or compute/test_compute.py\u0027s classes.","commit_id":"bcbfee183e74f696085fcd5c18aff333fc5f1403"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1becde1758e2e61024ba94cde6cd20f1429dec22","unresolved":false,"context_lines":[{"line_number":1470,"context_line":""},{"line_number":1471,"context_line":"        # Because of the cache, this should only be called twice,"},{"line_number":1472,"context_line":"        # once for the first and once for the third request."},{"line_number":1473,"context_line":"        get_hostmapping.side_effect \u003d self.host_mappings.values()"},{"line_number":1474,"context_line":""},{"line_number":1475,"context_line":"        build_request2 \u003d fake_build_request.fake_req_obj(self.ctxt)"},{"line_number":1476,"context_line":"        del build_request2.instance.id"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a6eadb0_5ac6a868","line":1473,"in_reply_to":"1a6eadb0_1d91b347","updated":"2016-12-15 14:52:39.000000000","message":"It\u0027s in test.py in start_service().","commit_id":"bcbfee183e74f696085fcd5c18aff333fc5f1403"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6b325f8fc0ce15bbf47c22bab06256cf5243fb0e","unresolved":false,"context_lines":[{"line_number":1522,"context_line":"        br_destroy.side_effect \u003d exc.BuildRequestNotFound(uuid\u003d\u0027foo\u0027)"},{"line_number":1523,"context_line":"        self.start_service(\u0027compute\u0027, host\u003d\u0027fake-host\u0027)"},{"line_number":1524,"context_line":"        select_destinations.return_value \u003d [{\u0027host\u0027: \u0027fake-host\u0027,"},{"line_number":1525,"context_line":"                                             \u0027nodename\u0027: \u0027nodesarestupid\u0027,"},{"line_number":1526,"context_line":"                                             \u0027limits\u0027: None}]"},{"line_number":1527,"context_line":"        self.conductor.schedule_and_build_instances(**self.params)"},{"line_number":1528,"context_line":"        self.assertFalse(build_and_run.called)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a6eadb0_3d966f3f","line":1525,"updated":"2016-12-14 21:15:01.000000000","message":"totally agree.","commit_id":"bcbfee183e74f696085fcd5c18aff333fc5f1403"}]}
