)]}'
{"nova/exception.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ceec28686e4468b8bcddce304071d9ffdf7062e6","unresolved":false,"context_lines":[{"line_number":2323,"context_line":""},{"line_number":2324,"context_line":""},{"line_number":2325,"context_line":"class RequiredMixedOrRealtimeCPUMask(Invalid):"},{"line_number":2326,"context_line":"    msg_fmt \u003d _(\"Either \u0027hw:cpu_dedicated_mask\u0027 or \u0027hw:cpu_realtime_mask\u0027 \""},{"line_number":2327,"context_line":"                \"must be specified for \u0027mixed\u0027 CPU policy instance.\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_e89bf862","line":2326,"range":{"start_line":2326,"start_character":17,"end_line":2326,"end_character":23},"updated":"2020-06-22 10:29:53.000000000","message":"Must specify either","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"bbd518b17cf4cc16d3e116cd1325a0cf1454f683","unresolved":false,"context_lines":[{"line_number":2323,"context_line":""},{"line_number":2324,"context_line":""},{"line_number":2325,"context_line":"class RequiredMixedOrRealtimeCPUMask(Invalid):"},{"line_number":2326,"context_line":"    msg_fmt \u003d _(\"Either \u0027hw:cpu_dedicated_mask\u0027 or \u0027hw:cpu_realtime_mask\u0027 \""},{"line_number":2327,"context_line":"                \"must be specified for \u0027mixed\u0027 CPU policy instance.\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_426f1c2a","line":2326,"range":{"start_line":2326,"start_character":17,"end_line":2326,"end_character":23},"in_reply_to":"bf51134e_e89bf862","updated":"2020-06-29 11:12:33.000000000","message":"Done","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ceec28686e4468b8bcddce304071d9ffdf7062e6","unresolved":false,"context_lines":[{"line_number":2324,"context_line":""},{"line_number":2325,"context_line":"class RequiredMixedOrRealtimeCPUMask(Invalid):"},{"line_number":2326,"context_line":"    msg_fmt \u003d _(\"Either \u0027hw:cpu_dedicated_mask\u0027 or \u0027hw:cpu_realtime_mask\u0027 \""},{"line_number":2327,"context_line":"                \"must be specified for \u0027mixed\u0027 CPU policy instance.\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_28a17095","line":2327,"range":{"start_line":2327,"start_character":17,"end_line":2327,"end_character":38},"updated":"2020-06-22 10:29:53.000000000","message":"when using","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"bbd518b17cf4cc16d3e116cd1325a0cf1454f683","unresolved":false,"context_lines":[{"line_number":2324,"context_line":""},{"line_number":2325,"context_line":"class RequiredMixedOrRealtimeCPUMask(Invalid):"},{"line_number":2326,"context_line":"    msg_fmt \u003d _(\"Either \u0027hw:cpu_dedicated_mask\u0027 or \u0027hw:cpu_realtime_mask\u0027 \""},{"line_number":2327,"context_line":"                \"must be specified for \u0027mixed\u0027 CPU policy instance.\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_226ae818","line":2327,"range":{"start_line":2327,"start_character":17,"end_line":2327,"end_character":38},"in_reply_to":"bf51134e_28a17095","updated":"2020-06-29 11:12:33.000000000","message":"Done","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"}],"nova/objects/image_meta.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ceec28686e4468b8bcddce304071d9ffdf7062e6","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            if policy \u003d\u003d fields.CPUAllocationPolicy.MIXED:"},{"line_number":190,"context_line":"                raise exception.ObjectActionError("},{"line_number":191,"context_line":"                    action\u003d\u0027obj_make_compatible\u0027,"},{"line_number":192,"context_line":"                    reason\u003d\u0027hw_cpu_policy\u003d%s not supported in version %s\u0027 % ("},{"line_number":193,"context_line":"                        policy, target_version))"},{"line_number":194,"context_line":"        if target_version \u003c (1, 25):"},{"line_number":195,"context_line":"            primitive.pop(\u0027hw_pci_numa_affinity_policy\u0027, None)"},{"line_number":196,"context_line":"        if target_version \u003c (1, 24):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_c8b9d4cc","line":193,"range":{"start_line":192,"start_character":20,"end_line":193,"end_character":48},"updated":"2020-06-22 10:29:53.000000000","message":"or:\n\n  raise exception.ObjectActionError(\n      action\u003d\u0027obj_make_compatible\u0027,\n      reason\u003df\u0027hw_cpu_policy\u003d{mixed} not supported in version \u0027\n             f\u0027{target_version}\u0027,\n  )\n\nthough this is identical to below, so consider this an optional nit :)","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f94d2464322d90c1096e3c1f337e5497a9aafdfb","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            if policy \u003d\u003d fields.CPUAllocationPolicy.MIXED:"},{"line_number":190,"context_line":"                raise exception.ObjectActionError("},{"line_number":191,"context_line":"                    action\u003d\u0027obj_make_compatible\u0027,"},{"line_number":192,"context_line":"                    reason\u003d\u0027hw_cpu_policy\u003d%s not supported in version %s\u0027 % ("},{"line_number":193,"context_line":"                        policy, target_version))"},{"line_number":194,"context_line":"        if target_version \u003c (1, 25):"},{"line_number":195,"context_line":"            primitive.pop(\u0027hw_pci_numa_affinity_policy\u0027, None)"},{"line_number":196,"context_line":"        if target_version \u003c (1, 24):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_78158b48","line":193,"range":{"start_line":192,"start_character":20,"end_line":193,"end_character":48},"in_reply_to":"bf51134e_b62ab67b","updated":"2020-06-29 12:35:11.000000000","message":"Ah, correct. This should be wrapped in _(). Yeah, keep using printf-style formatting but add i18n markers.","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"bbd518b17cf4cc16d3e116cd1325a0cf1454f683","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            if policy \u003d\u003d fields.CPUAllocationPolicy.MIXED:"},{"line_number":190,"context_line":"                raise exception.ObjectActionError("},{"line_number":191,"context_line":"                    action\u003d\u0027obj_make_compatible\u0027,"},{"line_number":192,"context_line":"                    reason\u003d\u0027hw_cpu_policy\u003d%s not supported in version %s\u0027 % ("},{"line_number":193,"context_line":"                        policy, target_version))"},{"line_number":194,"context_line":"        if target_version \u003c (1, 25):"},{"line_number":195,"context_line":"            primitive.pop(\u0027hw_pci_numa_affinity_policy\u0027, None)"},{"line_number":196,"context_line":"        if target_version \u003c (1, 24):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_b62ab67b","line":193,"range":{"start_line":192,"start_character":20,"end_line":193,"end_character":48},"in_reply_to":"bf51134e_c8b9d4cc","updated":"2020-06-29 11:12:33.000000000","message":"I would like to use the f-string for a string with arguments, but I have one concern for the multi-language support, and we will drop the multi-language support for this message? (actually, I haven\u0027t surrounded the reason string with a _(), but I found it is common for the exception message.)","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"6e812d2a6a06e54245758f549063ecdf794ad837","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        if target_version \u003c (1, 26):"},{"line_number":188,"context_line":"            policy \u003d primitive.get(\u0027hw_cpu_policy\u0027, None)"},{"line_number":189,"context_line":"            if policy \u003d\u003d fields.CPUAllocationPolicy.MIXED:"},{"line_number":190,"context_line":"                raise exception.ObjectActionError("},{"line_number":191,"context_line":"                    action\u003d\u0027obj_make_compatible\u0027,"},{"line_number":192,"context_line":"                    reason\u003d_(\u0027hw_cpu_policy\u003d%s not supported in version %s\u0027)"},{"line_number":193,"context_line":"                           % (policy, target_version))"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_0fcb32a5","line":190,"updated":"2020-07-02 11:50:09.000000000","message":"pep8: N323: Found use of _() without explicit import of _ !","commit_id":"53444297c8d3e75cb493883ccc9bea1367f36aec"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"7d9e1ab1a90e677ad4dc30799eb00ce3e4c9fca0","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        if target_version \u003c (1, 26):"},{"line_number":188,"context_line":"            policy \u003d primitive.get(\u0027hw_cpu_policy\u0027, None)"},{"line_number":189,"context_line":"            if policy \u003d\u003d fields.CPUAllocationPolicy.MIXED:"},{"line_number":190,"context_line":"                raise exception.ObjectActionError("},{"line_number":191,"context_line":"                    action\u003d\u0027obj_make_compatible\u0027,"},{"line_number":192,"context_line":"                    reason\u003d_(\u0027hw_cpu_policy\u003d%s not supported in version %s\u0027)"},{"line_number":193,"context_line":"                           % (policy, target_version))"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf51134e_550d6d3c","line":190,"updated":"2020-07-08 11:40:19.000000000","message":"Done.","commit_id":"c98f534f512fc80b23f1320079f5f17375a62b50"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"ef118aeef3f0cdfa61f5479d6ac879a8b5312a9f","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        if target_version \u003c (1, 26):"},{"line_number":188,"context_line":"            policy \u003d primitive.get(\u0027hw_cpu_policy\u0027, None)"},{"line_number":189,"context_line":"            if policy \u003d\u003d fields.CPUAllocationPolicy.MIXED:"},{"line_number":190,"context_line":"                raise exception.ObjectActionError("},{"line_number":191,"context_line":"                    action\u003d\u0027obj_make_compatible\u0027,"},{"line_number":192,"context_line":"                    reason\u003d_(\u0027hw_cpu_policy\u003d%s not supported in version %s\u0027)"},{"line_number":193,"context_line":"                           % (policy, target_version))"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf51134e_c969338c","line":190,"updated":"2020-07-02 16:07:09.000000000","message":"pep8: N323: Found use of _() without explicit import of _ !","commit_id":"c98f534f512fc80b23f1320079f5f17375a62b50"}],"nova/objects/instance_numa.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ceec28686e4468b8bcddce304071d9ffdf7062e6","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # Instance with a \u0027mixed\u0027 CPU policy could not provide a backward"},{"line_number":45,"context_line":"        # compatibility."},{"line_number":46,"context_line":"        if target_version \u003c (1, 6):"},{"line_number":47,"context_line":"            if (primitive[\u0027cpu_policy\u0027] \u003d\u003d"},{"line_number":48,"context_line":"                    obj_fields.CPUAllocationPolicy.MIXED):"},{"line_number":49,"context_line":"                raise exception.IncompatibleMixedPolicyInstance"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # Note(huaqiang): From 1.4 to 1.5, the meaning of \u0027cpuset\u0027 was alerted"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_68c0882b","line":48,"range":{"start_line":47,"start_character":0,"end_line":48,"end_character":58},"updated":"2020-06-22 10:29:53.000000000","message":"if you drop the brackets, this will fit on one line","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"bbd518b17cf4cc16d3e116cd1325a0cf1454f683","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # Instance with a \u0027mixed\u0027 CPU policy could not provide a backward"},{"line_number":45,"context_line":"        # compatibility."},{"line_number":46,"context_line":"        if target_version \u003c (1, 6):"},{"line_number":47,"context_line":"            if (primitive[\u0027cpu_policy\u0027] \u003d\u003d"},{"line_number":48,"context_line":"                    obj_fields.CPUAllocationPolicy.MIXED):"},{"line_number":49,"context_line":"                raise exception.IncompatibleMixedPolicyInstance"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # Note(huaqiang): From 1.4 to 1.5, the meaning of \u0027cpuset\u0027 was alerted"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_a50a82ce","line":48,"range":{"start_line":47,"start_character":0,"end_line":48,"end_character":58},"in_reply_to":"bf51134e_68c0882b","updated":"2020-06-29 11:12:33.000000000","message":"After dropping the brackets, the line length is exactly 79 chars. Good catch.\n\nDone.","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ceec28686e4468b8bcddce304071d9ffdf7062e6","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        if target_version \u003c (1, 6):"},{"line_number":47,"context_line":"            if (primitive[\u0027cpu_policy\u0027] \u003d\u003d"},{"line_number":48,"context_line":"                    obj_fields.CPUAllocationPolicy.MIXED):"},{"line_number":49,"context_line":"                raise exception.IncompatibleMixedPolicyInstance"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # Note(huaqiang): From 1.4 to 1.5, the meaning of \u0027cpuset\u0027 was alerted"},{"line_number":52,"context_line":"        # and being special for keeping shared CPUs. We provide a backward"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_a8e3c0d8","line":49,"range":{"start_line":49,"start_character":32,"end_line":49,"end_character":63},"updated":"2020-06-22 10:29:53.000000000","message":"Why do you raise a custom exception instead of \u0027ObjectActionError\u0027?","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"bbd518b17cf4cc16d3e116cd1325a0cf1454f683","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        if target_version \u003c (1, 6):"},{"line_number":47,"context_line":"            if (primitive[\u0027cpu_policy\u0027] \u003d\u003d"},{"line_number":48,"context_line":"                    obj_fields.CPUAllocationPolicy.MIXED):"},{"line_number":49,"context_line":"                raise exception.IncompatibleMixedPolicyInstance"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # Note(huaqiang): From 1.4 to 1.5, the meaning of \u0027cpuset\u0027 was alerted"},{"line_number":52,"context_line":"        # and being special for keeping shared CPUs. We provide a backward"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_16928257","line":49,"range":{"start_line":49,"start_character":32,"end_line":49,"end_character":63},"in_reply_to":"bf51134e_a8e3c0d8","updated":"2020-06-29 11:12:33.000000000","message":"I was not aware this error could be covered by \u0027ObjectActionError\u0027, but now I am. Done","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"6e812d2a6a06e54245758f549063ecdf794ad837","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        # compatibility."},{"line_number":46,"context_line":"        if target_version \u003c (1, 6):"},{"line_number":47,"context_line":"            if primitive[\u0027cpu_policy\u0027] \u003d\u003d obj_fields.CPUAllocationPolicy.MIXED:"},{"line_number":48,"context_line":"                raise exception.ObjectActionError("},{"line_number":49,"context_line":"                    action\u003d\u0027obj_make_compatible\u0027,"},{"line_number":50,"context_line":"                    reason\u003d_(\u0027mixed instance is not supported in version \u0027"},{"line_number":51,"context_line":"                             \u0027%s\u0027) % target_version)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf51134e_afd5e645","line":48,"updated":"2020-07-02 11:50:09.000000000","message":"pep8: N323: Found use of _() without explicit import of _ !","commit_id":"53444297c8d3e75cb493883ccc9bea1367f36aec"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"7d9e1ab1a90e677ad4dc30799eb00ce3e4c9fca0","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        # compatibility."},{"line_number":46,"context_line":"        if target_version \u003c (1, 6):"},{"line_number":47,"context_line":"            if primitive[\u0027cpu_policy\u0027] \u003d\u003d obj_fields.CPUAllocationPolicy.MIXED:"},{"line_number":48,"context_line":"                raise exception.ObjectActionError("},{"line_number":49,"context_line":"                    action\u003d\u0027obj_make_compatible\u0027,"},{"line_number":50,"context_line":"                    reason\u003d_(\u0027mixed instance is not supported in version \u0027"},{"line_number":51,"context_line":"                             \u0027%s\u0027) % target_version)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf51134e_3508b92b","line":48,"updated":"2020-07-08 11:40:19.000000000","message":"Done.","commit_id":"c98f534f512fc80b23f1320079f5f17375a62b50"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"ef118aeef3f0cdfa61f5479d6ac879a8b5312a9f","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        # compatibility."},{"line_number":46,"context_line":"        if target_version \u003c (1, 6):"},{"line_number":47,"context_line":"            if primitive[\u0027cpu_policy\u0027] \u003d\u003d obj_fields.CPUAllocationPolicy.MIXED:"},{"line_number":48,"context_line":"                raise exception.ObjectActionError("},{"line_number":49,"context_line":"                    action\u003d\u0027obj_make_compatible\u0027,"},{"line_number":50,"context_line":"                    reason\u003d_(\u0027mixed instance is not supported in version \u0027"},{"line_number":51,"context_line":"                             \u0027%s\u0027) % target_version)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf51134e_e96cf79d","line":48,"updated":"2020-07-02 16:07:09.000000000","message":"pep8: N323: Found use of _() without explicit import of _ !","commit_id":"c98f534f512fc80b23f1320079f5f17375a62b50"}],"nova/virt/hardware.py":[{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"19dc01b66cafdc14b79ad8e5c41e59c272646466","unresolved":false,"context_lines":[{"line_number":1521,"context_line":"            fields.CPUAllocationPolicy.DEDICATED,"},{"line_number":1522,"context_line":"        ):"},{"line_number":1523,"context_line":"            raise exception.ImageCPUPinningForbidden()"},{"line_number":1524,"context_line":"        cpu_policy \u003d flavor_policy"},{"line_number":1525,"context_line":"    elif image_policy in fields.CPUAllocationPolicy.ALL:"},{"line_number":1526,"context_line":"        cpu_policy \u003d image_policy"},{"line_number":1527,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_b9f453f2","line":1524,"updated":"2020-04-02 11:34:27.000000000","message":"It seems I can not.\nBecause the name of \u0027MIXED\u0027 will be used widely. I have to name this policy before I create such kind of instance.","commit_id":"3fb97683756cd1d433bb29f1782cf2dcd1d09436"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c412db150abceea499a111a81e459dd9d29dc4ca","unresolved":false,"context_lines":[{"line_number":1511,"context_line":""},{"line_number":1512,"context_line":"    if flavor_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":1513,"context_line":"        cpu_policy \u003d flavor_policy"},{"line_number":1514,"context_line":"    elif flavor_policy \u003d\u003d fields.CPUAllocationPolicy.MIXED:"},{"line_number":1515,"context_line":"        if image_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":1516,"context_line":"            raise exception.ImageCPUPinningForbidden()"},{"line_number":1517,"context_line":"        cpu_policy \u003d flavor_policy"},{"line_number":1518,"context_line":"    elif flavor_policy \u003d\u003d fields.CPUAllocationPolicy.SHARED:"},{"line_number":1519,"context_line":"        if image_policy in ("},{"line_number":1520,"context_line":"            fields.CPUAllocationPolicy.MIXED,"},{"line_number":1521,"context_line":"            fields.CPUAllocationPolicy.DEDICATED,"},{"line_number":1522,"context_line":"        ):"},{"line_number":1523,"context_line":"            raise exception.ImageCPUPinningForbidden()"},{"line_number":1524,"context_line":"        cpu_policy \u003d flavor_policy"},{"line_number":1525,"context_line":"    elif image_policy in fields.CPUAllocationPolicy.ALL:"},{"line_number":1526,"context_line":"        cpu_policy \u003d image_policy"},{"line_number":1527,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_73de9111","line":1524,"range":{"start_line":1514,"start_character":4,"end_line":1524,"end_character":34},"updated":"2020-04-01 02:44:00.000000000","message":"we should expose the MIX policy for the end user in the last patch. Then you needn\u0027t this check also https://review.opendev.org/#/c/716267/1/nova/scheduler/utils.py","commit_id":"3fb97683756cd1d433bb29f1782cf2dcd1d09436"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8957d31536da4b4f54751d7cf8112ceb9afa2aa5","unresolved":false,"context_lines":[{"line_number":1521,"context_line":"            fields.CPUAllocationPolicy.DEDICATED,"},{"line_number":1522,"context_line":"        ):"},{"line_number":1523,"context_line":"            raise exception.ImageCPUPinningForbidden()"},{"line_number":1524,"context_line":"        cpu_policy \u003d flavor_policy"},{"line_number":1525,"context_line":"    elif image_policy in fields.CPUAllocationPolicy.ALL:"},{"line_number":1526,"context_line":"        cpu_policy \u003d image_policy"},{"line_number":1527,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_f4c8a255","line":1524,"in_reply_to":"df33271e_b9f453f2","updated":"2020-04-02 12:33:44.000000000","message":"You can change the object first. But move this little piece code to the last one.","commit_id":"3fb97683756cd1d433bb29f1782cf2dcd1d09436"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"25f52a36440ea8cd5e1152fde2c1912deaa172b6","unresolved":false,"context_lines":[{"line_number":1515,"context_line":"        if image_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":1516,"context_line":"            raise exception.ImageCPUPinningForbidden()"},{"line_number":1517,"context_line":"        cpu_policy \u003d flavor_policy"},{"line_number":1518,"context_line":"    elif flavor_policy \u003d\u003d fields.CPUAllocationPolicy.SHARED:"},{"line_number":1519,"context_line":"        if image_policy in ("},{"line_number":1520,"context_line":"            fields.CPUAllocationPolicy.MIXED,"},{"line_number":1521,"context_line":"            fields.CPUAllocationPolicy.DEDICATED,"},{"line_number":1522,"context_line":"        ):"},{"line_number":1523,"context_line":"            raise exception.ImageCPUPinningForbidden()"},{"line_number":1524,"context_line":"        cpu_policy \u003d flavor_policy"},{"line_number":1525,"context_line":"    elif image_policy in fields.CPUAllocationPolicy.ALL:"},{"line_number":1526,"context_line":"        cpu_policy \u003d image_policy"},{"line_number":1527,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_697c74b5","line":1524,"range":{"start_line":1518,"start_character":4,"end_line":1524,"end_character":34},"updated":"2020-04-06 09:55:59.000000000","message":"still think you can split this as separated patch, and put it as the last one.","commit_id":"71da0a454ba2664de9cc8b46ff722525c4d954c3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b5e6c5356afe7bc4ac48d119751f1722a3d1c401","unresolved":false,"context_lines":[{"line_number":1515,"context_line":"        if image_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":1516,"context_line":"            raise exception.ImageCPUPinningForbidden()"},{"line_number":1517,"context_line":"        cpu_policy \u003d flavor_policy"},{"line_number":1518,"context_line":"    elif flavor_policy \u003d\u003d fields.CPUAllocationPolicy.SHARED:"},{"line_number":1519,"context_line":"        if image_policy in ("},{"line_number":1520,"context_line":"            fields.CPUAllocationPolicy.MIXED,"},{"line_number":1521,"context_line":"            fields.CPUAllocationPolicy.DEDICATED,"},{"line_number":1522,"context_line":"        ):"},{"line_number":1523,"context_line":"            raise exception.ImageCPUPinningForbidden()"},{"line_number":1524,"context_line":"        cpu_policy \u003d flavor_policy"},{"line_number":1525,"context_line":"    elif image_policy in fields.CPUAllocationPolicy.ALL:"},{"line_number":1526,"context_line":"        cpu_policy \u003d image_policy"},{"line_number":1527,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_3e5c247d","line":1524,"range":{"start_line":1518,"start_character":4,"end_line":1524,"end_character":34},"in_reply_to":"df33271e_4f7055dd","updated":"2020-04-08 10:31:29.000000000","message":"I kind of understanding your problem a little. Anyway, what I\u0027m asking is better structure of those patches, not specific issues, so I\u0027m ok live with that, since Stephen doesn\u0027t complain about that also.","commit_id":"71da0a454ba2664de9cc8b46ff722525c4d954c3"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"030ecd1eacd10a23c0d9b6d04c810f0509055c98","unresolved":false,"context_lines":[{"line_number":1515,"context_line":"        if image_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":1516,"context_line":"            raise exception.ImageCPUPinningForbidden()"},{"line_number":1517,"context_line":"        cpu_policy \u003d flavor_policy"},{"line_number":1518,"context_line":"    elif flavor_policy \u003d\u003d fields.CPUAllocationPolicy.SHARED:"},{"line_number":1519,"context_line":"        if image_policy in ("},{"line_number":1520,"context_line":"            fields.CPUAllocationPolicy.MIXED,"},{"line_number":1521,"context_line":"            fields.CPUAllocationPolicy.DEDICATED,"},{"line_number":1522,"context_line":"        ):"},{"line_number":1523,"context_line":"            raise exception.ImageCPUPinningForbidden()"},{"line_number":1524,"context_line":"        cpu_policy \u003d flavor_policy"},{"line_number":1525,"context_line":"    elif image_policy in fields.CPUAllocationPolicy.ALL:"},{"line_number":1526,"context_line":"        cpu_policy \u003d image_policy"},{"line_number":1527,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_4f7055dd","line":1524,"range":{"start_line":1518,"start_character":4,"end_line":1524,"end_character":34},"in_reply_to":"df33271e_697c74b5","updated":"2020-04-08 09:26:27.000000000","message":"After tried many times of moving this part of code to the last patch as a flag indicating mixed instance is done, now I don\u0027t think it is a good idea.\n\nI still need to through an exception to use to tell him \"sorry \u0027MIXED\u0027 policy is not supported\". In the later patches, I will pass in the \u0027MIXED\u0027 policy to instance NUMA topology object, if I keep telling for not supporting, the function of new code could not be tested.\n\nThe majority task for mixed instance spec is to coper with the \u0027MIXED\u0027 cpu policy, the last patch will be a very big patch, if I don\u0027t move it, the validation could be done gradually.\n\nSo, I think it\u0027s better to keep the code here.\n\nHow do you think?","commit_id":"71da0a454ba2664de9cc8b46ff722525c4d954c3"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"198e982e26336d07e702e2ec8d5f0cd307efa372","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"            LOG.debug(\u0027Host does not support requested memory pagesize, \u0027"},{"line_number":1033,"context_line":"                      \u0027or not enough free pages of the requested size. \u0027"},{"line_number":1034,"context_line":"                      \u0027Requested: %d kB\u0027, instance_cell.pagesize)"},{"line_number":1035,"context_line":"            return"},{"line_number":1036,"context_line":"        LOG.debug(\u0027Selected memory pagesize: %(selected_mem_pagesize)d kB. \u0027"},{"line_number":1037,"context_line":"                  \u0027Requested memory pagesize: %(requested_mem_pagesize)d \u0027"},{"line_number":1038,"context_line":"                  \u0027(small \u003d -1, large \u003d -2, any \u003d -3)\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_9888edc6","line":1035,"updated":"2020-04-08 03:47:35.000000000","message":"pep8: error: Return value expected","commit_id":"d63cf382ce17df8ea1c4ebcb2b3f7e3f8de50d18"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"198e982e26336d07e702e2ec8d5f0cd307efa372","unresolved":false,"context_lines":[{"line_number":1061,"context_line":"                           \u0027available\u0027: host_cell.avail_memory,"},{"line_number":1062,"context_line":"                           \u0027total\u0027: host_cell.memory,"},{"line_number":1063,"context_line":"                           \u0027pagesize\u0027: pagesize})"},{"line_number":1064,"context_line":"                return"},{"line_number":1065,"context_line":"        else:"},{"line_number":1066,"context_line":"            # The host does not support explicit page sizes. Ignore pagesizes"},{"line_number":1067,"context_line":"            # completely."}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_788369aa","line":1064,"updated":"2020-04-08 03:47:35.000000000","message":"pep8: error: Return value expected","commit_id":"d63cf382ce17df8ea1c4ebcb2b3f7e3f8de50d18"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"198e982e26336d07e702e2ec8d5f0cd307efa372","unresolved":false,"context_lines":[{"line_number":1074,"context_line":"                          \u0027Required: %(required)d, actual: %(actual)d\u0027,"},{"line_number":1075,"context_line":"                          {\u0027required\u0027: instance_cell.memory,"},{"line_number":1076,"context_line":"                           \u0027actual\u0027: host_cell.memory})"},{"line_number":1077,"context_line":"                return"},{"line_number":1078,"context_line":""},{"line_number":1079,"context_line":"    # NOTE(stephenfin): As with memory, do not allow an instance to overcommit"},{"line_number":1080,"context_line":"    # against itself on any NUMA cell"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_d89275f6","line":1077,"updated":"2020-04-08 03:47:35.000000000","message":"pep8: error: Return value expected","commit_id":"d63cf382ce17df8ea1c4ebcb2b3f7e3f8de50d18"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"198e982e26336d07e702e2ec8d5f0cd307efa372","unresolved":false,"context_lines":[{"line_number":1088,"context_line":"                          \u0027actual\u0027: len(host_cell.pcpuset),"},{"line_number":1089,"context_line":"                          \u0027cpuset_reserved\u0027: cpuset_reserved"},{"line_number":1090,"context_line":"                      })"},{"line_number":1091,"context_line":"            return"},{"line_number":1092,"context_line":"    else:"},{"line_number":1093,"context_line":"        required_cpus \u003d len(instance_cell.cpuset)"},{"line_number":1094,"context_line":"        if required_cpus \u003e len(host_cell.cpuset):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_b88df1d4","line":1091,"updated":"2020-04-08 03:47:35.000000000","message":"pep8: error: Return value expected","commit_id":"d63cf382ce17df8ea1c4ebcb2b3f7e3f8de50d18"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"198e982e26336d07e702e2ec8d5f0cd307efa372","unresolved":false,"context_lines":[{"line_number":1097,"context_line":"                          \u0027required\u0027: len(instance_cell.cpuset),"},{"line_number":1098,"context_line":"                          \u0027actual\u0027: len(host_cell.cpuset),"},{"line_number":1099,"context_line":"                      })"},{"line_number":1100,"context_line":"            return"},{"line_number":1101,"context_line":""},{"line_number":1102,"context_line":"    if instance_cell.cpu_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"},{"line_number":1103,"context_line":"        LOG.debug(\u0027Pinning has been requested\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_18be9d64","line":1100,"updated":"2020-04-08 03:47:35.000000000","message":"pep8: error: Return value expected","commit_id":"d63cf382ce17df8ea1c4ebcb2b3f7e3f8de50d18"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"198e982e26336d07e702e2ec8d5f0cd307efa372","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"                       \u0027vcpus\u0027: len(instance_cell.pcpuset),"},{"line_number":1112,"context_line":"                       \u0027actual\u0027: host_cell.avail_pcpus,"},{"line_number":1113,"context_line":"                       \u0027num_cpu_reserved\u0027: cpuset_reserved})"},{"line_number":1114,"context_line":"            return"},{"line_number":1115,"context_line":""},{"line_number":1116,"context_line":"        if instance_cell.memory \u003e host_cell.avail_memory:"},{"line_number":1117,"context_line":"            LOG.debug(\u0027Not enough available memory to schedule instance. \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_f8c019e3","line":1114,"updated":"2020-04-08 03:47:35.000000000","message":"pep8: error: Return value expected","commit_id":"d63cf382ce17df8ea1c4ebcb2b3f7e3f8de50d18"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"198e982e26336d07e702e2ec8d5f0cd307efa372","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"                      {\u0027required\u0027: instance_cell.memory,"},{"line_number":1122,"context_line":"                       \u0027available\u0027: host_cell.avail_memory,"},{"line_number":1123,"context_line":"                       \u0027total\u0027: host_cell.memory})"},{"line_number":1124,"context_line":"            return"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"        # Try to pack the instance cell onto cores"},{"line_number":1127,"context_line":"        instance_cell \u003d _pack_instance_onto_cores("}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_58b82575","line":1124,"updated":"2020-04-08 03:47:35.000000000","message":"pep8: error: Return value expected","commit_id":"d63cf382ce17df8ea1c4ebcb2b3f7e3f8de50d18"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"198e982e26336d07e702e2ec8d5f0cd307efa372","unresolved":false,"context_lines":[{"line_number":1129,"context_line":"        )"},{"line_number":1130,"context_line":"        if not instance_cell:"},{"line_number":1131,"context_line":"            LOG.debug(\u0027Failed to map instance cell CPUs to host cell CPUs\u0027)"},{"line_number":1132,"context_line":"            return"},{"line_number":1133,"context_line":""},{"line_number":1134,"context_line":"    elif limits:"},{"line_number":1135,"context_line":"        LOG.debug(\u0027No pinning requested, considering limitations on usable cpu\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_38bba172","line":1132,"updated":"2020-04-08 03:47:35.000000000","message":"pep8: error: Return value expected","commit_id":"d63cf382ce17df8ea1c4ebcb2b3f7e3f8de50d18"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"198e982e26336d07e702e2ec8d5f0cd307efa372","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"                      \u0027not enough free CPUs to schedule this instance. \u0027"},{"line_number":1142,"context_line":"                      \u0027Usage: %(usage)d, limit: %(limit)d\u0027,"},{"line_number":1143,"context_line":"                      {\u0027usage\u0027: cpu_usage, \u0027limit\u0027: cpu_limit})"},{"line_number":1144,"context_line":"            return"},{"line_number":1145,"context_line":""},{"line_number":1146,"context_line":"        ram_usage \u003d host_cell.memory_usage + instance_cell.memory"},{"line_number":1147,"context_line":"        ram_limit \u003d host_cell.memory * limits.ram_allocation_ratio"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_98b10d93","line":1144,"updated":"2020-04-08 03:47:35.000000000","message":"pep8: error: Return value expected","commit_id":"d63cf382ce17df8ea1c4ebcb2b3f7e3f8de50d18"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"198e982e26336d07e702e2ec8d5f0cd307efa372","unresolved":false,"context_lines":[{"line_number":1150,"context_line":"                      \u0027not enough free memory to schedule this instance. \u0027"},{"line_number":1151,"context_line":"                      \u0027Usage: %(usage)d, limit: %(limit)d\u0027,"},{"line_number":1152,"context_line":"                      {\u0027usage\u0027: ram_usage, \u0027limit\u0027: ram_limit})"},{"line_number":1153,"context_line":"            return"},{"line_number":1154,"context_line":""},{"line_number":1155,"context_line":"    instance_cell.id \u003d host_cell.id"},{"line_number":1156,"context_line":"    return instance_cell"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_78ac0935","line":1153,"updated":"2020-04-08 03:47:35.000000000","message":"pep8: error: Return value expected","commit_id":"d63cf382ce17df8ea1c4ebcb2b3f7e3f8de50d18"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"198e982e26336d07e702e2ec8d5f0cd307efa372","unresolved":false,"context_lines":[{"line_number":2106,"context_line":"    # indicative of a PCI device being associated with that node"},{"line_number":2107,"context_line":"    if not pci_requests and pci_stats:"},{"line_number":2108,"context_line":"        host_cells \u003d sorted(host_cells, key\u003dlambda cell: cell.id in ["},{"line_number":2109,"context_line":"            pool[\u0027numa_node\u0027] for pool in pci_stats.pools])"},{"line_number":2110,"context_line":""},{"line_number":2111,"context_line":"    for host_cell_perm in itertools.permutations("},{"line_number":2112,"context_line":"            host_cells, len(instance_topology)):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_d8ab951a","line":2109,"updated":"2020-04-08 03:47:35.000000000","message":"pep8: error: Item \"None\" of \"Optional[Any]\" has no attribute \"pools\"","commit_id":"d63cf382ce17df8ea1c4ebcb2b3f7e3f8de50d18"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"aff895d76aaaa5b22cb90155e91660c0775202b2","unresolved":false,"context_lines":[{"line_number":1930,"context_line":""},{"line_number":1931,"context_line":"        if emu_threads_policy \u003d\u003d fields.CPUEmulatorThreadsPolicy.ISOLATE:"},{"line_number":1932,"context_line":"            raise exception.BadRequirementEmulatorThreadsPolicy()"},{"line_number":1933,"context_line":""},{"line_number":1934,"context_line":"        if rt_mask:"},{"line_number":1935,"context_line":"            raise exception.RealtimeConfigurationInvalid()"},{"line_number":1936,"context_line":"    elif cpu_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_ae532fe2","line":1933,"updated":"2020-07-02 02:51:54.000000000","message":"\u003e Let\u0027s do it Don\u0027t forget tests.\n\nSure test will be added, but not in this commit, because the logic for parsing dedicated_cpus from \u0027hw:cpu_dedicated_mask\u0027 will be added once all logic is ready  as the start to receive user\u0027s input for creating a mixed instance.","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"bbd518b17cf4cc16d3e116cd1325a0cf1454f683","unresolved":false,"context_lines":[{"line_number":1930,"context_line":""},{"line_number":1931,"context_line":"        if emu_threads_policy \u003d\u003d fields.CPUEmulatorThreadsPolicy.ISOLATE:"},{"line_number":1932,"context_line":"            raise exception.BadRequirementEmulatorThreadsPolicy()"},{"line_number":1933,"context_line":""},{"line_number":1934,"context_line":"        if rt_mask:"},{"line_number":1935,"context_line":"            raise exception.RealtimeConfigurationInvalid()"},{"line_number":1936,"context_line":"    elif cpu_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_96c17257","line":1933,"updated":"2020-06-29 11:12:33.000000000","message":"I would like adding a check here to ensure the \u0027hw:cpu_dedicated_mask\u0027 is not defined for an instance with shared policy.\n\nif dedicated_cpus:\n    raise exception.RequiredMixedInstancePolicy","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f94d2464322d90c1096e3c1f337e5497a9aafdfb","unresolved":false,"context_lines":[{"line_number":1930,"context_line":""},{"line_number":1931,"context_line":"        if emu_threads_policy \u003d\u003d fields.CPUEmulatorThreadsPolicy.ISOLATE:"},{"line_number":1932,"context_line":"            raise exception.BadRequirementEmulatorThreadsPolicy()"},{"line_number":1933,"context_line":""},{"line_number":1934,"context_line":"        if rt_mask:"},{"line_number":1935,"context_line":"            raise exception.RealtimeConfigurationInvalid()"},{"line_number":1936,"context_line":"    elif cpu_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_d80f7734","line":1933,"in_reply_to":"bf51134e_96c17257","updated":"2020-06-29 12:35:11.000000000","message":"That\u0027s sensible. Let\u0027s do it. Don\u0027t forget tests","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ceec28686e4468b8bcddce304071d9ffdf7062e6","unresolved":false,"context_lines":[{"line_number":1966,"context_line":"        fields.CPUAllocationPolicy.MIXED,"},{"line_number":1967,"context_line":"    ):"},{"line_number":1968,"context_line":"        cpus \u003d set(range(flavor.vcpus))"},{"line_number":1969,"context_line":"        pcpus \u003d dedicated_cpus or set()"},{"line_number":1970,"context_line":"        vcpus \u003d cpus - pcpus"},{"line_number":1971,"context_line":"        nodes \u003d nodes or 1"},{"line_number":1972,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_48fb0478","line":1969,"range":{"start_line":1969,"start_character":8,"end_line":1969,"end_character":39},"updated":"2020-06-22 10:29:53.000000000","message":"dedicated_cpus will always be set to a value due to lines 1943 and 1950 above, so we don\u0027t need the \u0027or set()\u0027 here, right?","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"bbd518b17cf4cc16d3e116cd1325a0cf1454f683","unresolved":false,"context_lines":[{"line_number":1966,"context_line":"        fields.CPUAllocationPolicy.MIXED,"},{"line_number":1967,"context_line":"    ):"},{"line_number":1968,"context_line":"        cpus \u003d set(range(flavor.vcpus))"},{"line_number":1969,"context_line":"        pcpus \u003d dedicated_cpus or set()"},{"line_number":1970,"context_line":"        vcpus \u003d cpus - pcpus"},{"line_number":1971,"context_line":"        nodes \u003d nodes or 1"},{"line_number":1972,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_f6db8e4b","line":1969,"range":{"start_line":1969,"start_character":8,"end_line":1969,"end_character":39},"in_reply_to":"bf51134e_48fb0478","updated":"2020-06-29 11:12:33.000000000","message":"Yes, you are right. \n\nRemoved.","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"8189ec50eae5cdbbf851c83e6490e7fe4f84b03d","unresolved":false,"context_lines":[{"line_number":1966,"context_line":"        fields.CPUAllocationPolicy.MIXED,"},{"line_number":1967,"context_line":"    ):"},{"line_number":1968,"context_line":"        cpus \u003d set(range(flavor.vcpus))"},{"line_number":1969,"context_line":"        pcpus \u003d dedicated_cpus or set()"},{"line_number":1970,"context_line":"        vcpus \u003d cpus - pcpus"},{"line_number":1971,"context_line":"        nodes \u003d nodes or 1"},{"line_number":1972,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bf51134e_15001567","line":1969,"range":{"start_line":1969,"start_character":8,"end_line":1969,"end_character":39},"in_reply_to":"bf51134e_f6db8e4b","updated":"2020-07-08 11:10:37.000000000","message":"[Later July 8]: here the \u0027or set()\u0027 is necessary, the code could run to this place due to requesting hugepage, but the instance is using a \u0027shared\u0027 cpu policy.","commit_id":"e96bc2d32ecbabc08a207a069d7a6d02bd1b9304"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"44e37017103422d1e316e3a5942db008c0cd9eb3","unresolved":false,"context_lines":[{"line_number":1700,"context_line":"    return None"},{"line_number":1701,"context_line":""},{"line_number":1702,"context_line":""},{"line_number":1703,"context_line":"# NOTE(stephenfin): This must be public as it\u0027s used elsewhere"},{"line_number":1704,"context_line":"# TODO(Huaqiang): To be filled with the logic of parsing"},{"line_number":1705,"context_line":"# \u0027hw:cpu_dedicated_mask\u0027 and relevant test cases in later patches once the"},{"line_number":1706,"context_line":"# code is ready to build up an instance in \u0027mixed\u0027 CPU allocation policy."}],"source_content_type":"text/x-python","patch_set":14,"id":"bf51134e_6a2df593","line":1703,"updated":"2020-07-13 04:40:50.000000000","message":"I can remove this line. But not due to duplication with L1718, this note is for get_dedicated_cpu_mask(), while L1718 is for get_realtime_cpu_mask().\nRemoved because this is not a note from Stephen, and not necessary.","commit_id":"b61f385b003716245c0c9747ef29cc5f2f1b602b"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"ec6b5b4a40e7f4ef474172d2f7ddb65e5531b011","unresolved":false,"context_lines":[{"line_number":1700,"context_line":"    return None"},{"line_number":1701,"context_line":""},{"line_number":1702,"context_line":""},{"line_number":1703,"context_line":"# NOTE(stephenfin): This must be public as it\u0027s used elsewhere"},{"line_number":1704,"context_line":"# TODO(Huaqiang): To be filled with the logic of parsing"},{"line_number":1705,"context_line":"# \u0027hw:cpu_dedicated_mask\u0027 and relevant test cases in later patches once the"},{"line_number":1706,"context_line":"# code is ready to build up an instance in \u0027mixed\u0027 CPU allocation policy."}],"source_content_type":"text/x-python","patch_set":14,"id":"bf51134e_1f7e3918","line":1703,"range":{"start_line":1703,"start_character":0,"end_line":1703,"end_character":62},"updated":"2020-07-13 02:50:00.000000000","message":"You should remove this line, it\u0027s repeat with L1718.","commit_id":"b61f385b003716245c0c9747ef29cc5f2f1b602b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ea9202a3bf362d5d9b7f78e78202e2bee3dbd181","unresolved":false,"context_lines":[{"line_number":1944,"context_line":"        # \u0027dedicated\u0027 policy."},{"line_number":1945,"context_line":"        if dedicated_cpus:"},{"line_number":1946,"context_line":"            raise exception.RequiredMixedInstancePolicy()"},{"line_number":1947,"context_line":"        # But for an instance with \u0027dedicated\u0027 CPU allocation policy, all"},{"line_number":1948,"context_line":"        # CPUs are \u0027dedicated\u0027 CPUs, which is 1:1 pinned to a host CPU."},{"line_number":1949,"context_line":"        dedicated_cpus \u003d set(range(flavor.vcpus))"},{"line_number":1950,"context_line":"    else:  # MIXED"},{"line_number":1951,"context_line":"        # FIXME(huaqiang): So far, \u0027mixed\u0027 instance is not supported"},{"line_number":1952,"context_line":"        # and the \u0027dedicated_cpus\u0027 variable is set to \u0027None\u0027 due to being not"}],"source_content_type":"text/x-python","patch_set":14,"id":"bf51134e_768af71a","line":1949,"range":{"start_line":1947,"start_character":0,"end_line":1949,"end_character":49},"updated":"2020-07-13 14:42:00.000000000","message":"I\u0027d personally like to move this out of here into it\u0027s own if-block below, because this is for sanity checks and shouldn\u0027t really have side-effects","commit_id":"b61f385b003716245c0c9747ef29cc5f2f1b602b"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"996d7a9ed9f814f4ab0bcc574a688e33351f1fdc","unresolved":false,"context_lines":[{"line_number":1946,"context_line":"            raise exception.RequiredMixedInstancePolicy()"},{"line_number":1947,"context_line":"        # But for an instance with \u0027dedicated\u0027 CPU allocation policy, all"},{"line_number":1948,"context_line":"        # CPUs are \u0027dedicated\u0027 CPUs, which is 1:1 pinned to a host CPU."},{"line_number":1949,"context_line":"        dedicated_cpus \u003d set(range(flavor.vcpus))"},{"line_number":1950,"context_line":"    else:  # MIXED"},{"line_number":1951,"context_line":"        # FIXME(huaqiang): So far, \u0027mixed\u0027 instance is not supported"},{"line_number":1952,"context_line":"        # and the \u0027dedicated_cpus\u0027 variable is set to \u0027None\u0027 due to being not"}],"source_content_type":"text/x-python","patch_set":14,"id":"bf51134e_ad527233","line":1949,"updated":"2020-07-14 09:36:13.000000000","message":"I\u0027ll send out a follow-up patch addressing this comment.","commit_id":"b61f385b003716245c0c9747ef29cc5f2f1b602b"},{"author":{"_account_id":30209,"name":"Huaqiang","email":"huaqiang.wang@intel.com","username":"Huaqiang.Wang"},"change_message_id":"996d7a9ed9f814f4ab0bcc574a688e33351f1fdc","unresolved":false,"context_lines":[{"line_number":1961,"context_line":"    vpmems \u003d get_vpmems(flavor)"},{"line_number":1962,"context_line":""},{"line_number":1963,"context_line":"    dedicated_cpus \u003d dedicated_cpus or set()"},{"line_number":1964,"context_line":""},{"line_number":1965,"context_line":"    # NOTE(stephenfin): There are currently four things that will configure a"},{"line_number":1966,"context_line":"    # NUMA topology for an instance:"},{"line_number":1967,"context_line":"    #"}],"source_content_type":"text/x-python","patch_set":14,"id":"bf51134e_0d339e15","line":1964,"updated":"2020-07-14 09:36:13.000000000","message":"Ditto.","commit_id":"b61f385b003716245c0c9747ef29cc5f2f1b602b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ea9202a3bf362d5d9b7f78e78202e2bee3dbd181","unresolved":false,"context_lines":[{"line_number":1961,"context_line":"    vpmems \u003d get_vpmems(flavor)"},{"line_number":1962,"context_line":""},{"line_number":1963,"context_line":"    dedicated_cpus \u003d dedicated_cpus or set()"},{"line_number":1964,"context_line":""},{"line_number":1965,"context_line":"    # NOTE(stephenfin): There are currently four things that will configure a"},{"line_number":1966,"context_line":"    # NUMA topology for an instance:"},{"line_number":1967,"context_line":"    #"}],"source_content_type":"text/x-python","patch_set":14,"id":"bf51134e_96850b0a","line":1964,"updated":"2020-07-13 14:42:00.000000000","message":"So add:\n\n  if cpu_policy \u003d\u003d fields.CPUAllocationPolicy.DEDICATED:\n      # For an instance with \u0027dedicated\u0027 CPU allocation policy, all\n      # CPUs are \u0027dedicated\u0027 CPUs, which is 1:1 pinned to a host CPU.\n      dedicated_cpus \u003d set(range(flavor.vcpus))\n\nhere","commit_id":"b61f385b003716245c0c9747ef29cc5f2f1b602b"}]}
