)]}'
{"nova/scheduler/manager.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ffc594c7aa5cc4887fd7a58984ea01609416b0a6","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                request_filter.process_reqspec(ctxt, spec_obj)"},{"line_number":150,"context_line":"            except exception.RequestFilterFailed as e:"},{"line_number":151,"context_line":"                raise exception.NoValidHost(reason\u003de.message)"},{"line_number":152,"context_line":"\t    enable_pcpu_fallback \u003d ("},{"line_number":153,"context_line":"\t        objects.service.get_minimum_version_all_cells(ctxt,"},{"line_number":154,"context_line":" \t\t    [\u0027nova-compute\u0027]) \u003c 40)"},{"line_number":155,"context_line":"            resources \u003d utils.resources_from_request_spec("}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_771cfc11","line":152,"range":{"start_line":152,"start_character":0,"end_line":152,"end_character":1},"updated":"2019-09-11 09:08:33.000000000","message":"wuh wuh","commit_id":"557056d53f177a9dd4bb56c95ee7792f79e2b139"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ffc594c7aa5cc4887fd7a58984ea01609416b0a6","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                request_filter.process_reqspec(ctxt, spec_obj)"},{"line_number":150,"context_line":"            except exception.RequestFilterFailed as e:"},{"line_number":151,"context_line":"                raise exception.NoValidHost(reason\u003de.message)"},{"line_number":152,"context_line":"\t    enable_pcpu_fallback \u003d ("},{"line_number":153,"context_line":"\t        objects.service.get_minimum_version_all_cells(ctxt,"},{"line_number":154,"context_line":" \t\t    [\u0027nova-compute\u0027]) \u003c 40)"},{"line_number":155,"context_line":"            resources \u003d utils.resources_from_request_spec("},{"line_number":156,"context_line":"                ctxt, spec_obj, self.driver.host_manager,"},{"line_number":157,"context_line":"                enable_pinning_translate\u003d(not enable_pcpu_fallback))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_1788281d","line":154,"range":{"start_line":152,"start_character":0,"end_line":154,"end_character":30},"updated":"2019-09-11 09:08:33.000000000","message":"I don\u0027t think we should be checking this. Consider the scenario where every compute node is upgraded to Train but some (or all) of them have not been configured to use \u0027[compute] cpu_dedicated_set\u0027. They will all report version 40 but they will not be reporting PCPU inventory yet, meaning the query to placement won\u0027t return anything and we won\u0027t do the fallback. I think you should just drop this.","commit_id":"557056d53f177a9dd4bb56c95ee7792f79e2b139"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"39d1a6b81e63594ae809a02e62b9782786cd560b","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                request_filter.process_reqspec(ctxt, spec_obj)"},{"line_number":150,"context_line":"            except exception.RequestFilterFailed as e:"},{"line_number":151,"context_line":"                raise exception.NoValidHost(reason\u003de.message)"},{"line_number":152,"context_line":"\t    enable_pcpu_fallback \u003d ("},{"line_number":153,"context_line":"\t        objects.service.get_minimum_version_all_cells(ctxt,"},{"line_number":154,"context_line":" \t\t    [\u0027nova-compute\u0027]) \u003c 40)"},{"line_number":155,"context_line":"            resources \u003d utils.resources_from_request_spec("},{"line_number":156,"context_line":"                ctxt, spec_obj, self.driver.host_manager,"},{"line_number":157,"context_line":"                enable_pinning_translate\u003d(not enable_pcpu_fallback))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_45858659","line":154,"range":{"start_line":152,"start_character":0,"end_line":154,"end_character":30},"in_reply_to":"5faad753_1788281d","updated":"2019-09-11 10:09:15.000000000","message":"well we the flip side of this is what if you have a train cloud that will never have PCPUs you dont want to always fall back when you know it wont work.\n\nwe might want to keep the work aroud config option just to contol if we do the fall back or not but in this case we could enable fallback by default if we think that woudl be more common.","commit_id":"557056d53f177a9dd4bb56c95ee7792f79e2b139"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bab9710a5cac655faaed8ee73a79a6e02d84640b","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                request_filter.process_reqspec(ctxt, spec_obj)"},{"line_number":150,"context_line":"            except exception.RequestFilterFailed as e:"},{"line_number":151,"context_line":"                raise exception.NoValidHost(reason\u003de.message)"},{"line_number":152,"context_line":"\t    enable_pcpu_fallback \u003d ("},{"line_number":153,"context_line":"\t        objects.service.get_minimum_version_all_cells(ctxt,"},{"line_number":154,"context_line":" \t\t    [\u0027nova-compute\u0027]) \u003c 40)"},{"line_number":155,"context_line":"            resources \u003d utils.resources_from_request_spec("},{"line_number":156,"context_line":"                ctxt, spec_obj, self.driver.host_manager,"},{"line_number":157,"context_line":"                enable_pinning_translate\u003d(not enable_pcpu_fallback))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_a57c7ab5","line":154,"range":{"start_line":152,"start_character":0,"end_line":154,"end_character":30},"in_reply_to":"5faad753_45858659","updated":"2019-09-11 10:38:08.000000000","message":"That\u0027s a good point. I\u0027ll let dansmith decide this for us.","commit_id":"557056d53f177a9dd4bb56c95ee7792f79e2b139"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ffc594c7aa5cc4887fd7a58984ea01609416b0a6","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                alloc_reqs, provider_summaries, allocation_request_version \u003d ("},{"line_number":165,"context_line":"                        None, None, None)"},{"line_number":166,"context_line":"            else:"},{"line_number":167,"context_line":"                (alloc_reqs, provider_summaries,"},{"line_number":168,"context_line":"                            allocation_request_version) \u003d res"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"            if not alloc_reqs and enable_pcpu_fallback:"},{"line_number":171,"context_line":"                LOG.debug(\"We are in the middle of T release ugprade, \""}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_37f1a46c","line":168,"range":{"start_line":167,"start_character":0,"end_line":168,"end_character":61},"updated":"2019-09-11 09:08:33.000000000","message":"I think we could simply check if alloc_reqs is empty and, if so, check to see if there are PCPUs in the \u0027resources\u0027 object. If there are rewrite to VCPUs and try again either by doing it directly here or keeping the \u0027enabled_pinning_translation\u0027 parameter you\u0027ve added to \u0027resources_from_request_spec\u0027 and simply calling \u0027resources_from_request_spec\u0027 a second time with that set to False. (I\u0027d rather the former since this is a bit of a hack and I\u0027d personally rather pollute this method than the \u0027ResourceRequests\u0027 class)","commit_id":"557056d53f177a9dd4bb56c95ee7792f79e2b139"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"39d1a6b81e63594ae809a02e62b9782786cd560b","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"            if not alloc_reqs and enable_pcpu_fallback:"},{"line_number":171,"context_line":"                LOG.debug(\"We are in the middle of T release ugprade, \""},{"line_number":172,"context_line":"\t\t          \"fallback to PCPU when VCPU request failed\")"},{"line_number":173,"context_line":"                resources \u003d utils.resources_from_request_spec("},{"line_number":174,"context_line":"                    ctxt, spec_obj, self.driver.host_manager,"},{"line_number":175,"context_line":"                    enable_pinning_translate\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_65ed2224","line":172,"range":{"start_line":172,"start_character":0,"end_line":172,"end_character":1},"updated":"2019-09-11 10:09:15.000000000","message":"out of interest any progress on the pre-commit patch.","commit_id":"557056d53f177a9dd4bb56c95ee7792f79e2b139"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bab9710a5cac655faaed8ee73a79a6e02d84640b","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"            if not alloc_reqs and enable_pcpu_fallback:"},{"line_number":171,"context_line":"                LOG.debug(\"We are in the middle of T release ugprade, \""},{"line_number":172,"context_line":"\t\t          \"fallback to PCPU when VCPU request failed\")"},{"line_number":173,"context_line":"                resources \u003d utils.resources_from_request_spec("},{"line_number":174,"context_line":"                    ctxt, spec_obj, self.driver.host_manager,"},{"line_number":175,"context_line":"                    enable_pinning_translate\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_6550c233","line":172,"range":{"start_line":172,"start_character":0,"end_line":172,"end_character":1},"in_reply_to":"5faad753_65ed2224","updated":"2019-09-11 10:38:08.000000000","message":"Nope. I\u0027ll pick it up again after M3","commit_id":"557056d53f177a9dd4bb56c95ee7792f79e2b139"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ae531b18199b81d984074ec11320054780596ba2","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            # if the user requested pinned CPUs but we couldn\u0027t find any"},{"line_number":160,"context_line":"            # allocation candidates using PCPUs, this could be because they"},{"line_number":161,"context_line":"            # haven\u0027t upgraded their configuration to report PCPUs. Try again"},{"line_number":162,"context_line":"            # with VCPUs"},{"line_number":163,"context_line":"            # TODO(stephenfin): Remove when we drop support for \u0027vcpu_pin_set\u0027"},{"line_number":164,"context_line":"            if res and not res[0] and resources.cpu_pinning_requested:"},{"line_number":165,"context_line":"                LOG.debug(\u0027Request for PCPU failed; falling back to request \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"5faad753_e03a6032","line":162,"range":{"start_line":162,"start_character":12,"end_line":162,"end_character":24},"updated":"2019-09-11 11:16:23.000000000","message":"So this comment should also explain why it\u0027s okay to do this:\n\nThis *doesn\u0027t* mean you\u0027ll wind up with your instance on shared CPUs. Because the NUMATopologyFilter knows the difference between upgraded (where VCPUs are shared) and non-upgraded (where VCPUs can be dedicated) hosts (by looking for NUMATopology.pcpuset), and will bounce the former.","commit_id":"ab894af815648e4e9c64a10d4b6b710d928b2bbf"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c5b254682d2bc449dcddd2a5bd474598ac690628","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            resources \u003d utils.resources_from_request_spec("},{"line_number":154,"context_line":"                ctxt, spec_obj, self.driver.host_manager,"},{"line_number":155,"context_line":"                enable_pinning_translate\u003dTrue)"},{"line_number":156,"context_line":"            res \u003d self.placement_client.get_allocation_candidates("},{"line_number":157,"context_line":"                ctxt, resources)"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_bf70fda6","line":155,"updated":"2019-09-11 17:17:21.000000000","message":"the only corner case is\n\nIf the same host resize is enabled. And the host which the instance is running is the only one has PCPU, then the resize never successful, there is no chance to fallback to VCPU. I don\u0027t have any easy idea to fix that, if we accept that corner case, I should doc in the release note.","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ca714fca8665f61a72ad0201153a55772999b65b","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            resources \u003d utils.resources_from_request_spec("},{"line_number":154,"context_line":"                ctxt, spec_obj, self.driver.host_manager,"},{"line_number":155,"context_line":"                enable_pinning_translate\u003dTrue)"},{"line_number":156,"context_line":"            res \u003d self.placement_client.get_allocation_candidates("},{"line_number":157,"context_line":"                ctxt, resources)"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_3faded87","line":155,"in_reply_to":"5faad753_bf70fda6","updated":"2019-09-11 17:33:24.000000000","message":"\u003e the only corner case is\n \u003e \n \u003e If the same host resize is enabled. \n\nsorry, I mean the same host resize is disabled\n\nwe can check the ignore host at line 167, if the allcoation_candidtes includes the host which in ignore host, then we fallback to VCPU directly.","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d7815d8fdc6922427cc7b94e5924a3c963a46b31","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            # with VCPUs. This is okay to do because the NUMATopologyFilter"},{"line_number":163,"context_line":"            # (scheduler) or virt driver (compute node) will weed out hosts"},{"line_number":164,"context_line":"            # that are actually using new style configuration but simply don\u0027t"},{"line_number":165,"context_line":"            # have enough free PCPUs (or any PCPUs)."},{"line_number":166,"context_line":"            # TODO(stephenfin): Remove when we drop support for \u0027vcpu_pin_set\u0027"},{"line_number":167,"context_line":"            if res and not res[0] and resources.cpu_pinning_requested:"},{"line_number":168,"context_line":"                LOG.debug(\u0027Request for PCPU failed; falling back to request \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_ebcb216f","line":165,"range":{"start_line":165,"start_character":31,"end_line":165,"end_character":50},"updated":"2019-09-11 11:49:23.000000000","message":"The mention of \u0027PCPUs\u0027 here is confusing (to me).\n\nThe point is that GET /a_c will now pick up hosts that have enough available *VCPUs* -- regardless of whether they have enough/any (available) PCPUs -- but the filter will reject those iff they\u0027re new-style.\n\nRight?","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"98b38f3ffb65ac1d34f84330b97a6f7e4d9b9a6a","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            # with VCPUs. This is okay to do because the NUMATopologyFilter"},{"line_number":163,"context_line":"            # (scheduler) or virt driver (compute node) will weed out hosts"},{"line_number":164,"context_line":"            # that are actually using new style configuration but simply don\u0027t"},{"line_number":165,"context_line":"            # have enough free PCPUs (or any PCPUs)."},{"line_number":166,"context_line":"            # TODO(stephenfin): Remove when we drop support for \u0027vcpu_pin_set\u0027"},{"line_number":167,"context_line":"            if res and not res[0] and resources.cpu_pinning_requested:"},{"line_number":168,"context_line":"                LOG.debug(\u0027Request for PCPU failed; falling back to request \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_a655601f","line":165,"range":{"start_line":165,"start_character":31,"end_line":165,"end_character":50},"in_reply_to":"5faad753_26609032","updated":"2019-09-11 12:49:13.000000000","message":"But will the filter even look at PCPUs on new style hosts, given that the allocation will just have VCPUs?","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"04bdcf27a34aa91c879122f39a7a9571804d617c","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            # with VCPUs. This is okay to do because the NUMATopologyFilter"},{"line_number":163,"context_line":"            # (scheduler) or virt driver (compute node) will weed out hosts"},{"line_number":164,"context_line":"            # that are actually using new style configuration but simply don\u0027t"},{"line_number":165,"context_line":"            # have enough free PCPUs (or any PCPUs)."},{"line_number":166,"context_line":"            # TODO(stephenfin): Remove when we drop support for \u0027vcpu_pin_set\u0027"},{"line_number":167,"context_line":"            if res and not res[0] and resources.cpu_pinning_requested:"},{"line_number":168,"context_line":"                LOG.debug(\u0027Request for PCPU failed; falling back to request \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_c9e2e801","line":165,"range":{"start_line":165,"start_character":31,"end_line":165,"end_character":50},"in_reply_to":"5faad753_70e07d97","updated":"2019-09-11 15:52:47.000000000","message":"I\u0027ll plug all this into the commit message when I merge it back","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dfbb607e9bfac6c4cbff3d081930a0233cd242a6","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            # with VCPUs. This is okay to do because the NUMATopologyFilter"},{"line_number":163,"context_line":"            # (scheduler) or virt driver (compute node) will weed out hosts"},{"line_number":164,"context_line":"            # that are actually using new style configuration but simply don\u0027t"},{"line_number":165,"context_line":"            # have enough free PCPUs (or any PCPUs)."},{"line_number":166,"context_line":"            # TODO(stephenfin): Remove when we drop support for \u0027vcpu_pin_set\u0027"},{"line_number":167,"context_line":"            if res and not res[0] and resources.cpu_pinning_requested:"},{"line_number":168,"context_line":"                LOG.debug(\u0027Request for PCPU failed; falling back to request \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_bd3c8ebf","line":165,"range":{"start_line":165,"start_character":31,"end_line":165,"end_character":50},"in_reply_to":"5faad753_a655601f","updated":"2019-09-11 13:37:25.000000000","message":"Think we might be getting terminology mixed up here. The filter doesn\u0027t know anything about PCPUs or VCPUs or anything else from placement land. It only knows \u0027HostState\u0027 and \u0027RequestSpec\u0027 objects, the former of which contains a \u0027NUMATopology\u0027 object (via the \u0027numa_topology\u0027 field) which we attempt to fit the \u0027InstanceNUMATopology\u0027 object provided by the latter (via its own \u0027numa_topology\u0027 field) against.\n\nSooo...it\u0027s not that the filter won\u0027t look at PCPUs or VCPUs. Rather, it\u0027ll look at the \u0027NUMATopology.pcpuset\u0027 field, and behave differently depending on whether this is Train with new-style config, Train with old-style config, or Stein:\n\n- For Train compute nodes with new-style config, \u0027NUMATopology.pcpuset\u0027 will be explictly set to the value of \u0027[compute] cpu_dedicated_set\u0027 or, if only \u0027[compute] cpu_dedicated_set\u0027 is configured, \u0027None\u0027 (it\u0027s nullable) by the virt driver so the calls to \u0027hardware.numa_fit_instance_to_host\u0027 in the \u0027NUMATopologyFilter\u0027 will fail.\n\n- For Train compute nodes with old-style config, \u0027NUMATopology.pcpuset\u0027 will be set to the same value as \u0027NUMATopology.cpuset\u0027 by the virt driver.\n\n- For Stein compute nodes, \u0027NUMATopology.pcpuset\u0027 will be unset and we\u0027ll detect this in \u0027hardware.numa_fit_instance_to_host\u0027 and simply set it to the same value as \u0027NUMATopology.cpuset\u0027.\n\nNote that we could probably unify the last two cases and simply not set \u0027pcpuset\u0027 if the new-style config isn\u0027t present, but it makes the virt driver code a bit uglier.","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0732f677566d273470ff433d8efa3964b5477c3c","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            # with VCPUs. This is okay to do because the NUMATopologyFilter"},{"line_number":163,"context_line":"            # (scheduler) or virt driver (compute node) will weed out hosts"},{"line_number":164,"context_line":"            # that are actually using new style configuration but simply don\u0027t"},{"line_number":165,"context_line":"            # have enough free PCPUs (or any PCPUs)."},{"line_number":166,"context_line":"            # TODO(stephenfin): Remove when we drop support for \u0027vcpu_pin_set\u0027"},{"line_number":167,"context_line":"            if res and not res[0] and resources.cpu_pinning_requested:"},{"line_number":168,"context_line":"                LOG.debug(\u0027Request for PCPU failed; falling back to request \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_70e07d97","line":165,"range":{"start_line":165,"start_character":31,"end_line":165,"end_character":50},"in_reply_to":"5faad753_bd3c8ebf","updated":"2019-09-11 14:25:48.000000000","message":"ack","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"30c312a3fd3617193cd3c411fd92a0fbe2fa162d","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            # with VCPUs. This is okay to do because the NUMATopologyFilter"},{"line_number":163,"context_line":"            # (scheduler) or virt driver (compute node) will weed out hosts"},{"line_number":164,"context_line":"            # that are actually using new style configuration but simply don\u0027t"},{"line_number":165,"context_line":"            # have enough free PCPUs (or any PCPUs)."},{"line_number":166,"context_line":"            # TODO(stephenfin): Remove when we drop support for \u0027vcpu_pin_set\u0027"},{"line_number":167,"context_line":"            if res and not res[0] and resources.cpu_pinning_requested:"},{"line_number":168,"context_line":"                LOG.debug(\u0027Request for PCPU failed; falling back to request \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_26609032","line":165,"range":{"start_line":165,"start_character":31,"end_line":165,"end_character":50},"in_reply_to":"5faad753_ebcb216f","updated":"2019-09-11 12:41:56.000000000","message":"I want to say it\u0027ll reject those that are using new style config and are either out of PCPUs (\u0027[compute] cpu_dedicated_set\u0027 configured but PCPU total \u003d\u003d used) or never allocated them (only \u0027[compute] cpu_shared_set\u0027 configured so PCPU total \u003d 0). However, I don\u0027t want to refer to specific config options because those are libvirt only at the moment (though so are PCPUs presently, in fairness)","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"baa1790d1ae0430892370680c51125be140b6e3b","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            # that are actually using new style configuration but simply don\u0027t"},{"line_number":165,"context_line":"            # have enough free PCPUs (or any PCPUs)."},{"line_number":166,"context_line":"            # TODO(stephenfin): Remove when we drop support for \u0027vcpu_pin_set\u0027"},{"line_number":167,"context_line":"            if res and not res[0] and resources.cpu_pinning_requested:"},{"line_number":168,"context_line":"                LOG.debug(\u0027Request for PCPU failed; falling back to request \u0027"},{"line_number":169,"context_line":"                          \u0027for VCPU\u0027)"},{"line_number":170,"context_line":"                resources \u003d utils.resources_from_request_spec("}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_e98324cb","line":167,"range":{"start_line":167,"start_character":27,"end_line":167,"end_character":33},"updated":"2019-09-11 16:04:01.000000000","message":"It would be nice to break out the tuple before you get here so we\u0027re not left with res[0]","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"13ecbdd1370a8f9c961b14640a68dffa6f812e4f","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            # that are actually using new style configuration but simply don\u0027t"},{"line_number":165,"context_line":"            # have enough free PCPUs (or any PCPUs)."},{"line_number":166,"context_line":"            # TODO(stephenfin): Remove when we drop support for \u0027vcpu_pin_set\u0027"},{"line_number":167,"context_line":"            if res and not res[0] and resources.cpu_pinning_requested:"},{"line_number":168,"context_line":"                LOG.debug(\u0027Request for PCPU failed; falling back to request \u0027"},{"line_number":169,"context_line":"                          \u0027for VCPU\u0027)"},{"line_number":170,"context_line":"                resources \u003d utils.resources_from_request_spec("}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_3fa5eeb5","line":167,"range":{"start_line":167,"start_character":27,"end_line":167,"end_character":33},"in_reply_to":"5faad753_e98324cb","updated":"2019-09-11 16:58:54.000000000","message":"we also can add config option to disable this workaround if the operator want to disable that fallback after upgrade. But yes, as we discussed early, that may have more requirement for the user to disable that, like you have to specific cpu_dedicated_set for the pinned host.","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"}],"nova/scheduler/utils.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"baa1790d1ae0430892370680c51125be140b6e3b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    XS_KEYPAT \u003d re.compile(r\"^(%s)([1-9][0-9]*)?:(.*)$\" %"},{"line_number":58,"context_line":"                           \u0027|\u0027.join((XS_RES_PREFIX, XS_TRAIT_PREFIX)))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def __init__(self, request_spec, enable_pinning_translate\u003dTrue):"},{"line_number":61,"context_line":"        \"\"\"Create a new instance of ResourceRequest from a RequestSpec."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        Examines the flavor, flavor extra specs, and (optional) image metadata"}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_e95c847f","line":60,"range":{"start_line":60,"start_character":37,"end_line":60,"end_character":66},"updated":"2019-09-11 16:04:01.000000000","message":"I\u0027m not crazy about the way this is plumbed down, but probably not worth ratholing on at this stage, and given it\u0027s temporar(ily permanent).","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2bd12ab28d3eda82d5430ec96cd8cd01188dd8cd","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    XS_KEYPAT \u003d re.compile(r\"^(%s)([1-9][0-9]*)?:(.*)$\" %"},{"line_number":58,"context_line":"                           \u0027|\u0027.join((XS_RES_PREFIX, XS_TRAIT_PREFIX)))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def __init__(self, request_spec, enable_pinning_translate\u003dTrue):"},{"line_number":61,"context_line":"        \"\"\"Create a new instance of ResourceRequest from a RequestSpec."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        Examines the flavor, flavor extra specs, and (optional) image metadata"}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_5f222a02","line":60,"range":{"start_line":60,"start_character":37,"end_line":60,"end_character":66},"in_reply_to":"5faad753_e95c847f","updated":"2019-09-11 17:04:32.000000000","message":"Neither am I. The alternative was to add a check in \u0027select_destinations\u0027 that wouldn\u0027t simply rewrite PCPU -\u003e VCPU there (suggested at [1]). However, the reason I didn\u0027t do that was because we\u0027d have no way of knowing if the PCPU came from \u0027hw:cpu_policy\u003ddedicated\u0027 or \u0027resourcesNN: PCPU\u003dM\u0027 extra specs \n\n[1] https://review.opendev.org/#/c/681383/2/nova/scheduler/manager.py@168","commit_id":"df0f2bdefa647486fbe240abd1150890333e5438"}]}
