)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"663f3fc396807d720176265e352750221073ba26","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Map \u0027hw:cpu_policy\u0027 and \u0027hw:cpu_thread_policy\u0027 as follows:"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"  hw:cpu_policy"},{"line_number":12,"context_line":"    dedicated -\u003e resources:PCPU\u003d${flavor.vcpus}"},{"line_number":13,"context_line":"    shared    -\u003e resources:VCPU\u003d${flavor.vcpus}"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"  hw:cpu_thread_policy"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"7faddb67_513f71b4","line":12,"range":{"start_line":12,"start_character":41,"end_line":12,"end_character":46},"updated":"2019-08-14 14:01:30.000000000","message":"pcpus","commit_id":"26afdf11cac3694aa33202a6f08bf693d8d448ad"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"21c0a529ad78e90b217e02f26f778f47ee95a18d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Map \u0027hw:cpu_policy\u0027 and \u0027hw:cpu_thread_policy\u0027 as follows:"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"  hw:cpu_policy"},{"line_number":12,"context_line":"    dedicated -\u003e resources:PCPU\u003d${flavor.vcpus}"},{"line_number":13,"context_line":"    shared    -\u003e resources:VCPU\u003d${flavor.vcpus}"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"  hw:cpu_thread_policy"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"7faddb67_36512f0f","line":12,"range":{"start_line":12,"start_character":41,"end_line":12,"end_character":46},"in_reply_to":"7faddb67_513f71b4","updated":"2019-08-20 16:40:15.000000000","message":"Nope, this is correct (I\u0027m referring to the vcpus field on the Flavor object)","commit_id":"26afdf11cac3694aa33202a6f08bf693d8d448ad"}],"nova/conf/scheduler.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"Related options:"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"* ``compute_driver`` (libvirt)"},{"line_number":215,"context_line":"\"\"\"),"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_f96e3894","line":214,"updated":"2019-09-04 14:57:14.000000000","message":"seems like this should also be marked related to cpu_*_set etc, and vice versa.","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"Related options:"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"* ``compute_driver`` (libvirt)"},{"line_number":215,"context_line":"\"\"\"),"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_4a1a087d","line":214,"in_reply_to":"7faddb67_f96e3894","updated":"2019-09-04 17:46:03.000000000","message":"Done","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":212,"context_line":"Related options:"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"* ``compute_driver`` (libvirt)"},{"line_number":215,"context_line":"\"\"\"),"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"]"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_db67b450","line":215,"updated":"2019-09-04 14:57:14.000000000","message":"✔","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1eddbb73efa781270db6a4c0c83f53a71ab16d7d","unresolved":false,"context_lines":[{"line_number":202,"context_line":"as only upgraded compute nodes, which will report ``PCPU`` inventory, will be"},{"line_number":203,"context_line":"able to handle pinned instances. This affects both create and move operations."},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"If upgrading a Stein-based deployment, this option should initially be set to"},{"line_number":206,"context_line":"``False`` until all compute nodes have been upgraded and ``[compute]"},{"line_number":207,"context_line":"cpu_dedicated_set`` configured on nodes intended for pinned workloads. On new"},{"line_number":208,"context_line":"deployments, this should be set to ``True`` immediately."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"This option will default to ``True`` in a future release."},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"5faad753_4c7e3de5","line":208,"range":{"start_line":205,"start_character":0,"end_line":208,"end_character":56},"updated":"2019-09-09 17:45:20.000000000","message":"This seems to be begging for a service version base check. Why are you making the operators toggle this manually (and thus do another full service restart dance post upgrade)?","commit_id":"7c0d0ee0f9691734819a216edffca1b46d8c3d9c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3d2888b9e124b95e12e90d5b1987f2770358048d","unresolved":false,"context_lines":[{"line_number":202,"context_line":"as only upgraded compute nodes, which will report ``PCPU`` inventory, will be"},{"line_number":203,"context_line":"able to handle pinned instances. This affects both create and move operations."},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"If upgrading a Stein-based deployment, this option should initially be set to"},{"line_number":206,"context_line":"``False`` until all compute nodes have been upgraded and ``[compute]"},{"line_number":207,"context_line":"cpu_dedicated_set`` configured on nodes intended for pinned workloads. On new"},{"line_number":208,"context_line":"deployments, this should be set to ``True`` immediately."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"This option will default to ``True`` in a future release."},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"5faad753_dcf3b19d","line":208,"range":{"start_line":205,"start_character":0,"end_line":208,"end_character":56},"in_reply_to":"5faad753_4c7e3de5","updated":"2019-09-10 09:17:48.000000000","message":"I\u0027m not sure how a service version check would help us in placement land? We need to support a mixed version environment, and in that mixed version environment a \"VCPU\" reported by a compute node can be either (a) something that can be used by pinned and unpinned instances (a Stein compute node) or (b) something that can only be used by unpinned instances (a Train compute node). Similarly, the absence of PCPU can indicate either (a) a Stein compute node that\u0027s incapable of reporting these things or (b) a Train compute node that\u0027s configured to report only VCPU inventory. fwict, placement doesn\u0027t to provide any way to say \"I want PCPUs if the resource provider is on Train else I want VCPU\" in a request. You have to request one or the other and that means having a switchover point where the cloud has enough Train compute nodes to start handling requests.\n\nRight?","commit_id":"7c0d0ee0f9691734819a216edffca1b46d8c3d9c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"03d71f182a8fe3767505a0cfb773594835f84670","unresolved":false,"context_lines":[{"line_number":202,"context_line":"as only upgraded compute nodes, which will report ``PCPU`` inventory, will be"},{"line_number":203,"context_line":"able to handle pinned instances. This affects both create and move operations."},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"If upgrading a Stein-based deployment, this option should initially be set to"},{"line_number":206,"context_line":"``False`` until all compute nodes have been upgraded and ``[compute]"},{"line_number":207,"context_line":"cpu_dedicated_set`` configured on nodes intended for pinned workloads. On new"},{"line_number":208,"context_line":"deployments, this should be set to ``True`` immediately."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"This option will default to ``True`` in a future release."},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"5faad753_0ebc8667","line":208,"range":{"start_line":205,"start_character":0,"end_line":208,"end_character":56},"in_reply_to":"5faad753_9bbf75fa","updated":"2019-09-11 15:45:00.000000000","message":"We discussed this on IRC, but for posterity...\n\n \u003e However, I made this comment before I had digested more of the\n \u003e series, and I think your answer is going to be that there are\n \u003e actually a bunch of steps involved in an upgrade now. Something\n \u003e like:\n \u003e \n \u003e 1. Upgrade controllers, restarting, leave this \u003dFalse\n \u003e 2. Upgrade computes slowly, restarting\n \u003e 3. Atomically change all the configs on all the computes to go from\n \u003e the old style to the new style and restart them all atomically\n \u003e 4. Quickly set this to true on all controllers and restart\n \u003e \n \u003e Right?\n\nYes.\n\n \u003e I\u0027m saying that process pretty much sucks and it would be good to\n \u003e find a way to make it suck less.\n\nAgreed.\n\n \u003e Since you\u0027re adding a\n \u003e non-workaround flag that is already deprecated, it seems like we\n \u003e could probably use service version, either on the controller side\n \u003e or both sides to make that work a little better.\n\nAs discussed on IRC, this wouldn\u0027t do since it will only tell us that the service on Train code, not that it\u0027s using new config options. We can\u0027t require operators update their configuration in order to upgrade. What we\u0027re going with instead is a change to how we request these things from placement, such that if we cannot find any hosts with PCPUs, we fall back to requesting VCPUs and rely on the NUMATopologyFilter to filter out hosts that actually don\u0027t have PCPUs. The patch is at [1] and the reasoning behind how it\u0027s able to work described at [2].\n\n[1] https://review.opendev.org/#/c/681383/\n[2] https://review.opendev.org/#/c/681383/5/nova/scheduler/manager.py@165","commit_id":"7c0d0ee0f9691734819a216edffca1b46d8c3d9c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7fa80c47b90e176b5b7537d74b1c3c5c3f88ed81","unresolved":false,"context_lines":[{"line_number":202,"context_line":"as only upgraded compute nodes, which will report ``PCPU`` inventory, will be"},{"line_number":203,"context_line":"able to handle pinned instances. This affects both create and move operations."},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"If upgrading a Stein-based deployment, this option should initially be set to"},{"line_number":206,"context_line":"``False`` until all compute nodes have been upgraded and ``[compute]"},{"line_number":207,"context_line":"cpu_dedicated_set`` configured on nodes intended for pinned workloads. On new"},{"line_number":208,"context_line":"deployments, this should be set to ``True`` immediately."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"This option will default to ``True`` in a future release."},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"5faad753_9bbf75fa","line":208,"range":{"start_line":205,"start_character":0,"end_line":208,"end_character":56},"in_reply_to":"5faad753_dcf3b19d","updated":"2019-09-10 15:16:53.000000000","message":"Sure, you can\u0027t ask placement for something with a conditional. This knob is intended to be that control, where you slowly upgrade all the computes to expose the new thing, and then once you\u0027re sure they do (or enough do) you flip this switch, right?\n\nSo my point was that if you make the translation activity conditional on \"are all the compute nodes upgraded\" then it will automatically switch to doing the translation when that thing happens.\n\nHowever, I made this comment before I had digested more of the series, and I think your answer is going to be that there are actually a bunch of steps involved in an upgrade now. Something like:\n\n 1. Upgrade controllers, restarting, leave this \u003dFalse\n 2. Upgrade computes slowly, restarting\n 3. Atomically change all the configs on all the computes to go from the old style to the new style and restart them all atomically\n 4. Quickly set this to true on all controllers and restart\n\nRight?\n\nI\u0027m saying that process pretty much sucks and it would be good to find a way to make it suck less. Since you\u0027re adding a non-workaround flag that is already deprecated, it seems like we could probably use service version, either on the controller side or both sides to make that work a little better.","commit_id":"7c0d0ee0f9691734819a216edffca1b46d8c3d9c"}],"nova/conf/workarounds.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f2284be2ac450275152168201206ec7a7303148b","unresolved":false,"context_lines":[{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    cfg.BoolOpt("},{"line_number":216,"context_line":"        \"disable_legacy_pinning_policy_translation\","},{"line_number":217,"context_line":"        default\u003dFalse,"},{"line_number":218,"context_line":"        deprecated_for_removal\u003dTrue,"},{"line_number":219,"context_line":"        deprecated_since\u003d\"20.0.0\","},{"line_number":220,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"7faddb67_2a192221","line":217,"updated":"2019-08-29 14:24:49.000000000","message":"No, this necessarly has to be defaulted to True in order to keep upgrades seamless.\nIf you change it per compute, then your compute will potentially report different inventories after upgrade, which can be a breakage.","commit_id":"621fc34d7143cce8e740aa3ebf6807b28c84ace3"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2f476a4b5fc4245981b8f40b6ca86d278212f729","unresolved":false,"context_lines":[{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    cfg.BoolOpt("},{"line_number":216,"context_line":"        \"disable_legacy_pinning_policy_translation\","},{"line_number":217,"context_line":"        default\u003dFalse,"},{"line_number":218,"context_line":"        deprecated_for_removal\u003dTrue,"},{"line_number":219,"context_line":"        deprecated_since\u003d\"20.0.0\","},{"line_number":220,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"7faddb67_aab3d209","line":217,"range":{"start_line":217,"start_character":8,"end_line":217,"end_character":22},"updated":"2019-08-29 14:26:53.000000000","message":"this needs to be true\n\nand i think you should move it too the scheduler section.","commit_id":"621fc34d7143cce8e740aa3ebf6807b28c84ace3"}],"nova/scheduler/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f970c61386ec0971cf82cf937e74b6e56f68cd87","unresolved":false,"context_lines":[{"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":"            if res is None:"},{"line_number":159,"context_line":"                # We have to handle the case that we failed to connect to the"},{"line_number":160,"context_line":"                # Placement service and the safe_connect decorator on"},{"line_number":161,"context_line":"                # get_allocation_candidates returns None."},{"line_number":162,"context_line":"                res \u003d None, None, None"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"            alloc_reqs, provider_summaries, allocation_request_version \u003d res"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":45,"id":"5faad753_7904dd4a","line":162,"range":{"start_line":159,"start_character":16,"end_line":162,"end_character":38},"updated":"2019-09-11 23:26:23.000000000","message":"We should burn this compat out but not in this change.","commit_id":"4405384a1ead52e3c5ea2e7c0202c060619b6e41"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f970c61386ec0971cf82cf937e74b6e56f68cd87","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            # that are actually using new style configuration but simply don\u0027t"},{"line_number":172,"context_line":"            # have enough free PCPUs (or any PCPUs)."},{"line_number":173,"context_line":"            # TODO(stephenfin): Remove when we drop support for \u0027vcpu_pin_set\u0027"},{"line_number":174,"context_line":"            if res and not alloc_reqs and resources.cpu_pinning_requested:"},{"line_number":175,"context_line":"                LOG.info(\u0027Request for PCPU failed; falling back to request \u0027"},{"line_number":176,"context_line":"                         \u0027for VCPU\u0027)"},{"line_number":177,"context_line":"                resources \u003d utils.resources_from_request_spec("}],"source_content_type":"text/x-python","patch_set":45,"id":"5faad753_39fe6537","line":174,"range":{"start_line":174,"start_character":15,"end_line":174,"end_character":18},"updated":"2019-09-11 23:26:23.000000000","message":"Would this ever be Falsey? If res is None above we turn it into a tuple.\n\nAlso, it\u0027d be nice to split this new logic out into a private method since this select_destinations and nesting you\u0027re in here is already getting big and ugly, but it\u0027s a nit.","commit_id":"4405384a1ead52e3c5ea2e7c0202c060619b6e41"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"526968ddd5663b18daa58f8bf01050252d4b7cd7","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                    ctxt, spec_obj, self.driver.host_manager,"},{"line_number":183,"context_line":"                    enable_pinning_translate\u003dFalse)"},{"line_number":184,"context_line":"                res \u003d self.placement_client.get_allocation_candidates("},{"line_number":185,"context_line":"                    ctxt, resources)"},{"line_number":186,"context_line":"                if res:"},{"line_number":187,"context_line":"                    # merge the allocation requests and provider summaries from"},{"line_number":188,"context_line":"                    # the two requests together"}],"source_content_type":"text/x-python","patch_set":48,"id":"5faad753_1496bd40","line":185,"updated":"2019-09-12 16:05:46.000000000","message":"after a long discussion over a couple of nights, we convinced ourselves that this extra penalty hit isn\u0027t a big deal, even for large clouds like some Genevian one.","commit_id":"c218948cc6c96709a769dd2fd5744030098a47a9"}],"nova/scheduler/utils.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"81a78a2a84cd8281ee3b78dff9bac0f9f5e301f7","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    def _translate_legacy_extra_specs(self, extra_specs):"},{"line_number":147,"context_line":"        \"\"\"Translate a legacy extra spec to a resource request.\"\"\""},{"line_number":148,"context_line":"        if CONF.workarounds.disable_legacy_pinning_policy_translation:"},{"line_number":149,"context_line":"            return"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        # TODO(stephenfin): Do we have to handle image metadata - flavor extra"},{"line_number":152,"context_line":"        # spec conflicts *before* we override things?"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_f7d83ff1","line":149,"updated":"2019-07-22 16:59:43.000000000","message":"Question: should I start requesting an extra VCPU in this case if hw:emulator_threads_policy\u003disolate is present? Rationale being that I\u0027m removing the \u0027estimate_instance_overhead\u0027 function in the next two patches and if I don\u0027t do this, we won\u0027t end up accounting for the overhead when this is disabled.","commit_id":"fe2dec89a6b380051c36a15b6094140cac1df6c2"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"89c279423cd0ff615200327ff9f9398566d5cfdd","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                      {\u0027vcpu_rc\u0027: orc.VCPU, \u0027pcpu_rc\u0027: orc.PCPU,"},{"line_number":207,"context_line":"                       \u0027vcpus\u0027: vcpus})"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"            if emul_thread_policy \u003d\u003d \u0027isolate\u0027:"},{"line_number":210,"context_line":"                vcpus +\u003d 1"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"                LOG.debug(\u0027Adding additional %(pcpu_rc)s to account for \u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"7faddb67_a503860c","line":209,"updated":"2019-08-06 18:27:14.000000000","message":"Maybe add a comment that defining this with pinned CPUs in an error that would have been raised much earlier?","commit_id":"6c5f259c8abc6d45de9c1573c6a22f9f7f4ad6db"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"817e06f40524be4414dad9eefb311425cb3d1e33","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        # NOTE(stephenfin): These can raise exceptions but these have already"},{"line_number":174,"context_line":"        # been validated by \u0027nova.virt.hardware.numa_get_constraints\u0027 in the"},{"line_number":175,"context_line":"        # API layer (see change I06fad233006c7bab14749a51ffa226c3801f951b)."},{"line_number":176,"context_line":"        # This call also handles conflicts between explicit VCPU/PCPU"},{"line_number":177,"context_line":"        # requests and implicit \u0027hw:cpu_policy\u0027-based requests, mismatches"},{"line_number":178,"context_line":"        # between the number of CPUs in the flavor and explicit VCPU/PCPU"},{"line_number":179,"context_line":"        # requests, etc."}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_8149898f","line":176,"range":{"start_line":176,"start_character":10,"end_line":176,"end_character":14},"updated":"2019-08-08 09:14:30.000000000","message":"That","commit_id":"91367c8ca0142eefa17f30df186dc43807c59bc6"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        # TODO(efried): Handle member_of[$N], which will need to be reconciled"},{"line_number":94,"context_line":"        # with destination.aggregates handling in resources_from_request_spec"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        # request_spec.image is nullable"},{"line_number":97,"context_line":"        if \u0027image\u0027 in request_spec and request_spec.image:"},{"line_number":98,"context_line":"            image \u003d request_spec.image"},{"line_number":99,"context_line":"        else:"},{"line_number":100,"context_line":"            image \u003d objects.ImageMeta(properties\u003dobjects.ImageMetaProps())"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # Parse the flavor extra specs"},{"line_number":103,"context_line":"        self._process_extra_specs(request_spec.flavor)"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_5b650444","line":100,"range":{"start_line":96,"start_character":8,"end_line":100,"end_character":74},"updated":"2019-09-04 14:57:14.000000000","message":"Why wasn\u0027t this change needed earlier (and unrelated to this series)?","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        # TODO(efried): Handle member_of[$N], which will need to be reconciled"},{"line_number":94,"context_line":"        # with destination.aggregates handling in resources_from_request_spec"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        # request_spec.image is nullable"},{"line_number":97,"context_line":"        if \u0027image\u0027 in request_spec and request_spec.image:"},{"line_number":98,"context_line":"            image \u003d request_spec.image"},{"line_number":99,"context_line":"        else:"},{"line_number":100,"context_line":"            image \u003d objects.ImageMeta(properties\u003dobjects.ImageMetaProps())"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # Parse the flavor extra specs"},{"line_number":103,"context_line":"        self._process_extra_specs(request_spec.flavor)"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_ac04f914","line":100,"range":{"start_line":96,"start_character":8,"end_line":100,"end_character":74},"in_reply_to":"7faddb67_5b650444","updated":"2019-09-04 17:46:03.000000000","message":"I called it out in another patch. I haven\u0027t seen a follow-up for it since so I\u0027m fixing it here.\n\n[1] https://review.opendev.org/#/c/664420/47/nova/scheduler/utils.py@95","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        merged_resources \u003d self.merged_resources()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        if (orc.VCPU not in merged_resources and"},{"line_number":119,"context_line":"                orc.PCPU not in merged_resources):"},{"line_number":120,"context_line":"            self._add_resource(None, orc.VCPU, request_spec.vcpus)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if orc.MEMORY_MB not in merged_resources:"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_db501461","line":119,"range":{"start_line":119,"start_character":16,"end_line":119,"end_character":24},"updated":"2019-09-04 14:57:14.000000000","message":"nts: Come back later and understand how this changes the behavior of explicit PCPU requests in extra specs. Should we have done this earlier in the series?","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        # VCPUs which we include by default"},{"line_number":212,"context_line":"        if cpu_policy \u003d\u003d obj_fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":213,"context_line":"            # Switch VCPU -\u003e PCPU"},{"line_number":214,"context_line":"            vcpus \u003d flavor.vcpus"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"            LOG.debug(\u0027Translating request for %(vcpu_rc)s\u003d%(vcpus)d to \u0027"},{"line_number":217,"context_line":"                      \u0027%(vcpu_rc)s\u003d0,%(pcpu_rc)s\u003d%(vcpus)d\u0027,"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_dbfed436","line":214,"range":{"start_line":214,"start_character":12,"end_line":214,"end_character":17},"updated":"2019-09-04 14:57:14.000000000","message":"I think I get why you called this `vcpus`, but IMO `pcpus` would be more appropriate.","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c9d999b7cd12f3259486e3c8426431eb2fdd6937","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        # VCPUs which we include by default"},{"line_number":212,"context_line":"        if cpu_policy \u003d\u003d obj_fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":213,"context_line":"            # Switch VCPU -\u003e PCPU"},{"line_number":214,"context_line":"            vcpus \u003d flavor.vcpus"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"            LOG.debug(\u0027Translating request for %(vcpu_rc)s\u003d%(vcpus)d to \u0027"},{"line_number":217,"context_line":"                      \u0027%(vcpu_rc)s\u003d0,%(pcpu_rc)s\u003d%(vcpus)d\u0027,"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_fb8ce535","line":214,"range":{"start_line":214,"start_character":12,"end_line":214,"end_character":17},"in_reply_to":"7faddb67_8c0d7d36","updated":"2019-09-04 21:14:28.000000000","message":"Yeah, like I said, I get it, and still have the same opinion. Let me draw a somewhat pedantic parallel. If I wanted to set the number of widgets, I would do this:\n\n num_widgets \u003d 0\n for _ in widgets:\n     num_widgets +\u003d 1\n foo.num_widgets \u003d num_widgets\n\nnot this:\n\n zero \u003d 0\n for _ in widgets:\n     zero +\u003d 1\n foo.num_widgets \u003d zero\n\nWhat you have reads like the latter, and it\u0027s weird.\n\nNot going to die on a hill, or insist that you do it here rather than a fup, but I would greatly prefer it changed.","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        # VCPUs which we include by default"},{"line_number":212,"context_line":"        if cpu_policy \u003d\u003d obj_fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":213,"context_line":"            # Switch VCPU -\u003e PCPU"},{"line_number":214,"context_line":"            vcpus \u003d flavor.vcpus"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"            LOG.debug(\u0027Translating request for %(vcpu_rc)s\u003d%(vcpus)d to \u0027"},{"line_number":217,"context_line":"                      \u0027%(vcpu_rc)s\u003d0,%(pcpu_rc)s\u003d%(vcpus)d\u0027,"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_8c0d7d36","line":214,"range":{"start_line":214,"start_character":12,"end_line":214,"end_character":17},"in_reply_to":"7faddb67_dbfed436","updated":"2019-09-04 17:46:03.000000000","message":"Technically they\u0027re still vcpus until we translate them, so I\u0027m going to leave this unless you really want it changed","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"71259da813f5bd3996d5753bf7b2b907b128840f","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        # VCPUs which we include by default"},{"line_number":212,"context_line":"        if cpu_policy \u003d\u003d obj_fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":213,"context_line":"            # Switch VCPU -\u003e PCPU"},{"line_number":214,"context_line":"            vcpus \u003d flavor.vcpus"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"            LOG.debug(\u0027Translating request for %(vcpu_rc)s\u003d%(vcpus)d to \u0027"},{"line_number":217,"context_line":"                      \u0027%(vcpu_rc)s\u003d0,%(pcpu_rc)s\u003d%(vcpus)d\u0027,"}],"source_content_type":"text/x-python","patch_set":35,"id":"5faad753_dc75089a","line":214,"range":{"start_line":214,"start_character":12,"end_line":214,"end_character":17},"in_reply_to":"7faddb67_fb8ce535","updated":"2019-09-09 11:25:20.000000000","message":"Done","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1a868f2bfd55ec7831358a05396a95415be09fe9","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        # VCPUs which we include by default"},{"line_number":212,"context_line":"        if cpu_policy \u003d\u003d obj_fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":213,"context_line":"            # Switch VCPU -\u003e PCPU"},{"line_number":214,"context_line":"            cpus \u003d flavor.vcpus"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"            LOG.debug(\u0027Translating request for %(vcpu_rc)s\u003d%(cpus)d to \u0027"},{"line_number":217,"context_line":"                      \u0027%(vcpu_rc)s\u003d0,%(pcpu_rc)s\u003d%(cpus)d\u0027,"}],"source_content_type":"text/x-python","patch_set":39,"id":"5faad753_7752ef69","line":214,"updated":"2019-09-09 12:37:55.000000000","message":"heh, nice compromise :P","commit_id":"339e9c7bbfbc98d71d407d87567ad8f17cc6793c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1cd012d3a7270f8cf270bfa40d02609c519fc01b","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                LOG.debug(\u0027Adding additional %(pcpu_rc)s to account for \u0027"},{"line_number":225,"context_line":"                          \u0027emulator threads\u0027, {\u0027pcpu_rc\u0027: orc.PCPU})"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"            self._add_resource(None, orc.PCPU, cpus)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        trait \u003d {"},{"line_number":230,"context_line":"            obj_fields.CPUThreadAllocationPolicy.ISOLATE: \u0027forbidden\u0027,"}],"source_content_type":"text/x-python","patch_set":40,"id":"5faad753_80ff19a9","line":227,"updated":"2019-09-09 18:14:00.000000000","message":"I must be missing this, but where do you zero out the VCPUs for this request since you\u0027ve exchanged for PCPUs? You said you would in the log message on L216, but I don\u0027t see it.","commit_id":"7c0d0ee0f9691734819a216edffca1b46d8c3d9c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7fa80c47b90e176b5b7537d74b1c3c5c3f88ed81","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                LOG.debug(\u0027Adding additional %(pcpu_rc)s to account for \u0027"},{"line_number":225,"context_line":"                          \u0027emulator threads\u0027, {\u0027pcpu_rc\u0027: orc.PCPU})"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"            self._add_resource(None, orc.PCPU, cpus)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        trait \u003d {"},{"line_number":230,"context_line":"            obj_fields.CPUThreadAllocationPolicy.ISOLATE: \u0027forbidden\u0027,"}],"source_content_type":"text/x-python","patch_set":40,"id":"5faad753_bb99117a","line":227,"in_reply_to":"5faad753_5c8341cd","updated":"2019-09-10 15:16:53.000000000","message":"That\u0027s pretty unfortunate that it\u0027s so far away. What happens when I want to have VCPU and PCPU resources in a single request? You\u0027re going to put that in here and somehow change the logic at L118 to detect that we\u0027ve already special-cased VCPU?\n\nYes, I think a comment at a minimum but also I think it\u0027d probably be better to return a sentinel out of here that says \"we handled the *CPU request as a special case\" that the calling code can specifically check to know whether or not to do the standard-case VCPU addition.\n\nAlso, merged_resources will have things like PCPU inside if someone added something like resource:PCPU\u003d2 to the flavor, yeah? So the original code always deferred to that (L118). Shouldn\u0027t you either (a) fail here if you find it is already set or (b) use that value instead of flavor.vcpus?","commit_id":"7c0d0ee0f9691734819a216edffca1b46d8c3d9c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3d2888b9e124b95e12e90d5b1987f2770358048d","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                LOG.debug(\u0027Adding additional %(pcpu_rc)s to account for \u0027"},{"line_number":225,"context_line":"                          \u0027emulator threads\u0027, {\u0027pcpu_rc\u0027: orc.PCPU})"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"            self._add_resource(None, orc.PCPU, cpus)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        trait \u003d {"},{"line_number":230,"context_line":"            obj_fields.CPUThreadAllocationPolicy.ISOLATE: \u0027forbidden\u0027,"}],"source_content_type":"text/x-python","patch_set":40,"id":"5faad753_5c8341cd","line":227,"in_reply_to":"5faad753_80ff19a9","updated":"2019-09-10 09:17:48.000000000","message":"We don\u0027t zero them out - we simply never set them. See L118. The log makes sense when viewed in context (i.e. in actual logs) but I agree it\u0027s slightly confusing here. Would a comment help?\n\n(fwiw, we zeroed them out in an earlier PS before I realized this approach was less hacky/error prone)","commit_id":"7c0d0ee0f9691734819a216edffca1b46d8c3d9c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"03d71f182a8fe3767505a0cfb773594835f84670","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                LOG.debug(\u0027Adding additional %(pcpu_rc)s to account for \u0027"},{"line_number":225,"context_line":"                          \u0027emulator threads\u0027, {\u0027pcpu_rc\u0027: orc.PCPU})"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"            self._add_resource(None, orc.PCPU, cpus)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        trait \u003d {"},{"line_number":230,"context_line":"            obj_fields.CPUThreadAllocationPolicy.ISOLATE: \u0027forbidden\u0027,"}],"source_content_type":"text/x-python","patch_set":40,"id":"5faad753_09748098","line":227,"in_reply_to":"5faad753_bb99117a","updated":"2019-09-11 15:45:00.000000000","message":"\u003e That\u0027s pretty unfortunate that it\u0027s so far away. What happens when\n \u003e I want to have VCPU and PCPU resources in a single request? You\u0027re\n \u003e going to put that in here and somehow change the logic at L118 to\n \u003e detect that we\u0027ve already special-cased VCPU?\n\nBoom.\n\nhttps://review.opendev.org/#/c/671801/40/nova/virt/hardware.py@1762\n\nWe do it there so we\u0027ll trigger an error at the API level which calls that function (\u0027numa_get_constraints\u0027) now.\n\n \u003e Yes, I think a comment at a minimum but also I think it\u0027d probably\n \u003e be better to return a sentinel out of here that says \"we handled\n \u003e the *CPU request as a special case\" that the calling code can\n \u003e specifically check to know whether or not to do the standard-case\n \u003e VCPU addition.\n\nI\u0027m conflicted on this. On one hand, it would be very easy return True or False and just check that instead, but other other, we\u0027re logic behind whether we should add $(flavor.vcpus) VCPU between two places.\n\n \u003e Also, merged_resources will have things like PCPU inside if someone\n \u003e added something like resource:PCPU\u003d2 to the flavor, yeah? So the\n \u003e original code always deferred to that (L118). Shouldn\u0027t you either\n \u003e (a) fail here if you find it is already set or (b) use that value\n \u003e instead of flavor.vcpus?\n\nAs above, we\u0027re handling this in \u0027numa_get_constraints\u0027 so the API will reject the request. I\u0027ll add a comment to this effect.","commit_id":"7c0d0ee0f9691734819a216edffca1b46d8c3d9c"}],"nova/tests/functional/libvirt/test_numa_servers.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        self.mock_conn.return_value \u003d fake_connection"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        extra_spec \u003d {\u0027hw:numa_nodes\u0027: \u00272\u0027}"},{"line_number":124,"context_line":"        flavor_id \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003dextra_spec)"},{"line_number":125,"context_line":"        expected_usage \u003d {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2}"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        server \u003d self._run_build_test(flavor_id, expected_usage\u003dexpected_usage)"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_9b25bcc1","line":124,"range":{"start_line":124,"start_character":40,"end_line":124,"end_character":48},"updated":"2019-09-04 14:57:14.000000000","message":"This wasn\u0027t necessary, right?\n\nI\u0027m okay with being explicit, but as part of this delta it stands out because at first glance it makes it look like you\u0027re now required to specify something you weren\u0027t before.","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        self.mock_conn.return_value \u003d fake_connection"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        extra_spec \u003d {\u0027hw:numa_nodes\u0027: \u00272\u0027}"},{"line_number":124,"context_line":"        flavor_id \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003dextra_spec)"},{"line_number":125,"context_line":"        expected_usage \u003d {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2}"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        server \u003d self._run_build_test(flavor_id, expected_usage\u003dexpected_usage)"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_ec2751b5","line":124,"range":{"start_line":124,"start_character":40,"end_line":124,"end_character":48},"in_reply_to":"7faddb67_9b25bcc1","updated":"2019-09-04 17:46:03.000000000","message":"No, I was being explicit since it took me a bit to figure out where the expected_usage value came from. I can drop this if you like","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            \u0027hw:cpu_thread_policy\u0027: \u0027prefer\u0027,"},{"line_number":171,"context_line":"        }"},{"line_number":172,"context_line":"        flavor_id \u003d self._create_flavor(vcpu\u003d5, extra_spec\u003dextra_spec)"},{"line_number":173,"context_line":"        expected_usage \u003d {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027PCPU\u0027: 5}"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        server \u003d self._run_build_test(flavor_id, expected_usage\u003dexpected_usage)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_3e4d9671","line":173,"range":{"start_line":173,"start_character":61,"end_line":173,"end_character":62},"updated":"2019-09-04 14:57:14.000000000","message":"✔","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        self.mock_conn.return_value \u003d fake_connection"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        extra_spec \u003d {\u0027resources:PCPU\u0027: \u00272\u0027}"},{"line_number":260,"context_line":"        flavor_id \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003dextra_spec)"},{"line_number":261,"context_line":"        expected_usage \u003d {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027PCPU\u0027: 2}"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        server \u003d self._run_build_test(flavor_id, expected_usage\u003dexpected_usage)"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_beae66e4","line":260,"range":{"start_line":260,"start_character":45,"end_line":260,"end_character":46},"updated":"2019-09-04 14:57:14.000000000","message":"Save me finding the discussion in the spec and remind me why we require vcpus\u003d\u003dpcpus in this case?\n\nIt\u0027s going to make the cutover to mixed VMs more difficult to manage :( so I hope there was a good reason.","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        self.mock_conn.return_value \u003d fake_connection"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        extra_spec \u003d {\u0027resources:PCPU\u0027: \u00272\u0027}"},{"line_number":260,"context_line":"        flavor_id \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003dextra_spec)"},{"line_number":261,"context_line":"        expected_usage \u003d {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027PCPU\u0027: 2}"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        server \u003d self._run_build_test(flavor_id, expected_usage\u003dexpected_usage)"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_8c3b3dc6","line":260,"range":{"start_line":260,"start_character":45,"end_line":260,"end_character":46},"in_reply_to":"7faddb67_beae66e4","updated":"2019-09-04 17:46:03.000000000","message":"It\u0027s not in the spec but we did discuss it on IRC. tl;dr: we only support flavor.vcpus !\u003d VCPU to workaround an ironic case, but it\u0027s a terrible idea otherwise. We don\u0027t need to worry about ironic for PCPUs so I\u0027d like to enforce this here. I don\u0027t think it should affect the switchover in any meaningful way","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":323,"context_line":"            self.computes[host] \u003d compute"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"            # and save the UUIDs for the corresponding resource providers"},{"line_number":326,"context_line":"            self.compute_rp_uuids[host] \u003d self.placement_api.get("},{"line_number":327,"context_line":"                \u0027/resource_providers?name\u003d%s\u0027 % host).body["},{"line_number":328,"context_line":"                \u0027resource_providers\u0027][0][\u0027uuid\u0027]"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        # Create server"},{"line_number":331,"context_line":"        flavor_a_id \u003d self._create_flavor(extra_spec\u003d{})"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_1ef21a06","line":328,"range":{"start_line":326,"start_character":42,"end_line":328,"end_character":48},"updated":"2019-09-04 14:57:14.000000000","message":"we oughtta make a helper for this","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":323,"context_line":"            self.computes[host] \u003d compute"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"            # and save the UUIDs for the corresponding resource providers"},{"line_number":326,"context_line":"            self.compute_rp_uuids[host] \u003d self.placement_api.get("},{"line_number":327,"context_line":"                \u0027/resource_providers?name\u003d%s\u0027 % host).body["},{"line_number":328,"context_line":"                \u0027resource_providers\u0027][0][\u0027uuid\u0027]"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        # Create server"},{"line_number":331,"context_line":"        flavor_a_id \u003d self._create_flavor(extra_spec\u003d{})"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_ec83d154","line":328,"range":{"start_line":326,"start_character":42,"end_line":328,"end_character":48},"in_reply_to":"7faddb67_1ef21a06","updated":"2019-09-04 17:46:03.000000000","message":"agreed, but later","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                expected_usage \u003d {\u0027VCPU\u0027: 0, \u0027PCPU\u0027: 0, \u0027DISK_GB\u0027: 0,"},{"line_number":349,"context_line":"                                  \u0027MEMORY_MB\u0027: 0}"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"            compute_usage \u003d self.placement_api.get("},{"line_number":352,"context_line":"                \u0027/resource_providers/%s/usages\u0027 % compute_rp_uuid).body["},{"line_number":353,"context_line":"                \u0027usages\u0027]"},{"line_number":354,"context_line":"            self.assertEqual(expected_usage, compute_usage)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        # We reset mock_filter because we want to ensure it\u0027s called as part of"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_3e8a761a","line":353,"range":{"start_line":351,"start_character":28,"end_line":353,"end_character":25},"updated":"2019-09-04 14:57:14.000000000","message":"Use self._get_provider_usages()\n\nIf you do that (or really even if you didn\u0027t), IMO this block (L343-354) would read better without the loop:\n\n expected_usage \u003d {...}\n src_usage \u003d self._get_provider_usages(self.compute_rp_uuids[original_host])\n self.assertEqual(expected_usage, src_usage)\n\n {likewise for the destination}","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                expected_usage \u003d {\u0027VCPU\u0027: 0, \u0027PCPU\u0027: 0, \u0027DISK_GB\u0027: 0,"},{"line_number":349,"context_line":"                                  \u0027MEMORY_MB\u0027: 0}"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"            compute_usage \u003d self.placement_api.get("},{"line_number":352,"context_line":"                \u0027/resource_providers/%s/usages\u0027 % compute_rp_uuid).body["},{"line_number":353,"context_line":"                \u0027usages\u0027]"},{"line_number":354,"context_line":"            self.assertEqual(expected_usage, compute_usage)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        # We reset mock_filter because we want to ensure it\u0027s called as part of"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_2c5009d5","line":353,"range":{"start_line":351,"start_character":28,"end_line":353,"end_character":25},"in_reply_to":"7faddb67_3e8a761a","updated":"2019-09-04 17:46:03.000000000","message":"Haven\u0027t done this yet since it\u0027s late, but I can come back to it","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        # all we want to know is whether the filter was correct and the"},{"line_number":378,"context_line":"        # resource usage has been updated"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        for host, compute_rp_uuid in self.compute_rp_uuids.items():"},{"line_number":381,"context_line":"            if host \u003d\u003d original_host:"},{"line_number":382,"context_line":"                # the host that had the instance should still have allocations"},{"line_number":383,"context_line":"                # since the resize hasn\u0027t been confirmed"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_9e6e0a62","line":380,"updated":"2019-09-04 14:57:14.000000000","message":"ditto above","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":394,"context_line":"                \u0027usages\u0027]"},{"line_number":395,"context_line":"            self.assertEqual(expected_usage, compute_usage)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        self.assertEqual(1, len(self.mock_filter.call_args_list))"},{"line_number":398,"context_line":"        args, kwargs \u003d self.mock_filter.call_args_list[0]"},{"line_number":399,"context_line":"        self.assertEqual(2, len(args))"},{"line_number":400,"context_line":"        self.assertEqual({}, kwargs)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        # Now confirm the resize and ensure our inventories update"},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_dec6c249","line":400,"range":{"start_line":397,"start_character":8,"end_line":400,"end_character":36},"updated":"2019-09-04 14:57:14.000000000","message":"Assuming we\u0027re doing this because asserting the exact values of the filter args, but even so, this can be reduced to\n\n self.mock_filter.assert_called_once_with(mock.ANY, mock.ANY)","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        server \u003d self._wait_for_state_change(server, \u0027ACTIVE\u0027)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        for host, compute_rp_uuid in self.compute_rp_uuids.items():"},{"line_number":410,"context_line":"            if host \u003d\u003d original_host:"},{"line_number":411,"context_line":"                # the host that had the instance should no longer have"},{"line_number":412,"context_line":"                # alocations since the resize has been confirmed"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_fee29ed3","line":409,"updated":"2019-09-04 14:57:14.000000000","message":"ditto above","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e19b8b72403f69c3b6c25a75a24ee4a0fe898671","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        flavor_id \u003d self._create_flavor(extra_spec\u003dextra_spec)"},{"line_number":213,"context_line":"        expected_usage \u003d {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2}"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        self._run_build_test(flavor_id, expected_usage\u003dexpected_usage)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def test_create_server_with_legacy_pinning_policy_fails(self):"},{"line_number":218,"context_line":"        \"\"\"Create a pinned instance on a host with no PCPUs."}],"source_content_type":"text/x-python","patch_set":46,"id":"5faad753_3ed646f3","line":215,"updated":"2019-09-12 04:35:06.000000000","message":"maybe it will be good we have a mock to ensure the case we have fallback.","commit_id":"ccc9fae3406f9d7084ecd29025d35100db0dd932"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d1076cb316256e9fb08fe650ab2db8bda44e4920","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        flavor_id \u003d self._create_flavor(extra_spec\u003dextra_spec)"},{"line_number":213,"context_line":"        expected_usage \u003d {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2}"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        self._run_build_test(flavor_id, expected_usage\u003dexpected_usage)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def test_create_server_with_legacy_pinning_policy_fails(self):"},{"line_number":218,"context_line":"        \"\"\"Create a pinned instance on a host with no PCPUs."}],"source_content_type":"text/x-python","patch_set":46,"id":"5faad753_efea2d0d","line":215,"in_reply_to":"5faad753_3ed646f3","updated":"2019-09-12 14:07:58.000000000","message":"I\u0027m testing this via a unit test now [1] so that should do the trick and avoid us reaching into nova guts from a functional test\n\n[1] https://review.opendev.org/#/c/671801/47/nova/tests/unit/scheduler/test_scheduler.py@274","commit_id":"ccc9fae3406f9d7084ecd29025d35100db0dd932"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e19b8b72403f69c3b6c25a75a24ee4a0fe898671","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        flavor_id \u003d self._create_flavor(vcpu\u003d5, extra_spec\u003dextra_spec)"},{"line_number":239,"context_line":"        self._run_build_test(flavor_id, end_status\u003d\u0027ERROR\u0027)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def test_create_server_with_legacy_policy_policy_quota_fails(self):"},{"line_number":242,"context_line":"        \"\"\"Create a pinned instance on a host with PCPUs but not enough quota."},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        This should fail because the quota request should fail."}],"source_content_type":"text/x-python","patch_set":46,"id":"5faad753_febf4ecd","line":241,"range":{"start_line":241,"start_character":39,"end_line":241,"end_character":52},"updated":"2019-09-12 04:35:06.000000000","message":"pinning_policy","commit_id":"ccc9fae3406f9d7084ecd29025d35100db0dd932"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e19b8b72403f69c3b6c25a75a24ee4a0fe898671","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        extra_spec \u003d {\u0027resources:PCPU\u0027: 2}"},{"line_number":325,"context_line":"        flavor_id \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003dextra_spec)"},{"line_number":326,"context_line":"        self._run_build_test(flavor_id, end_status\u003d\u0027ERROR\u0027,"},{"line_number":327,"context_line":"                             filter_called_on_error\u003dFalse)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def test_create_server_with_pcpu_quota_fails(self):"},{"line_number":330,"context_line":"        \"\"\"Create a pinned instance on a host with PCPUs but not enough quota."}],"source_content_type":"text/x-python","patch_set":46,"id":"5faad753_deddb214","line":327,"updated":"2019-09-12 04:35:06.000000000","message":"oh...If we explicltly request PCPU, then we won\u0027t have fallback.","commit_id":"ccc9fae3406f9d7084ecd29025d35100db0dd932"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d1076cb316256e9fb08fe650ab2db8bda44e4920","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        extra_spec \u003d {\u0027resources:PCPU\u0027: 2}"},{"line_number":325,"context_line":"        flavor_id \u003d self._create_flavor(vcpu\u003d2, extra_spec\u003dextra_spec)"},{"line_number":326,"context_line":"        self._run_build_test(flavor_id, end_status\u003d\u0027ERROR\u0027,"},{"line_number":327,"context_line":"                             filter_called_on_error\u003dFalse)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def test_create_server_with_pcpu_quota_fails(self):"},{"line_number":330,"context_line":"        \"\"\"Create a pinned instance on a host with PCPUs but not enough quota."}],"source_content_type":"text/x-python","patch_set":46,"id":"5faad753_afc995ac","line":327,"in_reply_to":"5faad753_deddb214","updated":"2019-09-12 14:07:58.000000000","message":"Correct. That\u0027s what I expect. We don\u0027t need to worry about this for upgrades since it wasn\u0027t possible before","commit_id":"ccc9fae3406f9d7084ecd29025d35100db0dd932"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d1076cb316256e9fb08fe650ab2db8bda44e4920","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        flavor_id \u003d self._create_flavor(vcpu\u003d5, extra_spec\u003dextra_spec)"},{"line_number":239,"context_line":"        self._run_build_test(flavor_id, end_status\u003d\u0027ERROR\u0027)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    def test_create_server_with_legacy_policy_policy_quota_fails(self):"},{"line_number":242,"context_line":"        \"\"\"Create a pinned instance on a host with PCPUs but not enough quota."},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        This should fail because the quota request should fail."}],"source_content_type":"text/x-python","patch_set":47,"id":"5faad753_4ffd81af","line":241,"range":{"start_line":241,"start_character":39,"end_line":241,"end_character":45},"updated":"2019-09-12 14:07:58.000000000","message":"pinning (as alex_xu called out in the previous PS)","commit_id":"03a6dc1c16088a02254e89b13d32a627a4dab98f"}],"nova/tests/functional/libvirt/test_rt_servers.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        self.flags(sysinfo_serial\u003d\u0027none\u0027, group\u003d\u0027libvirt\u0027)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def test_no_dedicated_cpu(self):"},{"line_number":30,"context_line":"        flavor \u003d self._create_flavor(extra_spec\u003d{"},{"line_number":31,"context_line":"            \u0027hw:cpu_realtime\u0027: \u0027yes\u0027})"},{"line_number":32,"context_line":"        server \u003d self._build_server(flavor)"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_7e4b0eb0","line":30,"updated":"2019-09-04 14:57:14.000000000","message":"unrelated whitespace change here \u0026 below","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"}],"nova/tests/unit/scheduler/test_utils.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        self._test_resources_from_request_spec(expected_resources, flavor)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_resources_from_request_spec_flavor_and_image_traits(self):"},{"line_number":99,"context_line":"        image \u003d objects.ImageMeta.from_dict({"},{"line_number":100,"context_line":"            \u0027properties\u0027: {"},{"line_number":101,"context_line":"                \u0027trait:CUSTOM_IMAGE_TRAIT1\u0027: \u0027required\u0027,"},{"line_number":102,"context_line":"                \u0027trait:CUSTOM_IMAGE_TRAIT2\u0027: \u0027required\u0027,"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_7ef9ce4b","line":99,"updated":"2019-09-04 14:57:14.000000000","message":"This delta doesn\u0027t appear to have been necessary?\n\nBut if you\u0027re going to do it, remove _get_image_with_traits as it\u0027s no longer used.\n\nBut don\u0027t do that here. This patch is big enough.","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        self._test_resources_from_request_spec(expected_resources, flavor)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def test_resources_from_request_spec_flavor_and_image_traits(self):"},{"line_number":99,"context_line":"        image \u003d objects.ImageMeta.from_dict({"},{"line_number":100,"context_line":"            \u0027properties\u0027: {"},{"line_number":101,"context_line":"                \u0027trait:CUSTOM_IMAGE_TRAIT1\u0027: \u0027required\u0027,"},{"line_number":102,"context_line":"                \u0027trait:CUSTOM_IMAGE_TRAIT2\u0027: \u0027required\u0027,"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_0c63cdb2","line":99,"in_reply_to":"7faddb67_7ef9ce4b","updated":"2019-09-04 17:46:03.000000000","message":"I\u0027ll tackle this in the next PS","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":883,"context_line":"        expected._rg_by_id[None] \u003d objects.RequestGroup("},{"line_number":884,"context_line":"            use_same_provider\u003dFalse,"},{"line_number":885,"context_line":"            resources\u003d{"},{"line_number":886,"context_line":"                # we should have two PCPUs, once due to hw_cpu_policy and the"},{"line_number":887,"context_line":"                # other due to cpu_thread_policy"},{"line_number":888,"context_line":"                \u0027PCPU\u0027: 2,"},{"line_number":889,"context_line":"                \u0027MEMORY_MB\u0027: 1024,"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_fe9a9e10","line":886,"range":{"start_line":886,"start_character":44,"end_line":886,"end_character":48},"updated":"2019-09-04 14:57:14.000000000","message":"one","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":883,"context_line":"        expected._rg_by_id[None] \u003d objects.RequestGroup("},{"line_number":884,"context_line":"            use_same_provider\u003dFalse,"},{"line_number":885,"context_line":"            resources\u003d{"},{"line_number":886,"context_line":"                # we should have two PCPUs, once due to hw_cpu_policy and the"},{"line_number":887,"context_line":"                # other due to cpu_thread_policy"},{"line_number":888,"context_line":"                \u0027PCPU\u0027: 2,"},{"line_number":889,"context_line":"                \u0027MEMORY_MB\u0027: 1024,"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_ac6b99b6","line":886,"range":{"start_line":886,"start_character":44,"end_line":886,"end_character":48},"in_reply_to":"7faddb67_fe9a9e10","updated":"2019-09-04 17:46:03.000000000","message":"Done","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e19b8b72403f69c3b6c25a75a24ee4a0fe898671","unresolved":false,"context_lines":[{"line_number":914,"context_line":"        flavor \u003d objects.Flavor("},{"line_number":915,"context_line":"            vcpus\u003d1, memory_mb\u003d1024, root_gb\u003d10, ephemeral_gb\u003d5, swap\u003d0,"},{"line_number":916,"context_line":"            extra_specs\u003d{"},{"line_number":917,"context_line":"                \u0027hw:cpu_policy\u0027: \u0027dedicated\u0027,"},{"line_number":918,"context_line":"                \u0027hw:cpu_thread_policy\u0027: \u0027isolate\u0027,"},{"line_number":919,"context_line":"                \u0027hw:emulator_threads_policy\u0027: \u0027isolate\u0027,"},{"line_number":920,"context_line":"            })"},{"line_number":921,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"5faad753_7ec11e80","line":918,"range":{"start_line":917,"start_character":34,"end_line":918,"end_character":50},"updated":"2019-09-12 04:35:06.000000000","message":"it will be good to have test case for hw:cpu_policy \u003d shared, and a case for cpu_thread_policy \u003d prefer","commit_id":"ccc9fae3406f9d7084ecd29025d35100db0dd932"}],"nova/tests/unit/virt/libvirt/fake_imagebackend.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":"            return disk"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        setattr(image_init, \u0027SUPPORTS_CLONE\u0027, False)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        return image_init"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_5e66522b","line":183,"updated":"2019-09-04 14:57:14.000000000","message":"?","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":"            return disk"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        setattr(image_init, \u0027SUPPORTS_CLONE\u0027, False)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        return image_init"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_8c649de6","line":183,"in_reply_to":"7faddb67_5e66522b","updated":"2019-09-04 17:46:03.000000000","message":"Try removing it. The resize confirm option craps out if you don\u0027t do this.","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"}],"nova/virt/hardware.py":[{"author":{"_account_id":20182,"name":"Bhagyashri Shewale","email":"bshewale@redhat.com","username":"bhagyashris"},"change_message_id":"ec09470c717ffcc2dc55e8be0c11a5f2026433b4","unresolved":false,"context_lines":[{"line_number":1668,"context_line":"            \"property; use one or the other\")"},{"line_number":1669,"context_line":""},{"line_number":1670,"context_line":"    if requested_vcpus and requested_pcpus:"},{"line_number":1671,"context_line":"        raise exception.Invalid("},{"line_number":1672,"context_line":"            \"It is not possible to specify both \u0027resources:VCPU\u0027 and \""},{"line_number":1673,"context_line":"            \"\u0027resources:PCPU\u0027 extra specs; use one or the other\")"},{"line_number":1674,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_9d11e9b2","line":1671,"range":{"start_line":1671,"start_character":8,"end_line":1671,"end_character":31},"updated":"2019-08-08 01:46:20.000000000","message":"Looking at the code it seems that this is raised here and not handled/catch anywhere in the code so This needs to handled at api level otherwise it will raise HTTP 500 error as below:\n\nERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n\u003cclass \u0027nova.exception.Invalid\u0027\u003e (HTTP 500) (Request-ID: req-b8bf7b58-522b-4a2f-80d8-06bfdf439668)\n\nSame for all the other cases.","commit_id":"91367c8ca0142eefa17f30df186dc43807c59bc6"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3f51e1def0c2cbd1493bb991f862625f0102ea8a","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"    requested_pcpu \u003d 0"},{"line_number":1482,"context_line":""},{"line_number":1483,"context_line":"    for key, val in flavor.get(\u0027extra_specs\u0027, {}).items():"},{"line_number":1484,"context_line":"        if re.match(\u0027resources([1-9][0-9]*)?:%s\u0027 % orc.VCPU, key):"},{"line_number":1485,"context_line":"            try:"},{"line_number":1486,"context_line":"                requested_vcpu +\u003d int(val)"},{"line_number":1487,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":25,"id":"7faddb67_9486a616","line":1484,"range":{"start_line":1484,"start_character":30,"end_line":1484,"end_character":44},"updated":"2019-08-22 21:31:39.000000000","message":"Not anymore [1], though perhaps we don\u0027t document and so technically don\u0027t support this in flavor extra specs?\n\nRegardless, the patterns should be pulled out (and precompiled) from here, L1490, L1503.\n\n[1] https://docs.openstack.org/placement/latest/placement-api-microversion-history.html#support-string-request-group-suffixes","commit_id":"191288441022c2b07ce46f422ea2af77ad61488a"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"eb6e1c1377e4a36afcbddd177e8dcaa5a1f446f6","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"    requested_pcpu \u003d 0"},{"line_number":1482,"context_line":""},{"line_number":1483,"context_line":"    for key, val in flavor.get(\u0027extra_specs\u0027, {}).items():"},{"line_number":1484,"context_line":"        if re.match(\u0027resources([1-9][0-9]*)?:%s\u0027 % orc.VCPU, key):"},{"line_number":1485,"context_line":"            try:"},{"line_number":1486,"context_line":"                requested_vcpu +\u003d int(val)"},{"line_number":1487,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":25,"id":"7faddb67_d415f39c","line":1484,"range":{"start_line":1484,"start_character":30,"end_line":1484,"end_character":44},"in_reply_to":"7faddb67_740bdfd4","updated":"2019-08-23 12:44:34.000000000","message":"we proably shoudl not rely on the internal cacheing on python2.7 at least on python 3.7 it would not be too bad but if we repeat this pattern across nova that would be bad as its a global regex cache i belive.\n\ni would make it a module level regex and declare it just above the function or if you really want to keep it local then compile it outside of the loop and then use it in the loop.","commit_id":"191288441022c2b07ce46f422ea2af77ad61488a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7635ba93c78adf16031f1df84a02e6520eb99d13","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"    requested_pcpu \u003d 0"},{"line_number":1482,"context_line":""},{"line_number":1483,"context_line":"    for key, val in flavor.get(\u0027extra_specs\u0027, {}).items():"},{"line_number":1484,"context_line":"        if re.match(\u0027resources([1-9][0-9]*)?:%s\u0027 % orc.VCPU, key):"},{"line_number":1485,"context_line":"            try:"},{"line_number":1486,"context_line":"                requested_vcpu +\u003d int(val)"},{"line_number":1487,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":25,"id":"7faddb67_9ea0fc44","line":1484,"range":{"start_line":1484,"start_character":30,"end_line":1484,"end_character":44},"in_reply_to":"7faddb67_9486a616","updated":"2019-08-23 10:52:36.000000000","message":"That shouldn\u0027t be necessary since Python caches this for us, right? [1] I could make it a global but seeing as this is currently the only function that uses this here (the other one is for traits, not resources), I\u0027d much rather the locality.\n\n[1] https://stackoverflow.com/q/12514157/","commit_id":"191288441022c2b07ce46f422ea2af77ad61488a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"265e6defed2f596750af96fbe8904783de8b73c9","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"    requested_pcpu \u003d 0"},{"line_number":1482,"context_line":""},{"line_number":1483,"context_line":"    for key, val in flavor.get(\u0027extra_specs\u0027, {}).items():"},{"line_number":1484,"context_line":"        if re.match(\u0027resources([1-9][0-9]*)?:%s\u0027 % orc.VCPU, key):"},{"line_number":1485,"context_line":"            try:"},{"line_number":1486,"context_line":"                requested_vcpu +\u003d int(val)"},{"line_number":1487,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":25,"id":"7faddb67_740bdfd4","line":1484,"range":{"start_line":1484,"start_character":30,"end_line":1484,"end_character":44},"in_reply_to":"7faddb67_9ea0fc44","updated":"2019-08-23 12:25:30.000000000","message":"- I\u0027m talking about DRYing the suffix pattern\n- ...which is no longer ``([1-9][0-9]*)?`` -- it\u0027s now ``[a-zA-Z0-9_-]{1,64}`` [1]\n- ...though I guess not until we start using placement microversion 1.33+ for GET /a_c\n- ...at which point it would be nice to replace it in one place rather than three\n- ...and at the very least you could pull the string construction (and regex compile) out of the loop.\n\n[1] https://opendev.org/openstack/placement/src/branch/master/placement/schemas/common.py#L27","commit_id":"191288441022c2b07ce46f422ea2af77ad61488a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":1460,"context_line":"    elif image_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":1461,"context_line":"        cpu_policy \u003d image_policy"},{"line_number":1462,"context_line":"    else:"},{"line_number":1463,"context_line":"        cpu_policy \u003d None"},{"line_number":1464,"context_line":""},{"line_number":1465,"context_line":"    return cpu_policy"},{"line_number":1466,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_f9d7184e","line":1463,"range":{"start_line":1463,"start_character":21,"end_line":1463,"end_character":25},"updated":"2019-09-04 14:57:14.000000000","message":"why?","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":1460,"context_line":"    elif image_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":1461,"context_line":"        cpu_policy \u003d image_policy"},{"line_number":1462,"context_line":"    else:"},{"line_number":1463,"context_line":"        cpu_policy \u003d None"},{"line_number":1464,"context_line":""},{"line_number":1465,"context_line":"    return cpu_policy"},{"line_number":1466,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_0cec2d27","line":1463,"range":{"start_line":1463,"start_character":21,"end_line":1463,"end_character":25},"in_reply_to":"7faddb67_f9d7184e","updated":"2019-09-04 17:46:03.000000000","message":"Line 1754 below [1]. I need to know what the policy actually is so I can determine whether a policy has been set by the user and error out if they\u0027ve also requested explicit PCPUs or VCPUs\n\n[1] https://review.opendev.org/#/c/671801/35/nova/virt/hardware.py@1754","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":1571,"context_line":"    requested_pcpu \u003d 0"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"    for key, val in flavor.get(\u0027extra_specs\u0027, {}).items():"},{"line_number":1574,"context_line":"        if re.match(\u0027resources([1-9][0-9]*)?:%s\u0027 % orc.VCPU, key):"},{"line_number":1575,"context_line":"            try:"},{"line_number":1576,"context_line":"                requested_vcpu +\u003d int(val)"},{"line_number":1577,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_3921309f","line":1574,"range":{"start_line":1574,"start_character":21,"end_line":1574,"end_character":44},"updated":"2019-09-04 14:57:14.000000000","message":"I would prefer to refactor and reuse nova.scheduler.utils.ResourceRequest.XS_* so we don\u0027t have to duplicate (at least the suffix part) of this regex.\n\nEspecially since it\u0027s going to change as soon as we adopt placement microversion 1.33 [1].\n\nI guess we can do that in a subsequent patch, but I fear missing copies, especially when they\u0027re spread out like this.\n\n[1] https://docs.openstack.org/placement/latest/placement-api-microversion-history.html#support-string-request-group-suffixes","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":1571,"context_line":"    requested_pcpu \u003d 0"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"    for key, val in flavor.get(\u0027extra_specs\u0027, {}).items():"},{"line_number":1574,"context_line":"        if re.match(\u0027resources([1-9][0-9]*)?:%s\u0027 % orc.VCPU, key):"},{"line_number":1575,"context_line":"            try:"},{"line_number":1576,"context_line":"                requested_vcpu +\u003d int(val)"},{"line_number":1577,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_8ca9fddd","line":1574,"range":{"start_line":1574,"start_character":21,"end_line":1574,"end_character":44},"in_reply_to":"7faddb67_3921309f","updated":"2019-09-04 17:46:03.000000000","message":"Yeah, I\u0027ll definitely come round and clean this up later, but I\u0027ve already done a _lot_ of clean up and I\u0027d like to get functional changes merged now :)","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":1577,"context_line":"            except ValueError:"},{"line_number":1578,"context_line":"                # this is handled elsewhere"},{"line_number":1579,"context_line":"                pass"},{"line_number":1580,"context_line":"        if re.match(\u0027resources([1-9][0-9]*)?:%s\u0027 % orc.PCPU, key):"},{"line_number":1581,"context_line":"            try:"},{"line_number":1582,"context_line":"                requested_pcpu +\u003d int(val)"},{"line_number":1583,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_f93b98c4","line":1580,"range":{"start_line":1580,"start_character":21,"end_line":1580,"end_character":44},"updated":"2019-09-04 14:57:14.000000000","message":"ditto","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":1584,"context_line":"                # this is handled elsewhere"},{"line_number":1585,"context_line":"                pass"},{"line_number":1586,"context_line":""},{"line_number":1587,"context_line":"    return (requested_vcpu, requested_pcpu)"},{"line_number":1588,"context_line":""},{"line_number":1589,"context_line":""},{"line_number":1590,"context_line":"def _get_hyperthreading_trait(flavor, image_meta):"}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_39561007","line":1587,"range":{"start_line":1587,"start_character":11,"end_line":1587,"end_character":12},"updated":"2019-09-04 14:57:14.000000000","message":"parens redundant","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":1590,"context_line":"def _get_hyperthreading_trait(flavor, image_meta):"},{"line_number":1591,"context_line":"    # type: (objects.Flavor, objects.ImageMeta) -\u003e Optional[str]"},{"line_number":1592,"context_line":"    for key, val in flavor.get(\u0027extra_specs\u0027, {}).items():"},{"line_number":1593,"context_line":"        if re.match(\u0027trait([1-9][0-9]*)?:%s\u0027 % os_traits.HW_CPU_HYPERTHREADING,"},{"line_number":1594,"context_line":"                    key):"},{"line_number":1595,"context_line":"            return val"},{"line_number":1596,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"7faddb67_7979e890","line":1593,"range":{"start_line":1593,"start_character":26,"end_line":1593,"end_character":40},"updated":"2019-09-04 14:57:14.000000000","message":"as above","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f71dfa09c0a4d1765927d143628eb240865c0479","unresolved":false,"context_lines":[{"line_number":1782,"context_line":"        cpu_policy \u003d fields.CPUAllocationPolicy.DEDICATED"},{"line_number":1783,"context_line":""},{"line_number":1784,"context_line":"    if requested_vcpus:"},{"line_number":1785,"context_line":"        if flavor.vcpus \u003c requested_pcpus:"},{"line_number":1786,"context_line":"            # This can\u0027t be an error yet since we\u0027ll break upgrades. Let\u0027s kick"},{"line_number":1787,"context_line":"            # this can down the road."},{"line_number":1788,"context_line":"            LOG.warning("}],"source_content_type":"text/x-python","patch_set":38,"id":"5faad753_a85b2a2c","line":1785,"range":{"start_line":1785,"start_character":26,"end_line":1785,"end_character":42},"updated":"2019-09-09 06:49:37.000000000","message":"there should be \u0027requested_vcpus\u0027","commit_id":"fdf1fc76f50c7fcb2806a1b08d27f65bedc8473d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"71259da813f5bd3996d5753bf7b2b907b128840f","unresolved":false,"context_lines":[{"line_number":1782,"context_line":"        cpu_policy \u003d fields.CPUAllocationPolicy.DEDICATED"},{"line_number":1783,"context_line":""},{"line_number":1784,"context_line":"    if requested_vcpus:"},{"line_number":1785,"context_line":"        if flavor.vcpus \u003c requested_pcpus:"},{"line_number":1786,"context_line":"            # This can\u0027t be an error yet since we\u0027ll break upgrades. Let\u0027s kick"},{"line_number":1787,"context_line":"            # this can down the road."},{"line_number":1788,"context_line":"            LOG.warning("}],"source_content_type":"text/x-python","patch_set":38,"id":"5faad753_1c35e0da","line":1785,"range":{"start_line":1785,"start_character":26,"end_line":1785,"end_character":42},"in_reply_to":"5faad753_a85b2a2c","updated":"2019-09-09 11:25:20.000000000","message":"I actually removed this and replaced it with a NOTE. This can\u0027t be done for a long time and even if it could be, this is the wrong place to do it.","commit_id":"fdf1fc76f50c7fcb2806a1b08d27f65bedc8473d"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e19b8b72403f69c3b6c25a75a24ee4a0fe898671","unresolved":false,"context_lines":[{"line_number":1515,"context_line":"    elif image_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":1516,"context_line":"        cpu_policy \u003d image_policy"},{"line_number":1517,"context_line":"    else:"},{"line_number":1518,"context_line":"        cpu_policy \u003d None"},{"line_number":1519,"context_line":""},{"line_number":1520,"context_line":"    return cpu_policy"},{"line_number":1521,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"5faad753_ab6d1605","line":1518,"range":{"start_line":1518,"start_character":21,"end_line":1518,"end_character":25},"updated":"2019-09-12 04:35:06.000000000","message":"I didn\u0027t see a reason change this, but it doesn\u0027t effect anything, except line 1861 you added a little check.","commit_id":"ccc9fae3406f9d7084ecd29025d35100db0dd932"}],"releasenotes/notes/cpu-resources-d4e6a0c12681fa87.yaml":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Compute nodes using the libvirt driver can now report ``PCPU`` inventory."},{"line_number":5,"context_line":"    This is consumed by instances with dedicated (pinned) CPUs. This can be"},{"line_number":6,"context_line":"    configured using the ``[compute] cpu_dedicated_set`` config option. Once"},{"line_number":7,"context_line":"    configured, the scheduler should be configured to translate the legacy"},{"line_number":8,"context_line":"    ``hw:cpu_policy`` flavor extra spec or ``hw_cpu_policy`` image metadata"},{"line_number":9,"context_line":"    property to ``PCPU`` requests. Refer to the help text of the ``[compute]"},{"line_number":10,"context_line":"    cpu_dedicated_set``, ``[compute] cpu_shared_set`` and ``vcpu_pin_set``"}],"source_content_type":"text/x-yaml","patch_set":35,"id":"7faddb67_b9b68024","line":7,"range":{"start_line":7,"start_character":20,"end_line":7,"end_character":50},"updated":"2019-09-04 14:57:14.000000000","message":"...via enable_pinning_policy_translation?","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Compute nodes using the libvirt driver can now report ``PCPU`` inventory."},{"line_number":5,"context_line":"    This is consumed by instances with dedicated (pinned) CPUs. This can be"},{"line_number":6,"context_line":"    configured using the ``[compute] cpu_dedicated_set`` config option. Once"},{"line_number":7,"context_line":"    configured, the scheduler should be configured to translate the legacy"},{"line_number":8,"context_line":"    ``hw:cpu_policy`` flavor extra spec or ``hw_cpu_policy`` image metadata"},{"line_number":9,"context_line":"    property to ``PCPU`` requests. Refer to the help text of the ``[compute]"},{"line_number":10,"context_line":"    cpu_dedicated_set``, ``[compute] cpu_shared_set`` and ``vcpu_pin_set``"}],"source_content_type":"text/x-yaml","patch_set":35,"id":"7faddb67_ecd19158","line":7,"range":{"start_line":7,"start_character":20,"end_line":7,"end_character":50},"in_reply_to":"7faddb67_b9b68024","updated":"2019-09-04 17:46:03.000000000","message":"Done","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    configured using the ``[compute] cpu_dedicated_set`` config option. Once"},{"line_number":7,"context_line":"    configured, the scheduler should be configured to translate the legacy"},{"line_number":8,"context_line":"    ``hw:cpu_policy`` flavor extra spec or ``hw_cpu_policy`` image metadata"},{"line_number":9,"context_line":"    property to ``PCPU`` requests. Refer to the help text of the ``[compute]"},{"line_number":10,"context_line":"    cpu_dedicated_set``, ``[compute] cpu_shared_set`` and ``vcpu_pin_set``"},{"line_number":11,"context_line":"    config options for more information."},{"line_number":12,"context_line":"  - |"},{"line_number":13,"context_line":"    Compute nodes using the libvirt driver will now report the"},{"line_number":14,"context_line":"    ``HW_CPU_HYPERTHREADING`` trait if the host has hyperthreading. When the"}],"source_content_type":"text/x-yaml","patch_set":35,"id":"7faddb67_39405006","line":11,"range":{"start_line":9,"start_character":48,"end_line":11,"end_character":40},"updated":"2019-09-04 14:57:14.000000000","message":"then shouldn\u0027t those help texts be beefed up to talk about enable_pinning_policy_translation?","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    configured using the ``[compute] cpu_dedicated_set`` config option. Once"},{"line_number":7,"context_line":"    configured, the scheduler should be configured to translate the legacy"},{"line_number":8,"context_line":"    ``hw:cpu_policy`` flavor extra spec or ``hw_cpu_policy`` image metadata"},{"line_number":9,"context_line":"    property to ``PCPU`` requests. Refer to the help text of the ``[compute]"},{"line_number":10,"context_line":"    cpu_dedicated_set``, ``[compute] cpu_shared_set`` and ``vcpu_pin_set``"},{"line_number":11,"context_line":"    config options for more information."},{"line_number":12,"context_line":"  - |"},{"line_number":13,"context_line":"    Compute nodes using the libvirt driver will now report the"},{"line_number":14,"context_line":"    ``HW_CPU_HYPERTHREADING`` trait if the host has hyperthreading. When the"}],"source_content_type":"text/x-yaml","patch_set":35,"id":"7faddb67_4cdd456b","line":11,"range":{"start_line":9,"start_character":48,"end_line":11,"end_character":40},"in_reply_to":"7faddb67_39405006","updated":"2019-09-04 17:46:03.000000000","message":"Done","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"858ab56a38463cb612c315096ab942f07fc2b2b0","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    cpu_dedicated_set``, ``[compute] cpu_shared_set`` and ``vcpu_pin_set``"},{"line_number":11,"context_line":"    config options for more information."},{"line_number":12,"context_line":"  - |"},{"line_number":13,"context_line":"    Compute nodes using the libvirt driver will now report the"},{"line_number":14,"context_line":"    ``HW_CPU_HYPERTHREADING`` trait if the host has hyperthreading. When the"},{"line_number":15,"context_line":"    scheduler has been configured with ``[scheduler]"},{"line_number":16,"context_line":"    enable_pinning_policy_translation \u003d True``, the legacy"}],"source_content_type":"text/x-yaml","patch_set":35,"id":"7faddb67_d94a5c25","line":13,"range":{"start_line":13,"start_character":43,"end_line":13,"end_character":58},"updated":"2019-09-04 14:57:14.000000000","message":"technically as of the previous patch","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0b58366b0fbd61efd8fd03f72bb1c5b779f708","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    cpu_dedicated_set``, ``[compute] cpu_shared_set`` and ``vcpu_pin_set``"},{"line_number":11,"context_line":"    config options for more information."},{"line_number":12,"context_line":"  - |"},{"line_number":13,"context_line":"    Compute nodes using the libvirt driver will now report the"},{"line_number":14,"context_line":"    ``HW_CPU_HYPERTHREADING`` trait if the host has hyperthreading. When the"},{"line_number":15,"context_line":"    scheduler has been configured with ``[scheduler]"},{"line_number":16,"context_line":"    enable_pinning_policy_translation \u003d True``, the legacy"}],"source_content_type":"text/x-yaml","patch_set":35,"id":"7faddb67_2ce24931","line":13,"range":{"start_line":13,"start_character":43,"end_line":13,"end_character":58},"in_reply_to":"7faddb67_d94a5c25","updated":"2019-09-04 17:46:03.000000000","message":"Yup, but that\u0027s approved now so I\u0027d like to keep this here to avoid needing another +2, if that\u0027s okay. It\u0027ll all look the same in the end","commit_id":"463da0ba3ff09a1698116963d080384f8e9cb0e8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"526968ddd5663b18daa58f8bf01050252d4b7cd7","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    correctly configured to report ``PCPU`` inventory. The ``[workarounds]"},{"line_number":33,"context_line":"    disable_fallback_pcpu_query`` config option can be used to disable this"},{"line_number":34,"context_line":"    fallback allocation candidate request, meaning only ``PCPU``-based"},{"line_number":35,"context_line":"    allocation candidates will be retrieved."},{"line_number":36,"context_line":"deprecations:"},{"line_number":37,"context_line":"  - |"},{"line_number":38,"context_line":"    The ``vcpu_pin_set`` configuration option has been deprecated. You should"}],"source_content_type":"text/x-yaml","patch_set":48,"id":"5faad753_74fb7178","line":35,"updated":"2019-09-12 16:05:46.000000000","message":"++ I wonder whether we could provide a nova-status upgrade check that would verify this.","commit_id":"c218948cc6c96709a769dd2fd5744030098a47a9"}]}
