)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d8c82d08d44c3838637c21a08846ce69d6c4fb74","unresolved":false,"context_lines":[{"line_number":2193,"context_line":"                        requested_networks, security_groups, image_meta,"},{"line_number":2194,"context_line":"                        block_device_mapping,"},{"line_number":2195,"context_line":"                        request_group_resource_providers_mapping) as resources:"},{"line_number":2196,"context_line":"                    if \u0027vpmems\u0027 in instance and instance.vpmems:"},{"line_number":2197,"context_line":"                        new_vpmems \u003d self.driver.allocate_pmems("},{"line_number":2198,"context_line":"                                context, instance.vpmems.vpmems)"},{"line_number":2199,"context_line":"                        instance.vpmems \u003d objects.VirtualPMEMList("},{"line_number":2200,"context_line":"                                vpmems\u003dnew_vpmems)"},{"line_number":2201,"context_line":"                    instance.vm_state \u003d vm_states.BUILDING"},{"line_number":2202,"context_line":"                    instance.task_state \u003d task_states.SPAWNING"},{"line_number":2203,"context_line":"                    # NOTE(JoshNang) This also saves the changes to the"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_5ca80cda","line":2200,"range":{"start_line":2196,"start_character":20,"end_line":2200,"end_character":50},"updated":"2019-07-10 06:31:22.000000000","message":"This isn\u0027t the right place to allocate the vpmem. And this will have race problem. When the mulitple instances create at same time, they may get the same vpmem.\n\nI prefer to move this into the libvirt driver spawn method. And with a protection of lock","commit_id":"23d12211557b3b26d93af86008c5337ed6fc7219"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b01d9abf3b8a09058ef5dbfbdaf2d906fcded72d","unresolved":false,"context_lines":[{"line_number":2193,"context_line":"                        requested_networks, security_groups, image_meta,"},{"line_number":2194,"context_line":"                        block_device_mapping,"},{"line_number":2195,"context_line":"                        request_group_resource_providers_mapping) as resources:"},{"line_number":2196,"context_line":"                    if \u0027vpmems\u0027 in instance and instance.vpmems:"},{"line_number":2197,"context_line":"                        new_vpmems \u003d self.driver.allocate_pmems("},{"line_number":2198,"context_line":"                                context, instance.vpmems.vpmems)"},{"line_number":2199,"context_line":"                        instance.vpmems \u003d objects.VirtualPMEMList("},{"line_number":2200,"context_line":"                                vpmems\u003dnew_vpmems)"},{"line_number":2201,"context_line":"                    instance.vm_state \u003d vm_states.BUILDING"},{"line_number":2202,"context_line":"                    instance.task_state \u003d task_states.SPAWNING"},{"line_number":2203,"context_line":"                    # NOTE(JoshNang) This also saves the changes to the"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_7731610b","line":2200,"range":{"start_line":2196,"start_character":20,"end_line":2200,"end_character":50},"in_reply_to":"7faddb67_5ca80cda","updated":"2019-07-10 08:50:22.000000000","message":"Sorry, I checked again, I think we should claim the device in the resource_tracker.instance_claim.","commit_id":"23d12211557b3b26d93af86008c5337ed6fc7219"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b01d9abf3b8a09058ef5dbfbdaf2d906fcded72d","unresolved":false,"context_lines":[{"line_number":492,"context_line":"                assigned_pmem_names_by_label[vpmem.label].append(vpmem.ns_name)"},{"line_number":493,"context_line":"        return assigned_pmem_names_by_label"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    def allocate_pmems(self, context, vpmems):"},{"line_number":496,"context_line":"        curr_vpmems \u003d vpmems"},{"line_number":497,"context_line":"        new_vpmems \u003d []"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_573ea5da","line":495,"range":{"start_line":495,"start_character":4,"end_line":495,"end_character":46},"updated":"2019-07-10 08:50:22.000000000","message":"we need a lock for this method.\n\nAnd we need to maintain an allocation status in the memory I think. \n\nI can\u0027t rely on the libvirt, there will be a race problem.","commit_id":"23d12211557b3b26d93af86008c5337ed6fc7219"}]}
