)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"243c423955acb6fa015ea3081b05ce1cbc6a5bf8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"955c2b2f_bc688e9e","updated":"2023-11-01 14:05:19.000000000","message":"A couple nit comments, but I\u0027m lacking some understanding here about why we\u0027re in this situation so I can\u0027t really comment on the strawman.","commit_id":"cd84c465869b3ae429de661f48096c8a469e7350"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"94b4298e590e446fffc2907678b508c5775610bf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"fcee3cc7_f11052cc","updated":"2023-11-14 18:38:58.000000000","message":"i need to review this properly but ill try and take a look tomorrow","commit_id":"7a46a7c8af2395f510a202b88e514ed537acec88"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d4c2fc8f9683eb41da08317a5cfd79f3d4bb1309","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"184e74a0_91ce6047","updated":"2023-12-14 08:16:16.000000000","message":"recheck nova-lvm timeout failure again","commit_id":"cf62996d2d7e54fd8b61526bf70835836ee671c8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fbe8fd09f9802ad3d86d14473ff77238fb9e3d64","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"c5100df2_f8b58b7e","updated":"2023-12-11 14:37:25.000000000","message":"recheck unrelated issue on nova-lvm about snapshot not found","commit_id":"cf62996d2d7e54fd8b61526bf70835836ee671c8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7b3c1f93f804b827f64b6678dde20d5ec921d066","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"14c425bd_fd30e9ea","updated":"2024-01-19 11:05:36.000000000","message":"My comment were addressed. I see two discussion from Sean and Dan about the counting. So I hold my +2 until one of them confirms that discussion is resolved as well.","commit_id":"931521d2f8b98f4b87583317e0fff483b976acd3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"aba7948a517769a79faaf60bd2d79e4b729b4d46","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"8e1ec708_9bbbd730","updated":"2024-02-23 12:08:38.000000000","message":"lets hold this after feature freeze since its a bug and will be in merge conflict with the mdev live migration series. but overall i think we can proceed with this so +2","commit_id":"931521d2f8b98f4b87583317e0fff483b976acd3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e5fe7831d14df7bf912a5a3bd6f5511a309e2d65","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"953bae3b_c5f6b723","updated":"2024-01-19 14:37:33.000000000","message":"recheck flavor not found for nova-live-migration job","commit_id":"931521d2f8b98f4b87583317e0fff483b976acd3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"954a1d46ed92a2449d8f61cab091f2e6efe0f3ea","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"207e586f_c91ade26","in_reply_to":"14c425bd_fd30e9ea","updated":"2024-01-19 14:36:26.000000000","message":"That series changed so much between patchsets... Dan was having a question about what we count for the inventory (ie. available_instances + the number of mdevs).\n\nI think nothing really changes here, we will just make sure we can\u0027t create (or have) more than N mdevs when we restart.","commit_id":"931521d2f8b98f4b87583317e0fff483b976acd3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"dd929456917911df904fc6d2f4ff546f2ae5c69c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"ee8d4ca3_c7adad1a","updated":"2024-03-14 11:57:32.000000000","message":"My comments were fixed and Sean is +2 after https://review.opendev.org/c/openstack/nova/+/899625/11#message-c3edab5a61f5dfcfc1297e2891ace5d742185f6a resolved so I\u0027m OK to land it.","commit_id":"60851e44649e463bfda25d9dea84443467e4a30c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c027e55a1adc748a4b949094a89a410d83c4ac79","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"7f1737bd_22875be5","updated":"2024-03-15 14:54:41.000000000","message":"The fail was volume-related, but BFV. There are way too many tracebacks in the n-cpu log. Some of them may be expected, but we really need to get a handle on that stuff :(","commit_id":"60851e44649e463bfda25d9dea84443467e4a30c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b4452906597e76518d20f28409b0078d0b83a898","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"bd280b68_008c2d3c","updated":"2024-03-14 11:46:03.000000000","message":"i think this still looks good to me so readding my +2","commit_id":"60851e44649e463bfda25d9dea84443467e4a30c"},{"author":{"_account_id":17685,"name":"Elod Illes","email":"elod.illes@est.tech","username":"elod.illes"},"change_message_id":"4aea8e09f8f877b93a43573ae4374373ef2e1b8d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"6bd300f1_5fea9c93","updated":"2024-03-16 08:04:08.000000000","message":"recheck - nova-multi-cell job failed - guest kernel panic","commit_id":"60851e44649e463bfda25d9dea84443467e4a30c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"71f6d7b5973a423ce1e2a974ba3b9f93d3b4a0c3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"2dcb2abd_c7eba406","updated":"2024-03-15 14:20:39.000000000","message":"recheck fucking nova-ceph-multistore again","commit_id":"60851e44649e463bfda25d9dea84443467e4a30c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1d24a25d7933fc534d2b6c608a0031d80ebc5d7e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"79e385f0_bd96e398","updated":"2024-03-14 15:09:12.000000000","message":"recheck kernel guest panic","commit_id":"60851e44649e463bfda25d9dea84443467e4a30c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"279d50e97a2b34cd3dc132a4f916e9e65c248aa0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"d01be87d_a022a872","updated":"2024-03-18 08:31:29.000000000","message":"recheck kernel guest panic on multi-cell","commit_id":"60851e44649e463bfda25d9dea84443467e4a30c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1644a80ec9f5b777f52edbdd0ae7cefeafc6abaa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"f14148f7_4a392fff","updated":"2024-03-15 08:20:18.000000000","message":"recheck openstacksdk timeout on volume attachment","commit_id":"60851e44649e463bfda25d9dea84443467e4a30c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ffd2b3a7a9d2fab41cd42fccf34db7b95cfdaa2f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"69cbf7cb_7d7cc4a4","updated":"2024-03-05 13:39:27.000000000","message":"recheck post-failure on live-migration-ceph","commit_id":"60851e44649e463bfda25d9dea84443467e4a30c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"9d17fb489fb7450eda3b21079aed05bb9ce98979","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"668dfd8e_9913bd72","updated":"2024-03-15 16:32:07.000000000","message":"recheck read timeout on multicell 😭","commit_id":"60851e44649e463bfda25d9dea84443467e4a30c"}],"nova/conf/devices.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3f327d6ce9b0a5513cc6b6eac3ede99bed1459f4","unresolved":true,"context_lines":[{"line_number":94,"context_line":"        max_inst_opt \u003d cfg.IntOpt("},{"line_number":95,"context_line":"            \u0027max_instances\u0027,"},{"line_number":96,"context_line":"            default\u003dNone,"},{"line_number":97,"context_line":"            help\u003d\u0027Number of mediated devices that type can create.\u0027)"},{"line_number":98,"context_line":"        conf.register_opt(max_inst_opt, group\u003d\u0027mdev_%s\u0027 % mdev_type)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"8f43e6e2_6f66fc95","line":97,"updated":"2023-11-22 17:46:25.000000000","message":"Does None means no limit? Please describe in the doc.","commit_id":"70b22b3a800ddb178dfa82ae722d4d24e6361877"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"28e03b9f45b301b1cdfd54a6421dc5e0deeedf16","unresolved":true,"context_lines":[{"line_number":94,"context_line":"        max_inst_opt \u003d cfg.IntOpt("},{"line_number":95,"context_line":"            \u0027max_instances\u0027,"},{"line_number":96,"context_line":"            default\u003dNone,"},{"line_number":97,"context_line":"            help\u003d\u0027Number of mediated devices that type can create.\u0027)"},{"line_number":98,"context_line":"        conf.register_opt(max_inst_opt, group\u003d\u0027mdev_%s\u0027 % mdev_type)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"faf8520a_cc32fbf2","line":97,"in_reply_to":"20726e72_6bcf08d3","updated":"2023-12-14 13:47:45.000000000","message":"Good call, I\u0027ll change it.","commit_id":"70b22b3a800ddb178dfa82ae722d4d24e6361877"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"17514af074caf17c5ce53daba4bd5f8f5f200158","unresolved":true,"context_lines":[{"line_number":94,"context_line":"        max_inst_opt \u003d cfg.IntOpt("},{"line_number":95,"context_line":"            \u0027max_instances\u0027,"},{"line_number":96,"context_line":"            default\u003dNone,"},{"line_number":97,"context_line":"            help\u003d\u0027Number of mediated devices that type can create.\u0027)"},{"line_number":98,"context_line":"        conf.register_opt(max_inst_opt, group\u003d\u0027mdev_%s\u0027 % mdev_type)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"20726e72_6bcf08d3","line":97,"in_reply_to":"8f43e6e2_6f66fc95","updated":"2023-12-14 13:40:50.000000000","message":"This question is still open.","commit_id":"70b22b3a800ddb178dfa82ae722d4d24e6361877"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7f81eddb44ce816f7957e580ea60c558e64d914d","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        max_inst_opt \u003d cfg.IntOpt("},{"line_number":95,"context_line":"            \u0027max_instances\u0027,"},{"line_number":96,"context_line":"            default\u003dNone,"},{"line_number":97,"context_line":"            help\u003d\u0027Number of mediated devices that type can create.\u0027)"},{"line_number":98,"context_line":"        conf.register_opt(max_inst_opt, group\u003d\u0027mdev_%s\u0027 % mdev_type)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"422475ba_3d8078f2","line":97,"in_reply_to":"faf8520a_cc32fbf2","updated":"2024-01-19 10:45:34.000000000","message":"Done","commit_id":"70b22b3a800ddb178dfa82ae722d4d24e6361877"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"aba7948a517769a79faaf60bd2d79e4b729b4d46","unresolved":true,"context_lines":[{"line_number":93,"context_line":"        max_inst_opt \u003d cfg.IntOpt("},{"line_number":94,"context_line":"            \u0027max_instances\u0027,"},{"line_number":95,"context_line":"            default\u003dNone,"},{"line_number":96,"context_line":"            help\u003d\u0027Number of mediated devices that type can create. \u0027"},{"line_number":97,"context_line":"                 \u0027If not set, it implies that we use the maximum allowed by \u0027"},{"line_number":98,"context_line":"                 \u0027the type.\u0027)"},{"line_number":99,"context_line":"        conf.register_opt(max_inst_opt, group\u003d\u0027mdev_%s\u0027 % mdev_type)"}],"source_content_type":"text/x-python","patch_set":10,"id":"773de76b_f9dd6a8c","line":96,"updated":"2024-02-23 12:08:38.000000000","message":"this shoudl have min\u003d1\n\nwe dont want negitive number \n\nwe could ahve min\u003d0 if we want to have 0 mean no limit but you are using None for that right now\n\ni dont really have a prefernce btween 0 and None here for no limit but we  should exclude negative numbers.","commit_id":"931521d2f8b98f4b87583317e0fff483b976acd3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1816fc80353b39d621192a99ef055f8ad862a66e","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        max_inst_opt \u003d cfg.IntOpt("},{"line_number":94,"context_line":"            \u0027max_instances\u0027,"},{"line_number":95,"context_line":"            default\u003dNone,"},{"line_number":96,"context_line":"            help\u003d\u0027Number of mediated devices that type can create. \u0027"},{"line_number":97,"context_line":"                 \u0027If not set, it implies that we use the maximum allowed by \u0027"},{"line_number":98,"context_line":"                 \u0027the type.\u0027)"},{"line_number":99,"context_line":"        conf.register_opt(max_inst_opt, group\u003d\u0027mdev_%s\u0027 % mdev_type)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5913aec4_f1d9b1f7","line":96,"in_reply_to":"773de76b_f9dd6a8c","updated":"2024-03-05 10:48:05.000000000","message":"Done","commit_id":"931521d2f8b98f4b87583317e0fff483b976acd3"}],"nova/conf/workarounds.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"243c423955acb6fa015ea3081b05ce1cbc6a5bf8","unresolved":true,"context_lines":[{"line_number":462,"context_line":"new Nova instance."},{"line_number":463,"context_line":"\"\"\"),"},{"line_number":464,"context_line":"    cfg.BoolOpt("},{"line_number":465,"context_line":"        \u0027update_resources_after_instance_action\u0027,"},{"line_number":466,"context_line":"        default\u003dFalse,"},{"line_number":467,"context_line":"        help\u003d\"\"\""},{"line_number":468,"context_line":"When this is enabled, it will automically update the scheduling resources after"}],"source_content_type":"text/x-python","patch_set":3,"id":"d9823801_e8e9a052","line":465,"updated":"2023-11-01 14:05:19.000000000","message":"This does not feel like a workaround parameter to me. Originally these were all supposed to be temporary \"workarounds\" to fix behaviors that were going to be fixed later in libvirt or other things outside our control, or as backport hacks. I know we\u0027ve strayed from that vision, but this feels like a clear violation of that with no plan to remove it in the future right?","commit_id":"cd84c465869b3ae429de661f48096c8a469e7350"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"243c423955acb6fa015ea3081b05ce1cbc6a5bf8","unresolved":true,"context_lines":[{"line_number":465,"context_line":"        \u0027update_resources_after_instance_action\u0027,"},{"line_number":466,"context_line":"        default\u003dFalse,"},{"line_number":467,"context_line":"        help\u003d\"\"\""},{"line_number":468,"context_line":"When this is enabled, it will automically update the scheduling resources after"},{"line_number":469,"context_line":"ether creating an instance or moving it."},{"line_number":470,"context_line":"\"\"\"),"},{"line_number":471,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"a5f7265a_10d32fc7","line":468,"range":{"start_line":468,"start_character":30,"end_line":468,"end_character":41},"updated":"2023-11-01 14:05:19.000000000","message":"not sure if this should be \"automatically\" or \"atomically\"","commit_id":"cd84c465869b3ae429de661f48096c8a469e7350"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"243c423955acb6fa015ea3081b05ce1cbc6a5bf8","unresolved":true,"context_lines":[{"line_number":466,"context_line":"        default\u003dFalse,"},{"line_number":467,"context_line":"        help\u003d\"\"\""},{"line_number":468,"context_line":"When this is enabled, it will automically update the scheduling resources after"},{"line_number":469,"context_line":"ether creating an instance or moving it."},{"line_number":470,"context_line":"\"\"\"),"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"bdee6c4f_851bfce7","line":469,"range":{"start_line":469,"start_character":0,"end_line":469,"end_character":5},"updated":"2023-11-01 14:05:19.000000000","message":"\"either\"","commit_id":"cd84c465869b3ae429de661f48096c8a469e7350"}],"nova/tests/functional/libvirt/test_vgpu.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7b3c1f93f804b827f64b6678dde20d5ec921d066","unresolved":true,"context_lines":[{"line_number":504,"context_line":"        self.assertIn("},{"line_number":505,"context_line":"            \"No resource provider with uuid %s found\" % physdev1_rp_uuid,"},{"line_number":506,"context_line":"            provider[\u0027errors\u0027][0][\u0027detail\u0027])"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"class DifferentMdevClassesTests(VGPUTestBase):"},{"line_number":510,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"500c4fa1_7f17dc88","line":507,"updated":"2024-01-19 11:05:36.000000000","message":"Nice test!","commit_id":"cf62996d2d7e54fd8b61526bf70835836ee671c8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"954a1d46ed92a2449d8f61cab091f2e6efe0f3ea","unresolved":false,"context_lines":[{"line_number":504,"context_line":"        self.assertIn("},{"line_number":505,"context_line":"            \"No resource provider with uuid %s found\" % physdev1_rp_uuid,"},{"line_number":506,"context_line":"            provider[\u0027errors\u0027][0][\u0027detail\u0027])"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"class DifferentMdevClassesTests(VGPUTestBase):"},{"line_number":510,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"c6312bdb_df6d95ef","line":507,"in_reply_to":"500c4fa1_7f17dc88","updated":"2024-01-19 14:36:26.000000000","message":"Acknowledged","commit_id":"cf62996d2d7e54fd8b61526bf70835836ee671c8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"aba7948a517769a79faaf60bd2d79e4b729b4d46","unresolved":true,"context_lines":[{"line_number":133,"context_line":"                    # either 8 or 16."},{"line_number":134,"context_line":"                    self.assertIn(inventory[orc.VGPU][\u0027total\u0027], [8, 16])"},{"line_number":135,"context_line":"                else:"},{"line_number":136,"context_line":"                    # we only support the first one so the inventory is only 16"},{"line_number":137,"context_line":"                    self.assertEqual(16, inventory[orc.VGPU][\u0027total\u0027])"},{"line_number":138,"context_line":"                self.assertEqual(0, usage[orc.VGPU])"},{"line_number":139,"context_line":"        # Since we haven\u0027t created any mdevs yet, we shouldn\u0027t find them"}],"source_content_type":"text/x-python","patch_set":10,"id":"d1eba3c3_5c611d88","line":136,"updated":"2024-02-23 12:08:38.000000000","message":"this is a littel britlle but ok \nwe might need to make start_compute_with_vgpu take a data stucure \n\n[{pgpu: address, type: \u0027mdev-1\u0027, ammount:16},...]\n\nor something similar if we need more complext topologeis in the future but\nthis works for now","commit_id":"931521d2f8b98f4b87583317e0fff483b976acd3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1816fc80353b39d621192a99ef055f8ad862a66e","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                    # either 8 or 16."},{"line_number":134,"context_line":"                    self.assertIn(inventory[orc.VGPU][\u0027total\u0027], [8, 16])"},{"line_number":135,"context_line":"                else:"},{"line_number":136,"context_line":"                    # we only support the first one so the inventory is only 16"},{"line_number":137,"context_line":"                    self.assertEqual(16, inventory[orc.VGPU][\u0027total\u0027])"},{"line_number":138,"context_line":"                self.assertEqual(0, usage[orc.VGPU])"},{"line_number":139,"context_line":"        # Since we haven\u0027t created any mdevs yet, we shouldn\u0027t find them"}],"source_content_type":"text/x-python","patch_set":10,"id":"0a7d6727_e6b5563e","line":136,"in_reply_to":"d1eba3c3_5c611d88","updated":"2024-03-05 10:48:05.000000000","message":"Acknowledged","commit_id":"931521d2f8b98f4b87583317e0fff483b976acd3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b4452906597e76518d20f28409b0078d0b83a898","unresolved":true,"context_lines":[{"line_number":456,"context_line":"                   group\u003d\u0027mdev_nvidia-12\u0027)"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"        # Start the compute by supporting both types"},{"line_number":459,"context_line":"        pci_info \u003d fakelibvirt.HostPCIDevicesInfo("},{"line_number":460,"context_line":"            num_pci\u003d0, num_pfs\u003d0, num_vfs\u003d0, num_mdevcap\u003d2,"},{"line_number":461,"context_line":"            multiple_gpu_types\u003dTrue)"},{"line_number":462,"context_line":"        self.compute1 \u003d self.start_compute_with_vgpu(\u0027host1\u0027, pci_info)"}],"source_content_type":"text/x-python","patch_set":11,"id":"35c1e2af_8ed17d70","line":459,"updated":"2024-03-14 11:46:03.000000000","message":"+1 for extending this fake object to carry the multiple_gpu_types flag","commit_id":"60851e44649e463bfda25d9dea84443467e4a30c"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"243c423955acb6fa015ea3081b05ce1cbc6a5bf8","unresolved":true,"context_lines":[{"line_number":9114,"context_line":"                if provider_tree.exists(pgpu_rp_name):"},{"line_number":9115,"context_line":"                    LOG.debug(\u0027Deleting %s resource provider since it does \u0027"},{"line_number":9116,"context_line":"                              \u0027not longer have any inventory\u0027, pgpu_rp_name)"},{"line_number":9117,"context_line":"                    provider_tree.remove(pgpu_rp_name)"},{"line_number":9118,"context_line":"                continue"},{"line_number":9119,"context_line":"            if not provider_tree.exists(pgpu_rp_name):"},{"line_number":9120,"context_line":"                # This is the first time creating the child provider so add"}],"source_content_type":"text/x-python","patch_set":3,"id":"acc22701_54a2b84e","line":9117,"updated":"2023-11-01 14:05:19.000000000","message":"This does seem like a lot of potential churn each time we go over or under the limit. I\u0027m definitely missing something about why we\u0027re needing to do this, but I\u0027ll follow up on IRC to try to understand.","commit_id":"cd84c465869b3ae429de661f48096c8a469e7350"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c00cb7c81de75f5a8e13557dd9ebb56849d79d79","unresolved":true,"context_lines":[{"line_number":9114,"context_line":"                if provider_tree.exists(pgpu_rp_name):"},{"line_number":9115,"context_line":"                    LOG.debug(\u0027Deleting %s resource provider since it does \u0027"},{"line_number":9116,"context_line":"                              \u0027not longer have any inventory\u0027, pgpu_rp_name)"},{"line_number":9117,"context_line":"                    provider_tree.remove(pgpu_rp_name)"},{"line_number":9118,"context_line":"                continue"},{"line_number":9119,"context_line":"            if not provider_tree.exists(pgpu_rp_name):"},{"line_number":9120,"context_line":"                # This is the first time creating the child provider so add"}],"source_content_type":"text/x-python","patch_set":3,"id":"6c03ce4b_f58da117","line":9117,"in_reply_to":"47d5deba_051c3712","updated":"2023-11-17 16:17:12.000000000","message":"Despite not run at init_host, periodics are called at the end of the service start by https://github.com/openstack/nova/blob/a507b12df11ee743f9874812b1525c53b295c655/nova/service.py#L208-L213","commit_id":"cd84c465869b3ae429de661f48096c8a469e7350"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"daef50d8014a8400d896112c56c6f391acfd6fa6","unresolved":true,"context_lines":[{"line_number":9114,"context_line":"                if provider_tree.exists(pgpu_rp_name):"},{"line_number":9115,"context_line":"                    LOG.debug(\u0027Deleting %s resource provider since it does \u0027"},{"line_number":9116,"context_line":"                              \u0027not longer have any inventory\u0027, pgpu_rp_name)"},{"line_number":9117,"context_line":"                    provider_tree.remove(pgpu_rp_name)"},{"line_number":9118,"context_line":"                continue"},{"line_number":9119,"context_line":"            if not provider_tree.exists(pgpu_rp_name):"},{"line_number":9120,"context_line":"                # This is the first time creating the child provider so add"}],"source_content_type":"text/x-python","patch_set":3,"id":"d3b74e0e_2360c5cb","line":9117,"in_reply_to":"6c03ce4b_f58da117","updated":"2023-11-17 16:22:08.000000000","message":"We\u0027re actually fine, we run update_available_resource on pre_start_hook() https://github.com/openstack/nova/blob/a507b12df11ee743f9874812b1525c53b295c655/nova/compute/manager.py#L1770-L1778\n\nSince pre_start_hook is called before we run the RPC target, no RPC calls going to the computes would arrive before we delete the no-longer used RPs.","commit_id":"cd84c465869b3ae429de661f48096c8a469e7350"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7f81eddb44ce816f7957e580ea60c558e64d914d","unresolved":false,"context_lines":[{"line_number":9114,"context_line":"                if provider_tree.exists(pgpu_rp_name):"},{"line_number":9115,"context_line":"                    LOG.debug(\u0027Deleting %s resource provider since it does \u0027"},{"line_number":9116,"context_line":"                              \u0027not longer have any inventory\u0027, pgpu_rp_name)"},{"line_number":9117,"context_line":"                    provider_tree.remove(pgpu_rp_name)"},{"line_number":9118,"context_line":"                continue"},{"line_number":9119,"context_line":"            if not provider_tree.exists(pgpu_rp_name):"},{"line_number":9120,"context_line":"                # This is the first time creating the child provider so add"}],"source_content_type":"text/x-python","patch_set":3,"id":"02b993a1_4919df46","line":9117,"in_reply_to":"9cfcdbb8_ec531ed7","updated":"2024-01-19 10:45:34.000000000","message":"Done","commit_id":"cd84c465869b3ae429de661f48096c8a469e7350"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"621aa7c437e83b153e2b5c8dfe39e3e698c78df8","unresolved":true,"context_lines":[{"line_number":9114,"context_line":"                if provider_tree.exists(pgpu_rp_name):"},{"line_number":9115,"context_line":"                    LOG.debug(\u0027Deleting %s resource provider since it does \u0027"},{"line_number":9116,"context_line":"                              \u0027not longer have any inventory\u0027, pgpu_rp_name)"},{"line_number":9117,"context_line":"                    provider_tree.remove(pgpu_rp_name)"},{"line_number":9118,"context_line":"                continue"},{"line_number":9119,"context_line":"            if not provider_tree.exists(pgpu_rp_name):"},{"line_number":9120,"context_line":"                # This is the first time creating the child provider so add"}],"source_content_type":"text/x-python","patch_set":3,"id":"47d5deba_051c3712","line":9117,"in_reply_to":"ab33db05_ec0545b6","updated":"2023-11-16 15:46:30.000000000","message":"This is still running periodically and not at init_host like we discussed, no?","commit_id":"cd84c465869b3ae429de661f48096c8a469e7350"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"94b4298e590e446fffc2907678b508c5775610bf","unresolved":true,"context_lines":[{"line_number":9114,"context_line":"                if provider_tree.exists(pgpu_rp_name):"},{"line_number":9115,"context_line":"                    LOG.debug(\u0027Deleting %s resource provider since it does \u0027"},{"line_number":9116,"context_line":"                              \u0027not longer have any inventory\u0027, pgpu_rp_name)"},{"line_number":9117,"context_line":"                    provider_tree.remove(pgpu_rp_name)"},{"line_number":9118,"context_line":"                continue"},{"line_number":9119,"context_line":"            if not provider_tree.exists(pgpu_rp_name):"},{"line_number":9120,"context_line":"                # This is the first time creating the child provider so add"}],"source_content_type":"text/x-python","patch_set":3,"id":"ab33db05_ec0545b6","line":9117,"in_reply_to":"acc22701_54a2b84e","updated":"2023-11-14 18:38:58.000000000","message":"i think the answer to why this is less impactful is that we never delete the mdevs once allcoated\n\nso as a result only powercycle  of the host would result in the inventories gettign recreated once we hit the limit\n\nbut use it would be a lot of churn otherwise.","commit_id":"cd84c465869b3ae429de661f48096c8a469e7350"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e9cff7c468ee019ddb6f5379fa685b9fa0b708a3","unresolved":true,"context_lines":[{"line_number":9114,"context_line":"                if provider_tree.exists(pgpu_rp_name):"},{"line_number":9115,"context_line":"                    LOG.debug(\u0027Deleting %s resource provider since it does \u0027"},{"line_number":9116,"context_line":"                              \u0027not longer have any inventory\u0027, pgpu_rp_name)"},{"line_number":9117,"context_line":"                    provider_tree.remove(pgpu_rp_name)"},{"line_number":9118,"context_line":"                continue"},{"line_number":9119,"context_line":"            if not provider_tree.exists(pgpu_rp_name):"},{"line_number":9120,"context_line":"                # This is the first time creating the child provider so add"}],"source_content_type":"text/x-python","patch_set":3,"id":"9cfcdbb8_ec531ed7","line":9117,"in_reply_to":"d3b74e0e_2360c5cb","updated":"2023-11-20 13:05:47.000000000","message":"im not sure that was dans concern although perhaps it was.\ni would interpret there message as (this should not run in a perodic at all and only in init_host)\n\nand presumable it would run once when we allocate the final mdev.","commit_id":"cd84c465869b3ae429de661f48096c8a469e7350"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"621aa7c437e83b153e2b5c8dfe39e3e698c78df8","unresolved":true,"context_lines":[{"line_number":7973,"context_line":"                        self.pgpu_type_default \u003d vgpu_type"},{"line_number":7974,"context_line":"                    else:"},{"line_number":7975,"context_line":"                        msg \u003d (\"mdev type default already set to %s\","},{"line_number":7976,"context_line":"                               self.pgpu_type_default)"},{"line_number":7977,"context_line":"                        LOG.warning(msg)"},{"line_number":7978,"context_line":"                    continue"},{"line_number":7979,"context_line":"                if device_address in self.pgpu_type_mapping:"}],"source_content_type":"text/x-python","patch_set":4,"id":"a3416c26_e92cff83","line":7976,"updated":"2023-11-16 15:46:30.000000000","message":"This log message doesn\u0027t mean much to me and I suspect others will be similarly confused. You\u0027d hit this when? If you specify the same device address in two different `mdev_foo` sections?","commit_id":"7a46a7c8af2395f510a202b88e514ed537acec88"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c00cb7c81de75f5a8e13557dd9ebb56849d79d79","unresolved":false,"context_lines":[{"line_number":7973,"context_line":"                        self.pgpu_type_default \u003d vgpu_type"},{"line_number":7974,"context_line":"                    else:"},{"line_number":7975,"context_line":"                        msg \u003d (\"mdev type default already set to %s\","},{"line_number":7976,"context_line":"                               self.pgpu_type_default)"},{"line_number":7977,"context_line":"                        LOG.warning(msg)"},{"line_number":7978,"context_line":"                    continue"},{"line_number":7979,"context_line":"                if device_address in self.pgpu_type_mapping:"}],"source_content_type":"text/x-python","patch_set":4,"id":"c9e7a932_1209cdd2","line":7976,"in_reply_to":"a3416c26_e92cff83","updated":"2023-11-17 16:17:12.000000000","message":"Acknowledged","commit_id":"7a46a7c8af2395f510a202b88e514ed537acec88"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"621aa7c437e83b153e2b5c8dfe39e3e698c78df8","unresolved":true,"context_lines":[{"line_number":8132,"context_line":"        count_per_parent \u003d self._count_mediated_devices(enabled_mdev_types)"},{"line_number":8133,"context_line":"        for dev_name, count in count_per_parent.items():"},{"line_number":8134,"context_line":"            mdev_type \u003d self._get_vgpu_type_per_pgpu(dev_name)"},{"line_number":8135,"context_line":"            type_limit_mapping[mdev_type] +\u003d count"},{"line_number":8136,"context_line":"            inventories[dev_name] \u003d {\u0027total\u0027: count}"},{"line_number":8137,"context_line":"        # Filter how many available mdevs we can create for all the supported"},{"line_number":8138,"context_line":"        # types."}],"source_content_type":"text/x-python","patch_set":4,"id":"0d782b3e_0c8e3108","line":8135,"updated":"2023-11-16 15:46:30.000000000","message":"I\u0027m not quite sure what this is counting exactly, because you\u0027re adding count to this number again in the loop below. Is this counting parent devices and the thing below is VFs? Or maybe these are current devices and the loop below is adding available devices?","commit_id":"7a46a7c8af2395f510a202b88e514ed537acec88"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a3c3d1f0efffefd1c83569d25b06a5c230e0a8f8","unresolved":true,"context_lines":[{"line_number":8132,"context_line":"        count_per_parent \u003d self._count_mediated_devices(enabled_mdev_types)"},{"line_number":8133,"context_line":"        for dev_name, count in count_per_parent.items():"},{"line_number":8134,"context_line":"            mdev_type \u003d self._get_vgpu_type_per_pgpu(dev_name)"},{"line_number":8135,"context_line":"            type_limit_mapping[mdev_type] +\u003d count"},{"line_number":8136,"context_line":"            inventories[dev_name] \u003d {\u0027total\u0027: count}"},{"line_number":8137,"context_line":"        # Filter how many available mdevs we can create for all the supported"},{"line_number":8138,"context_line":"        # types."}],"source_content_type":"text/x-python","patch_set":4,"id":"299e19b5_e7cfcc6f","line":8135,"in_reply_to":"097a6338_457b9712","updated":"2023-11-21 14:18:18.000000000","message":"well,`count` here is the number of mdevs that the parent PCI device already has.\nFor example, if you create 2 mdevs before, `count` will be 2.\n\nThen, by line 8148, `count` (on the next loop) is now the number of available_instances, which are the number of mdevs we can create, so that\u0027s why by line 8172, we add this to the number of existing mdevs.","commit_id":"7a46a7c8af2395f510a202b88e514ed537acec88"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c00cb7c81de75f5a8e13557dd9ebb56849d79d79","unresolved":true,"context_lines":[{"line_number":8132,"context_line":"        count_per_parent \u003d self._count_mediated_devices(enabled_mdev_types)"},{"line_number":8133,"context_line":"        for dev_name, count in count_per_parent.items():"},{"line_number":8134,"context_line":"            mdev_type \u003d self._get_vgpu_type_per_pgpu(dev_name)"},{"line_number":8135,"context_line":"            type_limit_mapping[mdev_type] +\u003d count"},{"line_number":8136,"context_line":"            inventories[dev_name] \u003d {\u0027total\u0027: count}"},{"line_number":8137,"context_line":"        # Filter how many available mdevs we can create for all the supported"},{"line_number":8138,"context_line":"        # types."}],"source_content_type":"text/x-python","patch_set":4,"id":"37b27043_c6ddb522","line":8135,"in_reply_to":"0d782b3e_0c8e3108","updated":"2023-11-17 16:17:12.000000000","message":"This is counting how many mdevs can be supported per GPU. The \u0027count\u0027 value is the available_instances value from the GPU in sysfs, which says how many mdevs you *can* create.\n\nAs you see here, we\u0027re adding the number of existing mdevs to the \u0027count\u0027 value, which means that the total of the inventory is how many mediated devices you would eventually have if you create all of them.","commit_id":"7a46a7c8af2395f510a202b88e514ed537acec88"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7f81eddb44ce816f7957e580ea60c558e64d914d","unresolved":false,"context_lines":[{"line_number":8132,"context_line":"        count_per_parent \u003d self._count_mediated_devices(enabled_mdev_types)"},{"line_number":8133,"context_line":"        for dev_name, count in count_per_parent.items():"},{"line_number":8134,"context_line":"            mdev_type \u003d self._get_vgpu_type_per_pgpu(dev_name)"},{"line_number":8135,"context_line":"            type_limit_mapping[mdev_type] +\u003d count"},{"line_number":8136,"context_line":"            inventories[dev_name] \u003d {\u0027total\u0027: count}"},{"line_number":8137,"context_line":"        # Filter how many available mdevs we can create for all the supported"},{"line_number":8138,"context_line":"        # types."}],"source_content_type":"text/x-python","patch_set":4,"id":"8fb28671_44d6ee9d","line":8135,"in_reply_to":"299e19b5_e7cfcc6f","updated":"2024-01-19 10:45:34.000000000","message":"Done","commit_id":"7a46a7c8af2395f510a202b88e514ed537acec88"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e9cff7c468ee019ddb6f5379fa685b9fa0b708a3","unresolved":true,"context_lines":[{"line_number":8132,"context_line":"        count_per_parent \u003d self._count_mediated_devices(enabled_mdev_types)"},{"line_number":8133,"context_line":"        for dev_name, count in count_per_parent.items():"},{"line_number":8134,"context_line":"            mdev_type \u003d self._get_vgpu_type_per_pgpu(dev_name)"},{"line_number":8135,"context_line":"            type_limit_mapping[mdev_type] +\u003d count"},{"line_number":8136,"context_line":"            inventories[dev_name] \u003d {\u0027total\u0027: count}"},{"line_number":8137,"context_line":"        # Filter how many available mdevs we can create for all the supported"},{"line_number":8138,"context_line":"        # types."}],"source_content_type":"text/x-python","patch_set":4,"id":"097a6338_457b9712","line":8135,"in_reply_to":"37b27043_c6ddb522","updated":"2023-11-20 13:05:47.000000000","message":"using count for that is kind of confusing.\ni woudl expect count to be more like (avaiable_instance + allcoated mdevs form that defivce of that type) or (just the allocated medevs fo that type)\n\nif it is just avaiable_instance then we sould call it that.\nthat also impleis that  inventories[dev_name] \u003d {\u0027total\u0027: count} is wrong\n\nsince the total should not change in placment as we allcoate mdevs.","commit_id":"7a46a7c8af2395f510a202b88e514ed537acec88"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c3edab5a61f5dfcfc1297e2891ace5d742185f6a","unresolved":true,"context_lines":[{"line_number":8157,"context_line":"                          \"mediated devices (%s) is above the maximum we can \""},{"line_number":8158,"context_line":"                          \"use (%s)\","},{"line_number":8159,"context_line":"                          dev_name, count,"},{"line_number":8160,"context_line":"                          mdev_limit - type_limit_mapping[mdev_type])"},{"line_number":8161,"context_line":"                # We want the resource provider to be deleted, so we pass the"},{"line_number":8162,"context_line":"                # inventory with a total of 0 so _ensure_pgpu_providers() will"},{"line_number":8163,"context_line":"                # delete it."}],"source_content_type":"text/x-python","patch_set":5,"id":"971d8f20_6c635221","line":8160,"updated":"2023-11-17 16:26:49.000000000","message":"I asked this question in IRC, but I\u0027m putting it here for discussion and so Sean will see it next week...\n\nDoesn\u0027t this mean that if you have a card with `available\u003d16` and you put `max_instances\u003d2` we will just not create inventory for that card? I thought one of the problems we have to solve is the case where the card exposes a large number of available instances, but which isn\u0027t accurate because each instance takes more than 1/N of the card and thus you can only allocate like two of that before the card reports `available\u003d0`? It seems to me like what you\u0027ve implemented here (in the non-SRIOV case) is not actually `max_instances` but rather a test for the operator :)\n\nFor SRIOV, we need to make sure we don\u0027t add any more `available\u003d1` RPs than `max_instances` specifies, but for non-SRIOV, we need to do `total\u003dmin(available, max_instances)` right? I can\u0027t see how it makes sense any other way.","commit_id":"8f1ac79e5a711deecc316f019851cb8f23e180d5"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7f81eddb44ce816f7957e580ea60c558e64d914d","unresolved":false,"context_lines":[{"line_number":8157,"context_line":"                          \"mediated devices (%s) is above the maximum we can \""},{"line_number":8158,"context_line":"                          \"use (%s)\","},{"line_number":8159,"context_line":"                          dev_name, count,"},{"line_number":8160,"context_line":"                          mdev_limit - type_limit_mapping[mdev_type])"},{"line_number":8161,"context_line":"                # We want the resource provider to be deleted, so we pass the"},{"line_number":8162,"context_line":"                # inventory with a total of 0 so _ensure_pgpu_providers() will"},{"line_number":8163,"context_line":"                # delete it."}],"source_content_type":"text/x-python","patch_set":5,"id":"1cd7ce7e_fc6276ac","line":8160,"in_reply_to":"1282c712_6e8244e8","updated":"2024-01-19 10:45:34.000000000","message":"Done","commit_id":"8f1ac79e5a711deecc316f019851cb8f23e180d5"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e9cff7c468ee019ddb6f5379fa685b9fa0b708a3","unresolved":true,"context_lines":[{"line_number":8157,"context_line":"                          \"mediated devices (%s) is above the maximum we can \""},{"line_number":8158,"context_line":"                          \"use (%s)\","},{"line_number":8159,"context_line":"                          dev_name, count,"},{"line_number":8160,"context_line":"                          mdev_limit - type_limit_mapping[mdev_type])"},{"line_number":8161,"context_line":"                # We want the resource provider to be deleted, so we pass the"},{"line_number":8162,"context_line":"                # inventory with a total of 0 so _ensure_pgpu_providers() will"},{"line_number":8163,"context_line":"                # delete it."}],"source_content_type":"text/x-python","patch_set":5,"id":"c3248685_022ef862","line":8160,"in_reply_to":"971d8f20_6c635221","updated":"2023-11-20 13:05:47.000000000","message":"i have not read this fully today just respondign to this question\n\ni belive what sylvain is tryign to do with \ntype_limit_mapping[mdev_type] +\u003d count\nis count how many mdevs we have already enabled for that mdev type\nbut that needs to be per phsyical gpu.\n\nill need to read this section of code carfully but what im expectign it to do is basically as follows\n\nwe take max_instnace and multiple that by the number of pysical cards that support that type and are alowed to be used. for simplictly lets asume you have 2 cards and both can be used with 16 vfs each and an mdev type that can only have 2 instances\n\nso we woudl expect to create at most 4 resocue providres of inventory 1 (2 phsyical cards * 2 mdevs per card)\n\nideally we would created 2 resouce providers each with inventory of 2 vgpus instead of 4 with inventory 1.\n\n\nfor simplictly lets assume we dont aggreate the vf RP into one inventory for now to avoid a reshape. \n\nto do that we need to group the vfs by there parent PF\nthen we loop over the vfs creating rps with inventory 1 untill we reach max_instnaces. then we break out of that vf loop and move to the next pf.\n\nso this is a triple nested loop\nfirst loop over the mdev_types that are enabeld\nthen over the pfs that supprot that type\nfinally over the vfs of each pf up to the max_instnaces.\n\nthat will result in only creating enough  RPs for the max_instnace regardless  of howmany are currenlty allocated or not. i.e. we dont reallly need to look at aviable_instnaces in this case.\n\n\nif we were to do a reshape in teh futrue its also simple to do.\nwe just skip looping over the vfs of a given pf and and create an inventory using the PF pci adress and total\u003dmax_instances\n\nthat will also work if PF supprot more then one mdev_type in the future provided they are mutally exclsive. you would just have multiple resouce classes in that case.\n\n\ni have not really read the code to see how much fo a change that is but i belive either of the approches above will produce the behavior in terms of accounting.","commit_id":"8f1ac79e5a711deecc316f019851cb8f23e180d5"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a3c3d1f0efffefd1c83569d25b06a5c230e0a8f8","unresolved":true,"context_lines":[{"line_number":8157,"context_line":"                          \"mediated devices (%s) is above the maximum we can \""},{"line_number":8158,"context_line":"                          \"use (%s)\","},{"line_number":8159,"context_line":"                          dev_name, count,"},{"line_number":8160,"context_line":"                          mdev_limit - type_limit_mapping[mdev_type])"},{"line_number":8161,"context_line":"                # We want the resource provider to be deleted, so we pass the"},{"line_number":8162,"context_line":"                # inventory with a total of 0 so _ensure_pgpu_providers() will"},{"line_number":8163,"context_line":"                # delete it."}],"source_content_type":"text/x-python","patch_set":5,"id":"1282c712_6e8244e8","line":8160,"in_reply_to":"c3248685_022ef862","updated":"2023-11-21 14:18:18.000000000","message":"Yeah, by this new change, we first accept all the mdevs. Then, when we look at the available_instances value per VF, we then look at the type limit. If the VF adds more mdevs than the limit, we don\u0027t accept it and we rather pass total\u003d0 so below it will delete the RP (even if for non-SRIOV GPUs, we could limit the number of available mdevs by the type limit, we don\u0027t accept it)","commit_id":"8f1ac79e5a711deecc316f019851cb8f23e180d5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3f327d6ce9b0a5513cc6b6eac3ede99bed1459f4","unresolved":true,"context_lines":[{"line_number":7970,"context_line":"            if group.max_instances:"},{"line_number":7971,"context_line":"                self.mdev_type_max_mapping[vgpu_type] \u003d group.max_instances"},{"line_number":7972,"context_line":"            for device_address in group.device_addresses:"},{"line_number":7973,"context_line":"                if device_address \u003d\u003d \"*\":"},{"line_number":7974,"context_line":"                    if not self.pgpu_type_default:"},{"line_number":7975,"context_line":"                        self.pgpu_type_default \u003d vgpu_type"},{"line_number":7976,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"8482e7d1_4a12e843","line":7973,"updated":"2023-11-22 17:46:25.000000000","message":"do we allow a config like:\n```\ndevice_addresses \u003d *,0000:85:00.0\n```\nWhat will happen?","commit_id":"70b22b3a800ddb178dfa82ae722d4d24e6361877"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4b8555386abf20890f143abae872d675dbe01fd5","unresolved":false,"context_lines":[{"line_number":7970,"context_line":"            if group.max_instances:"},{"line_number":7971,"context_line":"                self.mdev_type_max_mapping[vgpu_type] \u003d group.max_instances"},{"line_number":7972,"context_line":"            for device_address in group.device_addresses:"},{"line_number":7973,"context_line":"                if device_address \u003d\u003d \"*\":"},{"line_number":7974,"context_line":"                    if not self.pgpu_type_default:"},{"line_number":7975,"context_line":"                        self.pgpu_type_default \u003d vgpu_type"},{"line_number":7976,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fe304200_c2790ca8","line":7973,"in_reply_to":"8482e7d1_4a12e843","updated":"2023-12-14 13:36:17.000000000","message":"Supporting * is removed.","commit_id":"70b22b3a800ddb178dfa82ae722d4d24e6361877"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3f327d6ce9b0a5513cc6b6eac3ede99bed1459f4","unresolved":true,"context_lines":[{"line_number":7974,"context_line":"                    if not self.pgpu_type_default:"},{"line_number":7975,"context_line":"                        self.pgpu_type_default \u003d vgpu_type"},{"line_number":7976,"context_line":"                    else:"},{"line_number":7977,"context_line":"                        msg \u003d (\"Mdev type default already set to \""},{"line_number":7978,"context_line":"                               \" %(default_type)s so %(this_type)s will not \""},{"line_number":7979,"context_line":"                               \"be used.\" % {"},{"line_number":7980,"context_line":"                                   \u0027default_type\u0027: self.pgpu_type_default,"},{"line_number":7981,"context_line":"                                   \u0027this_type\u0027: vgpu_type})"},{"line_number":7982,"context_line":"                        LOG.warning(msg)"},{"line_number":7983,"context_line":"                        # we remove the type from the supported list."},{"line_number":7984,"context_line":"                        enabled_mdev_types.remove(vgpu_type)"},{"line_number":7985,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":7,"id":"8a50afc6_0f9bccec","line":7982,"range":{"start_line":7977,"start_character":0,"end_line":7982,"end_character":40},"updated":"2023-11-22 17:46:25.000000000","message":"I think this will lead to a misleading message for the config:\n```\n[mdev_foo]\ndevice_addresses \u003d *,*\n```\nAs for the second \u0027*\u0027 it will print\n```\nMdev type default already set to foo so foo will not be used.\"\n```\n\nAnd code will remove \u0027foo\u0027 from enabled_mdev_types even though it is the default","commit_id":"70b22b3a800ddb178dfa82ae722d4d24e6361877"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4b8555386abf20890f143abae872d675dbe01fd5","unresolved":false,"context_lines":[{"line_number":7974,"context_line":"                    if not self.pgpu_type_default:"},{"line_number":7975,"context_line":"                        self.pgpu_type_default \u003d vgpu_type"},{"line_number":7976,"context_line":"                    else:"},{"line_number":7977,"context_line":"                        msg \u003d (\"Mdev type default already set to \""},{"line_number":7978,"context_line":"                               \" %(default_type)s so %(this_type)s will not \""},{"line_number":7979,"context_line":"                               \"be used.\" % {"},{"line_number":7980,"context_line":"                                   \u0027default_type\u0027: self.pgpu_type_default,"},{"line_number":7981,"context_line":"                                   \u0027this_type\u0027: vgpu_type})"},{"line_number":7982,"context_line":"                        LOG.warning(msg)"},{"line_number":7983,"context_line":"                        # we remove the type from the supported list."},{"line_number":7984,"context_line":"                        enabled_mdev_types.remove(vgpu_type)"},{"line_number":7985,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":7,"id":"303fb18a_e85c9eb2","line":7982,"range":{"start_line":7977,"start_character":0,"end_line":7982,"end_character":40},"in_reply_to":"8a50afc6_0f9bccec","updated":"2023-12-14 13:36:17.000000000","message":"Supporting * is removed.","commit_id":"70b22b3a800ddb178dfa82ae722d4d24e6361877"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"aba7948a517769a79faaf60bd2d79e4b729b4d46","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        # This set is for knowing all the mdev classes the operator provides"},{"line_number":536,"context_line":"        self.mdev_classes \u003d set([])"},{"line_number":537,"context_line":"        # this is for knowing how many mdevs can be created by a type"},{"line_number":538,"context_line":"        self.mdev_type_max_mapping \u003d collections.defaultdict(str)"},{"line_number":539,"context_line":"        self.supported_vgpu_types \u003d self._get_supported_vgpu_types()"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        # Handles ongoing device manipultion in libvirt where we wait for the"}],"source_content_type":"text/x-python","patch_set":10,"id":"0ba39599_7b4168f9","line":538,"range":{"start_line":538,"start_character":34,"end_line":538,"end_character":65},"updated":"2024-02-23 12:08:38.000000000","message":"is this not\n\n self.mdev_type_max_mapping:  ty.Dict[str, ty.Optional[int]] \u003d collections.defaultdict(int)\n \n we are using it like this\n \n self.mdev_type_max_mapping[vgpu_type] \u003d group.max_instances\n \n and group.max_instances is an IntOpt that is allowed to be None.\n \n are you useing str to have it default init to None ?\n \n im wondering if you shoudl jsut make this \n \n self.mdev_type_max_mapping:  ty.Dict[str, ty.Optional[int]] \u003d {}\n \n i dont think we want the extra behaivor of defaultdict here.\n \n ---- later ---\n \n  you fixed this a different way","commit_id":"931521d2f8b98f4b87583317e0fff483b976acd3"}]}
