)]}'
{"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2c0eedb68a43c9e58c216fc901fbdb164f33c0d3","unresolved":false,"context_lines":[{"line_number":20625,"context_line":""},{"line_number":20626,"context_line":"    def _get_fake_provider_tree_with_vgpu(self):"},{"line_number":20627,"context_line":"        \"\"\"Returns a fake ProviderTree with VGPU inventory on two children RPs"},{"line_number":20628,"context_line":"        with one with a correct name and the other one wrong."},{"line_number":20629,"context_line":""},{"line_number":20630,"context_line":"        The child provider is named rp1 and its UUID is uuids.rp1."},{"line_number":20631,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_33369e53","line":20628,"range":{"start_line":20628,"start_character":55,"end_line":20628,"end_character":60},"updated":"2019-02-21 22:51:52.000000000","message":"Does it have to be totally bogus? Would we be testing the same code path if the other provider had a validly-formatted name but represented a different PF? I would have thought that was the interesting case here.","commit_id":"2fa9f42ca71e03eaa2c5b9be31624e367d862c77"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"428435a0fd5630badefb06e64a6834d0c7074b99","unresolved":false,"context_lines":[{"line_number":20720,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":20721,"context_line":"        # Mock the fact update_provider_tree() should have run"},{"line_number":20722,"context_line":"        drvr.provider_tree \u003d self._get_fake_provider_tree_with_vgpu()"},{"line_number":20723,"context_line":"        self.assertRaises(exception.ComputeResourcesUnavailable,"},{"line_number":20724,"context_line":"                          drvr._allocate_mdevs, allocations\u003dallocations)"},{"line_number":20725,"context_line":""},{"line_number":20726,"context_line":"    def test_allocate_mdevs_with_no_idea_of_the_provider(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_8ac6b667","line":20723,"updated":"2019-02-28 02:57:25.000000000","message":"OK I guess this is because even though we found the parent in the tree availableInstances\u003d0. Would be nice to have a comment to that effect since all of these methods raise ComputeResourcesUnavailable with the same error message so there isn\u0027t a clear way to distinguish *why* you\u0027re getting ComputeResourcesUnavailable in the different cases.","commit_id":"2d00da78d5799c9d47fff8ab5fbd68f43ed35b35"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9d0bb1a20c8c970bd92466a3a31049e427038224","unresolved":false,"context_lines":[{"line_number":6344,"context_line":"        rp_uuid, alloc \u003d six.next(six.iteritems(vgpu_allocations))"},{"line_number":6345,"context_line":"        vgpus_asked \u003d alloc[\u0027resources\u0027][rc_fields.ResourceClass.VGPU]"},{"line_number":6346,"context_line":""},{"line_number":6347,"context_line":"        # TODO(sbauza): WE NEED TO FIND A WAY TO MAP THE RP UUID WITH ITS NAME"},{"line_number":6348,"context_line":"        # FIXME(sbauza): As we don\u0027t ask for specific mdevs, if the allocation"},{"line_number":6349,"context_line":"        # is related to a specific pGPU, we won\u0027t use it but the resources"},{"line_number":6350,"context_line":"        # will still be OK until we support multiple types"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_ee7d361c","line":6347,"range":{"start_line":6347,"start_character":24,"end_line":6347,"end_character":78},"updated":"2019-02-13 17:06:43.000000000","message":"Refer to [1]. TL;DR: the proposal is to have the virt driver\u0027s update_provider_tree method save a mapping that spawn can subsequently read. The simplest thing is for upt to save the ProviderTree object as an instance variable on the driver object.\n\n[1] http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2019-02-12.log.html#t2019-02-12T14:42:21","commit_id":"b2e26271f40f9ee46822ad0a573116f0e02c2ca5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6f774548bb8ab8880279ceb6384c094fc9e0f10c","unresolved":false,"context_lines":[{"line_number":394,"context_line":"        # Copy of the compute service ProviderTree object that is updated"},{"line_number":395,"context_line":"        # every time update_provider_tree() is called."},{"line_number":396,"context_line":"        # NOTE(sbauza): We only want a read-only cache, this attribute is not"},{"line_number":397,"context_line":"        # intented to be updatable directly"},{"line_number":398,"context_line":"        self._provider_tree \u003d None"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_36dff90d","line":397,"range":{"start_line":397,"start_character":10,"end_line":397,"end_character":18},"updated":"2019-02-14 19:32:44.000000000","message":"intended","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6f774548bb8ab8880279ceb6384c094fc9e0f10c","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        # intented to be updatable directly"},{"line_number":398,"context_line":"        self._provider_tree \u003d None"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"    @property"},{"line_number":401,"context_line":"    def provider_tree(self):"},{"line_number":402,"context_line":"        return self._provider_tree"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    def _get_volume_drivers(self):"},{"line_number":405,"context_line":"        driver_registry \u003d dict()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_f6e411e2","line":402,"range":{"start_line":400,"start_character":0,"end_line":402,"end_character":34},"updated":"2019-02-14 19:32:44.000000000","message":"not sure why this is necessary","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d82a1bc34efb94a0b89226b49a85816b38b8e008","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        # intented to be updatable directly"},{"line_number":398,"context_line":"        self._provider_tree \u003d None"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"    @property"},{"line_number":401,"context_line":"    def provider_tree(self):"},{"line_number":402,"context_line":"        return self._provider_tree"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    def _get_volume_drivers(self):"},{"line_number":405,"context_line":"        driver_registry \u003d dict()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_52007bab","line":402,"range":{"start_line":400,"start_character":0,"end_line":402,"end_character":34},"in_reply_to":"9fdfeff1_f6e411e2","updated":"2019-02-15 10:52:38.000000000","message":"Done","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6f774548bb8ab8880279ceb6384c094fc9e0f10c","unresolved":false,"context_lines":[{"line_number":6215,"context_line":"        mdevs \u003d self._get_mediated_devices(requested_types)"},{"line_number":6216,"context_line":"        available_mdevs \u003d set()"},{"line_number":6217,"context_line":"        for mdev in mdevs:"},{"line_number":6218,"context_line":"            if (parent is not None and mdev[\u0027parent\u0027] \u003d\u003d parent"},{"line_number":6219,"context_line":"                    or not parent):"},{"line_number":6220,"context_line":"                available_mdevs.add(mdev[\"uuid\"])"},{"line_number":6221,"context_line":""},{"line_number":6222,"context_line":"        available_mdevs -\u003d set(allocated_mdevs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_59ee6e22","line":6219,"range":{"start_line":6218,"start_character":15,"end_line":6219,"end_character":34},"updated":"2019-02-14 19:32:44.000000000","message":"This is pretty confusing to read. Unless parent\u003d\u0027\u0027 has special meaning, I think it would be the same to say:\n\n if parent is None or mdev[\u0027parent\u0027] \u003d\u003d parent:\n\nIt\u0027s also more efficient :P","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d82a1bc34efb94a0b89226b49a85816b38b8e008","unresolved":false,"context_lines":[{"line_number":6215,"context_line":"        mdevs \u003d self._get_mediated_devices(requested_types)"},{"line_number":6216,"context_line":"        available_mdevs \u003d set()"},{"line_number":6217,"context_line":"        for mdev in mdevs:"},{"line_number":6218,"context_line":"            if (parent is not None and mdev[\u0027parent\u0027] \u003d\u003d parent"},{"line_number":6219,"context_line":"                    or not parent):"},{"line_number":6220,"context_line":"                available_mdevs.add(mdev[\"uuid\"])"},{"line_number":6221,"context_line":""},{"line_number":6222,"context_line":"        available_mdevs -\u003d set(allocated_mdevs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_72149fe9","line":6219,"range":{"start_line":6218,"start_character":15,"end_line":6219,"end_character":34},"in_reply_to":"9fdfeff1_59ee6e22","updated":"2019-02-15 10:52:38.000000000","message":"\u003e This is pretty confusing to read. Unless parent\u003d\u0027\u0027 has special\n \u003e meaning, I think it would be the same to say:\n \u003e \n \u003e if parent is None or mdev[\u0027parent\u0027] \u003d\u003d parent:\n \u003e \n \u003e It\u0027s also more efficient :P\n\nI was tired... Done","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6f774548bb8ab8880279ceb6384c094fc9e0f10c","unresolved":false,"context_lines":[{"line_number":6219,"context_line":"                    or not parent):"},{"line_number":6220,"context_line":"                available_mdevs.add(mdev[\"uuid\"])"},{"line_number":6221,"context_line":""},{"line_number":6222,"context_line":"        available_mdevs -\u003d set(allocated_mdevs)"},{"line_number":6223,"context_line":"        return available_mdevs"},{"line_number":6224,"context_line":""},{"line_number":6225,"context_line":"    def _create_new_mediated_device(self, requested_types, uuid\u003dNone,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_79e4923c","line":6222,"range":{"start_line":6222,"start_character":8,"end_line":6222,"end_character":47},"updated":"2019-02-14 19:32:44.000000000","message":"could do this in the loop; but this is arguably clearer","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6f774548bb8ab8880279ceb6384c094fc9e0f10c","unresolved":false,"context_lines":[{"line_number":6245,"context_line":"            if device[\u0027types\u0027][asked_type][\u0027availableInstances\u0027] \u003e 0:"},{"line_number":6246,"context_line":"                # That physical GPU has enough room for a new mdev"},{"line_number":6247,"context_line":"                dev_name \u003d device[\u0027dev_id\u0027]"},{"line_number":6248,"context_line":"                if parent is not None and dev_name !\u003d parent:"},{"line_number":6249,"context_line":"                    # The device is not the one that was called, not creating"},{"line_number":6250,"context_line":"                    # the mdev"},{"line_number":6251,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_19cd46b6","line":6248,"range":{"start_line":6248,"start_character":19,"end_line":6248,"end_character":41},"updated":"2019-02-14 19:32:44.000000000","message":"Not needed.","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6f774548bb8ab8880279ceb6384c094fc9e0f10c","unresolved":false,"context_lines":[{"line_number":6284,"context_line":"        if len(vgpu_allocations) \u003e 1:"},{"line_number":6285,"context_line":"            LOG.warning(\u0027More than one allocation was passed over to libvirt \u0027"},{"line_number":6286,"context_line":"                        \u0027while at the moment libvirt only supports one. Only \u0027"},{"line_number":6287,"context_line":"                        \u0027the first allocation will be looked up.\u0027)"},{"line_number":6288,"context_line":"        rp_uuid, alloc \u003d six.next(six.iteritems(vgpu_allocations))"},{"line_number":6289,"context_line":"        vgpus_asked \u003d alloc[\u0027resources\u0027][rc_fields.ResourceClass.VGPU]"},{"line_number":6290,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_195b06f6","line":6287,"range":{"start_line":6287,"start_character":29,"end_line":6287,"end_character":45},"updated":"2019-02-14 19:32:44.000000000","message":"except \"first\" is nondeterministic because vgpu_allocations is a dict.\n\nI should have kept up with [1]; surely I would have noticed this :(\n\n[1] Ibf210dd27972fed2651d6c9bd73a0bcf352c8bab","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6f774548bb8ab8880279ceb6384c094fc9e0f10c","unresolved":false,"context_lines":[{"line_number":6285,"context_line":"            LOG.warning(\u0027More than one allocation was passed over to libvirt \u0027"},{"line_number":6286,"context_line":"                        \u0027while at the moment libvirt only supports one. Only \u0027"},{"line_number":6287,"context_line":"                        \u0027the first allocation will be looked up.\u0027)"},{"line_number":6288,"context_line":"        rp_uuid, alloc \u003d six.next(six.iteritems(vgpu_allocations))"},{"line_number":6289,"context_line":"        vgpus_asked \u003d alloc[\u0027resources\u0027][rc_fields.ResourceClass.VGPU]"},{"line_number":6290,"context_line":""},{"line_number":6291,"context_line":"        # Find if we allocated against a specific pGPU (and then the allocation"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_9914d6ea","line":6288,"range":{"start_line":6288,"start_character":8,"end_line":6288,"end_character":66},"updated":"2019-02-14 19:32:44.000000000","message":"This is pretty bizarre. But I guess it\u0027s as good as any other way of picking an arbitrary item out of a dict.","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6f774548bb8ab8880279ceb6384c094fc9e0f10c","unresolved":false,"context_lines":[{"line_number":6302,"context_line":"            # There can be multiple roots, we need to find the root name"},{"line_number":6303,"context_line":"            # to guess the physical device name"},{"line_number":6304,"context_line":"            for root in self.provider_tree.roots:"},{"line_number":6305,"context_line":"                if root.name in rp_name:"},{"line_number":6306,"context_line":"                    # The RP name convention is :"},{"line_number":6307,"context_line":"                    #    root_name + \u0027_\u0027 + parent_device"},{"line_number":6308,"context_line":"                    parent_device \u003d rp_name[len(root.name)+1:]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_79c33239","line":6305,"range":{"start_line":6305,"start_character":19,"end_line":6305,"end_character":28},"updated":"2019-02-14 19:32:44.000000000","message":"This could be safer as:\n\n if rp_name.startswith(root.name + \u0027_\u0027):\n\nUnless we can predict how many underscores are in the root.name or parent_device portions of the rp name (or otherwise ensure a deterministic format), in which case we could split() it and get it perfect.","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d82a1bc34efb94a0b89226b49a85816b38b8e008","unresolved":false,"context_lines":[{"line_number":6302,"context_line":"            # There can be multiple roots, we need to find the root name"},{"line_number":6303,"context_line":"            # to guess the physical device name"},{"line_number":6304,"context_line":"            for root in self.provider_tree.roots:"},{"line_number":6305,"context_line":"                if root.name in rp_name:"},{"line_number":6306,"context_line":"                    # The RP name convention is :"},{"line_number":6307,"context_line":"                    #    root_name + \u0027_\u0027 + parent_device"},{"line_number":6308,"context_line":"                    parent_device \u003d rp_name[len(root.name)+1:]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_d2b30b09","line":6305,"range":{"start_line":6305,"start_character":19,"end_line":6305,"end_character":28},"in_reply_to":"9fdfeff1_79c33239","updated":"2019-02-15 10:52:38.000000000","message":"Unfortunately no. Also, the libvirt PCI device name has a lot of underscores...\nSo, either we do it or we try to use another sep.","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6f774548bb8ab8880279ceb6384c094fc9e0f10c","unresolved":false,"context_lines":[{"line_number":6308,"context_line":"                    parent_device \u003d rp_name[len(root.name)+1:]"},{"line_number":6309,"context_line":"                    break"},{"line_number":6310,"context_line":"            else:"},{"line_number":6311,"context_line":"                # We f... have no idea what was the parent device"},{"line_number":6312,"context_line":"                parent_device \u003d None"},{"line_number":6313,"context_line":""},{"line_number":6314,"context_line":"        requested_types \u003d self._get_supported_vgpu_types()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_f90ba279","line":6311,"range":{"start_line":6311,"start_character":21,"end_line":6311,"end_character":26},"updated":"2019-02-14 19:32:44.000000000","message":"is this not an f... exception?","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6f774548bb8ab8880279ceb6384c094fc9e0f10c","unresolved":false,"context_lines":[{"line_number":6662,"context_line":""},{"line_number":6663,"context_line":"        # Now that we updated the ProviderTree, we want to store it locally"},{"line_number":6664,"context_line":"        # so that spawn() or other methods can access it thru a getter"},{"line_number":6665,"context_line":"        self._provider_tree \u003d copy.deepcopy(provider_tree)"},{"line_number":6666,"context_line":""},{"line_number":6667,"context_line":"    def get_available_resource(self, nodename):"},{"line_number":6668,"context_line":"        \"\"\"Retrieve resource information."}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_190f8688","line":6665,"range":{"start_line":6665,"start_character":8,"end_line":6665,"end_character":58},"updated":"2019-02-14 19:32:44.000000000","message":"And this also isn\u0027t bouncing on that lock, huh?\n\nNeed to get to the bottom of this.\n\n[Later] Figured it out. eventlet.monkey_patch replaces thread with eventlet.green.thread. The former blows up when you try to copy it; the latter does not. And the latter is doing the right thing by creating a new semaphore. http://paste.openstack.org/show/745119/","commit_id":"cd2fe293354b617e17909001c0ce8bee3b27532d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d52936b6866f222ce990a8656e21e2f757609c33","unresolved":false,"context_lines":[{"line_number":6305,"context_line":"                    break"},{"line_number":6306,"context_line":"            else:"},{"line_number":6307,"context_line":"                # We f... have no idea what was the parent device"},{"line_number":6308,"context_line":"                # If we can\u0027t find devices having available VGPUs, just raise"},{"line_number":6309,"context_line":"                raise exception.ComputeResourcesUnavailable("},{"line_number":6310,"context_line":"                    reason\u003d\u0027vGPU resource is not available\u0027)"},{"line_number":6311,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_21bd63b6","line":6308,"updated":"2019-02-15 15:22:48.000000000","message":"We should log that we expected to find the pgpu in a child provider with name %(rp_name)s. If this exception winds up in the user\u0027s face, do it as a separate log message; otherwise include it in the exception text itself.","commit_id":"1bb006516ecf68c4d43884780dfef748da8cfb46"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c326d3b36bafe04e77db9d27f134affafc514102","unresolved":false,"context_lines":[{"line_number":6305,"context_line":"                    break"},{"line_number":6306,"context_line":"            else:"},{"line_number":6307,"context_line":"                # We f... have no idea what was the parent device"},{"line_number":6308,"context_line":"                # If we can\u0027t find devices having available VGPUs, just raise"},{"line_number":6309,"context_line":"                raise exception.ComputeResourcesUnavailable("},{"line_number":6310,"context_line":"                    reason\u003d\u0027vGPU resource is not available\u0027)"},{"line_number":6311,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_57b14543","line":6308,"in_reply_to":"9fdfeff1_21bd63b6","updated":"2019-02-15 16:18:56.000000000","message":"Unless the PCI device disappears, we shouldn\u0027t really have an error here. Honestly, I just wanted to make sure we provide a better exception rather than returning an AttributeError.\n\nBut sure, I can add a warning here.","commit_id":"1bb006516ecf68c4d43884780dfef748da8cfb46"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d52936b6866f222ce990a8656e21e2f757609c33","unresolved":false,"context_lines":[{"line_number":6307,"context_line":"                # We f... have no idea what was the parent device"},{"line_number":6308,"context_line":"                # If we can\u0027t find devices having available VGPUs, just raise"},{"line_number":6309,"context_line":"                raise exception.ComputeResourcesUnavailable("},{"line_number":6310,"context_line":"                    reason\u003d\u0027vGPU resource is not available\u0027)"},{"line_number":6311,"context_line":""},{"line_number":6312,"context_line":"        requested_types \u003d self._get_supported_vgpu_types()"},{"line_number":6313,"context_line":"        # Which mediated devices are created but not assigned to a guest ?"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_a1915354","line":6310,"range":{"start_line":6310,"start_character":28,"end_line":6310,"end_character":58},"updated":"2019-02-15 15:22:48.000000000","message":"does this need to be translated?","commit_id":"1bb006516ecf68c4d43884780dfef748da8cfb46"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c326d3b36bafe04e77db9d27f134affafc514102","unresolved":false,"context_lines":[{"line_number":6307,"context_line":"                # We f... have no idea what was the parent device"},{"line_number":6308,"context_line":"                # If we can\u0027t find devices having available VGPUs, just raise"},{"line_number":6309,"context_line":"                raise exception.ComputeResourcesUnavailable("},{"line_number":6310,"context_line":"                    reason\u003d\u0027vGPU resource is not available\u0027)"},{"line_number":6311,"context_line":""},{"line_number":6312,"context_line":"        requested_types \u003d self._get_supported_vgpu_types()"},{"line_number":6313,"context_line":"        # Which mediated devices are created but not assigned to a guest ?"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_376121d4","line":6310,"range":{"start_line":6310,"start_character":28,"end_line":6310,"end_character":58},"in_reply_to":"9fdfeff1_a1915354","updated":"2019-02-15 16:18:56.000000000","message":"Nope, we return an ERROR to the user so it doesn\u0027t need to be translated given the few resources the i18n team has.\n\nAlso, see L6328.","commit_id":"1bb006516ecf68c4d43884780dfef748da8cfb46"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2c0eedb68a43c9e58c216fc901fbdb164f33c0d3","unresolved":false,"context_lines":[{"line_number":6316,"context_line":"                    break"},{"line_number":6317,"context_line":"            else:"},{"line_number":6318,"context_line":"                LOG.warning(\"pGPU device name %(name)s can\u0027t be guessed from \""},{"line_number":6319,"context_line":"                            \"the ProviderTree \""},{"line_number":6320,"context_line":"                            \"roots %(roots)s\", {\u0027name\u0027: rp_name,"},{"line_number":6321,"context_line":"                                                 \u0027roots\u0027: roots})"},{"line_number":6322,"context_line":"                # We f... have no idea what was the parent device"},{"line_number":6323,"context_line":"                # If we can\u0027t find devices having available VGPUs, just raise"},{"line_number":6324,"context_line":"                raise exception.ComputeResourcesUnavailable("}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_93750a35","line":6321,"range":{"start_line":6319,"start_character":47,"end_line":6321,"end_character":65},"updated":"2019-02-21 22:51:52.000000000","message":"weird spacing","commit_id":"2fa9f42ca71e03eaa2c5b9be31624e367d862c77"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ef3e9348f65ae3de67a991246e370e5b34ea2207","unresolved":false,"context_lines":[{"line_number":583,"context_line":"        # FIXME(sbauza): We blindly recreate mediated devices without checking"},{"line_number":584,"context_line":"        # which ResourceProvider was allocated for the instance so it would use"},{"line_number":585,"context_line":"        # another pGPU."},{"line_number":586,"context_line":"        # TODO(sbauza): Pass all instances\u0027 allocations here."},{"line_number":587,"context_line":"        mdevs \u003d self._get_all_assigned_mediated_devices()"},{"line_number":588,"context_line":"        requested_types \u003d self._get_supported_vgpu_types()"},{"line_number":589,"context_line":"        for (mdev_uuid, instance_uuid) in six.iteritems(mdevs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_4bb52631","line":586,"updated":"2019-02-28 13:57:39.000000000","message":"Are mdev UUIDs guaranteed to be consistent across reboots?\n\nAn alternate solution -- as opposed to passing the allocation information in init_host() -- would be to have the virt driver look up the instance UUID -\u003e resource provider UUID(s) in the libvirt.xml file for the instance.\n\nhttps://libvirt.org/formatdomain.html#elementsHostDev\n\nAre we creating a \u003chostdev\u003e element in the \u003cdevices\u003e section of the libvirt XML file for each mdev associated with a vGPU the instance is using? If not, can we do that?","commit_id":"2d00da78d5799c9d47fff8ab5fbd68f43ed35b35"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"428435a0fd5630badefb06e64a6834d0c7074b99","unresolved":false,"context_lines":[{"line_number":6192,"context_line":"            if device[\u0027types\u0027][asked_type][\u0027availableInstances\u0027] \u003e 0:"},{"line_number":6193,"context_line":"                # That physical GPU has enough room for a new mdev"},{"line_number":6194,"context_line":"                dev_name \u003d device[\u0027dev_id\u0027]"},{"line_number":6195,"context_line":"                # the parent attribute can be None"},{"line_number":6196,"context_line":"                if parent is not None and dev_name !\u003d parent:"},{"line_number":6197,"context_line":"                    # The device is not the one that was called, not creating"},{"line_number":6198,"context_line":"                    # the mdev"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_ea6f428f","line":6195,"range":{"start_line":6195,"start_character":16,"end_line":6195,"end_character":50},"updated":"2019-02-28 02:57:25.000000000","message":"nit: this is obvious and doesn\u0027t require a comment","commit_id":"2d00da78d5799c9d47fff8ab5fbd68f43ed35b35"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"428435a0fd5630badefb06e64a6834d0c7074b99","unresolved":false,"context_lines":[{"line_number":6237,"context_line":"        vgpus_asked \u003d alloc[\u0027resources\u0027][orc.VGPU]"},{"line_number":6238,"context_line":""},{"line_number":6239,"context_line":"        # Find if we allocated against a specific pGPU (and then the allocation"},{"line_number":6240,"context_line":"        # is made against a child RP) or any pGPU (in case the VGPU inventory"},{"line_number":6241,"context_line":"        # is still on the root RP)"},{"line_number":6242,"context_line":"        try:"},{"line_number":6243,"context_line":"            allocated_rp \u003d self.provider_tree.data(rp_uuid)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_aa65bab0","line":6240,"range":{"start_line":6240,"start_character":10,"end_line":6240,"end_character":37},"updated":"2019-02-28 02:57:25.000000000","message":"A bit of time traveling here but OK.","commit_id":"2d00da78d5799c9d47fff8ab5fbd68f43ed35b35"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"428435a0fd5630badefb06e64a6834d0c7074b99","unresolved":false,"context_lines":[{"line_number":6240,"context_line":"        # is made against a child RP) or any pGPU (in case the VGPU inventory"},{"line_number":6241,"context_line":"        # is still on the root RP)"},{"line_number":6242,"context_line":"        try:"},{"line_number":6243,"context_line":"            allocated_rp \u003d self.provider_tree.data(rp_uuid)"},{"line_number":6244,"context_line":"        except ValueError:"},{"line_number":6245,"context_line":"            # The provider doesn\u0027t exist, return a better understandable"},{"line_number":6246,"context_line":"            # exception"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_2a28ea30","line":6243,"updated":"2019-02-28 02:57:25.000000000","message":"So as of this change the rp_uuid will always be the ComputeNode resource provider and if it\u0027s not in the local ProviderTree cache that was initialized on startup we don\u0027t know about it - not really something that should happen, but I guess we\u0027re being paranoid.","commit_id":"2d00da78d5799c9d47fff8ab5fbd68f43ed35b35"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"428435a0fd5630badefb06e64a6834d0c7074b99","unresolved":false,"context_lines":[{"line_number":6244,"context_line":"        except ValueError:"},{"line_number":6245,"context_line":"            # The provider doesn\u0027t exist, return a better understandable"},{"line_number":6246,"context_line":"            # exception"},{"line_number":6247,"context_line":"            raise exception.ComputeResourcesUnavailable("},{"line_number":6248,"context_line":"                reason\u003d\u0027vGPU resource is not available\u0027)"},{"line_number":6249,"context_line":"        # TODO(sbauza): Remove this conditional in Train once all VGPU"},{"line_number":6250,"context_line":"        # inventories are related to a child RP"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_6ad7d224","line":6247,"range":{"start_line":6247,"start_character":28,"end_line":6247,"end_character":55},"updated":"2019-02-28 02:57:25.000000000","message":"nit: should probably document this in the docstring although I guess there were already cases in this method of raising this.","commit_id":"2d00da78d5799c9d47fff8ab5fbd68f43ed35b35"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"428435a0fd5630badefb06e64a6834d0c7074b99","unresolved":false,"context_lines":[{"line_number":6245,"context_line":"            # The provider doesn\u0027t exist, return a better understandable"},{"line_number":6246,"context_line":"            # exception"},{"line_number":6247,"context_line":"            raise exception.ComputeResourcesUnavailable("},{"line_number":6248,"context_line":"                reason\u003d\u0027vGPU resource is not available\u0027)"},{"line_number":6249,"context_line":"        # TODO(sbauza): Remove this conditional in Train once all VGPU"},{"line_number":6250,"context_line":"        # inventories are related to a child RP"},{"line_number":6251,"context_line":"        if allocated_rp.parent_uuid is None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_0aa88689","line":6248,"updated":"2019-02-28 02:57:25.000000000","message":"You\u0027re re-using this same reason throughout here, which is hard to debug - would be nice if you actually used a unique error message per exceptional case. But that could be a follow up.","commit_id":"2d00da78d5799c9d47fff8ab5fbd68f43ed35b35"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ef3e9348f65ae3de67a991246e370e5b34ea2207","unresolved":false,"context_lines":[{"line_number":6258,"context_line":"            roots \u003d self.provider_tree.roots"},{"line_number":6259,"context_line":"            for root in roots:"},{"line_number":6260,"context_line":"                if rp_name.startswith(root.name + \u0027_\u0027):"},{"line_number":6261,"context_line":"                    # The RP name convention is :"},{"line_number":6262,"context_line":"                    #    root_name + \u0027_\u0027 + parent_device"},{"line_number":6263,"context_line":"                    parent_device \u003d rp_name[len(root.name) + 1:]"},{"line_number":6264,"context_line":"                    break"},{"line_number":6265,"context_line":"            else:"},{"line_number":6266,"context_line":"                LOG.warning(\"pGPU device name %(name)s can\u0027t be guessed from \""},{"line_number":6267,"context_line":"                            \"the ProviderTree \""}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_ebf2da04","line":6264,"range":{"start_line":6261,"start_character":0,"end_line":6264,"end_character":25},"updated":"2019-02-28 13:57:39.000000000","message":"this is fragile, FYI. anyone can change the name of a resource provider in the placement service. As soon as that name changes, boom, this is broken...","commit_id":"2d00da78d5799c9d47fff8ab5fbd68f43ed35b35"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"428435a0fd5630badefb06e64a6834d0c7074b99","unresolved":false,"context_lines":[{"line_number":6266,"context_line":"                LOG.warning(\"pGPU device name %(name)s can\u0027t be guessed from \""},{"line_number":6267,"context_line":"                            \"the ProviderTree \""},{"line_number":6268,"context_line":"                            \"roots %(roots)s\", {\u0027name\u0027: rp_name,"},{"line_number":6269,"context_line":"                                                 \u0027roots\u0027: roots})"},{"line_number":6270,"context_line":"                # We f... have no idea what was the parent device"},{"line_number":6271,"context_line":"                # If we can\u0027t find devices having available VGPUs, just raise"},{"line_number":6272,"context_line":"                raise exception.ComputeResourcesUnavailable("}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_aa137a00","line":6269,"range":{"start_line":6269,"start_character":48,"end_line":6269,"end_character":49},"updated":"2019-02-28 02:57:25.000000000","message":"alignment","commit_id":"2d00da78d5799c9d47fff8ab5fbd68f43ed35b35"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"428435a0fd5630badefb06e64a6834d0c7074b99","unresolved":false,"context_lines":[{"line_number":6270,"context_line":"                # We f... have no idea what was the parent device"},{"line_number":6271,"context_line":"                # If we can\u0027t find devices having available VGPUs, just raise"},{"line_number":6272,"context_line":"                raise exception.ComputeResourcesUnavailable("},{"line_number":6273,"context_line":"                    reason\u003d\u0027vGPU resource is not available\u0027)"},{"line_number":6274,"context_line":""},{"line_number":6275,"context_line":"        requested_types \u003d self._get_supported_vgpu_types()"},{"line_number":6276,"context_line":"        # Which mediated devices are created but not assigned to a guest ?"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_2aab0a88","line":6273,"updated":"2019-02-28 02:57:25.000000000","message":"same","commit_id":"2d00da78d5799c9d47fff8ab5fbd68f43ed35b35"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"428435a0fd5630badefb06e64a6834d0c7074b99","unresolved":false,"context_lines":[{"line_number":6289,"context_line":"            if not chosen_mdev:"},{"line_number":6290,"context_line":"                # If we can\u0027t find devices having available VGPUs, just raise"},{"line_number":6291,"context_line":"                raise exception.ComputeResourcesUnavailable("},{"line_number":6292,"context_line":"                    reason\u003d\u0027vGPU resource is not available\u0027)"},{"line_number":6293,"context_line":"            else:"},{"line_number":6294,"context_line":"                chosen_mdevs.append(chosen_mdev)"},{"line_number":6295,"context_line":"        return chosen_mdevs"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_ea90a250","line":6292,"updated":"2019-02-28 02:57:25.000000000","message":"ditto","commit_id":"2d00da78d5799c9d47fff8ab5fbd68f43ed35b35"}]}
