)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cda037db9e8000807999e62fa91074c56c446b91","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Move \u0027hw:pmu\u0027, \u0027hw_pmu\u0027 parsing to nova.virt.hardware"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is where this stuff lives."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I1fabdf1827af597f9e5fdb40d5aef244024dd015"},{"line_number":12,"context_line":"Signed-off-by: Stephen Finucane \u003cstephenfin@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"92a5cb40_7f1a700a","line":9,"updated":"2021-05-20 20:09:16.000000000","message":"actully its not ment too.\n\nthe hardware module was ment to be virt driver independent\ni did not mention this in the multi queue path but it only ment to have\ncode for things that work aross multiple virt drivers.\n\nwe have kidn fo lost sight of this over recnet time but if we keep movign libvirt specific stuff into we sboudl move it under the libvirt module","commit_id":"2c7b46a72ca4aa2e99e410afaf01c1490d4993e0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5c1cdfdd0b3fd1c7b04aad10e3bbde374b65e7f2","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Move \u0027hw:pmu\u0027, \u0027hw_pmu\u0027 parsing to nova.virt.hardware"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is where this stuff lives."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I1fabdf1827af597f9e5fdb40d5aef244024dd015"},{"line_number":12,"context_line":"Signed-off-by: Stephen Finucane \u003cstephenfin@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"360862e9_3fca33e9","line":9,"in_reply_to":"6971b858_17c379c7","updated":"2022-02-02 12:22:47.000000000","message":"Done","commit_id":"2c7b46a72ca4aa2e99e410afaf01c1490d4993e0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7c35d0241a011c37bc222d2ec8e663ed34ffe8da","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Move \u0027hw:pmu\u0027, \u0027hw_pmu\u0027 parsing to nova.virt.hardware"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is where this stuff lives."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I1fabdf1827af597f9e5fdb40d5aef244024dd015"},{"line_number":12,"context_line":"Signed-off-by: Stephen Finucane \u003cstephenfin@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"6971b858_17c379c7","line":9,"in_reply_to":"92a5cb40_7f1a700a","updated":"2021-05-25 16:23:14.000000000","message":"There\u0027s nothing virt specific about the \u0027hw:pmu\u0027 extra spec, other than the libvirt driver is the only one that has implemented it. I agree that a lot of this extra spec parsing could and probably should live elsewhere, but we\u0027ve settled on \u0027nova.virt.hardware\u0027 as that place and I can\u0027t think of anywhere else to move it that\u0027s a signficant enough improvement to warrant the pain.","commit_id":"2c7b46a72ca4aa2e99e410afaf01c1490d4993e0"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c27d9c1dccc14082c34b82f90f9b925c64d797ae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"37a8938a_e53f23f0","updated":"2022-02-01 10:50:56.000000000","message":"I have a question inline","commit_id":"ab6c8d77fc28bcecf95d8c03e03dcdabb546842d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"43d26186151777842e7fb82a6218e7727b2ff03f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"7c9a8620_429e8f64","updated":"2022-02-04 09:25:56.000000000","message":"looks good","commit_id":"eacecc2433562aeca1f95366200ca1679c3679a1"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"1330d0e79af842b0ba564489766359be02967a65","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"2949f698_3275fa3c","updated":"2022-02-02 20:25:29.000000000","message":"recheck","commit_id":"eacecc2433562aeca1f95366200ca1679c3679a1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6d0387024c478918717e7cd1dd0128a4296b46fa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"5d490ab2_fa772f0c","updated":"2022-02-03 11:43:35.000000000","message":"recheck","commit_id":"eacecc2433562aeca1f95366200ca1679c3679a1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"300892e1bb2e745a803a06629c587053ed997d17","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"ff2e453b_b695f32e","updated":"2022-02-02 12:22:52.000000000","message":"recheck","commit_id":"eacecc2433562aeca1f95366200ca1679c3679a1"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cb3bf380487c31414dc74e79cec4857949cddd22","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"03b7d357_181de854","updated":"2022-02-15 16:31:20.000000000","message":"yep this looks good to me thanks stephen","commit_id":"eacecc2433562aeca1f95366200ca1679c3679a1"}],"nova/exception.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"36deca419d7c589893c9ac050cc52c72dbf8c60c","unresolved":true,"context_lines":[{"line_number":1840,"context_line":"                \"override CPU thread pinning policy set against the flavor\")"},{"line_number":1841,"context_line":""},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"class ImagePMUConflict(Forbidden):"},{"line_number":1844,"context_line":"    msg_fmt \u003d _(\"Image property \u0027hw_pmu\u0027 is not permitted to \""},{"line_number":1845,"context_line":"                \"override the PMU policy set in the flavor\")"},{"line_number":1846,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9578b8fc_144ac167","side":"PARENT","line":1843,"range":{"start_line":1843,"start_character":6,"end_line":1843,"end_character":22},"updated":"2021-07-22 18:12:52.000000000","message":"hum you change this to a generic \nFlavorImageConflict\nwhich inhirts form novaexcption so we will need to make sure to sett the correct error code otherwize this is an api change.\nthe default error code for NovaExcpetion is 500 forbidden is 403","commit_id":"544fcb730d3542bc51d5f76a4c1a736927c6f64f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5c1cdfdd0b3fd1c7b04aad10e3bbde374b65e7f2","unresolved":false,"context_lines":[{"line_number":1840,"context_line":"                \"override CPU thread pinning policy set against the flavor\")"},{"line_number":1841,"context_line":""},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"class ImagePMUConflict(Forbidden):"},{"line_number":1844,"context_line":"    msg_fmt \u003d _(\"Image property \u0027hw_pmu\u0027 is not permitted to \""},{"line_number":1845,"context_line":"                \"override the PMU policy set in the flavor\")"},{"line_number":1846,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"8733af79_f88b90b7","side":"PARENT","line":1843,"range":{"start_line":1843,"start_character":6,"end_line":1843,"end_character":22},"in_reply_to":"9578b8fc_144ac167","updated":"2022-02-02 12:22:47.000000000","message":"Done","commit_id":"544fcb730d3542bc51d5f76a4c1a736927c6f64f"}],"nova/virt/hardware.py":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"8f89cf3ac73303170c0dacc7cdfdab746b3f7e7c","unresolved":true,"context_lines":[{"line_number":1905,"context_line":"    return policy"},{"line_number":1906,"context_line":""},{"line_number":1907,"context_line":""},{"line_number":1908,"context_line":"def get_pmu_constraint("},{"line_number":1909,"context_line":"    flavor: \u0027objects.Flavor\u0027,"},{"line_number":1910,"context_line":"    image_meta: \u0027objects.ImageMeta\u0027,"},{"line_number":1911,"context_line":") -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":1,"id":"50680f38_ff6ec622","line":1908,"updated":"2021-05-20 14:41:00.000000000","message":"How many times do we do this for various extra_spec/image_prop combination? Surely we can come up with a way to make it generic... Something like\n\n\n  get_flavor_image_constrait(constraint_name, flavor, image, authority\u003d(image|flavor|raise):\n    flavor_const \u003d get_flavor_const()\n    image_const \u003d get_image_const()\n    if flavor_const and image_const and flavor_const !\u003d image_const:\n      if authority \u003d\u003d image:\n        return image_const\n      elif authority \u003d\u003d flavor:\n        return flavor_const\n      else (or elif authority \u003d\u003d raise):\n        raise Mismatch()","commit_id":"2c7b46a72ca4aa2e99e410afaf01c1490d4993e0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"cda037db9e8000807999e62fa91074c56c446b91","unresolved":true,"context_lines":[{"line_number":1905,"context_line":"    return policy"},{"line_number":1906,"context_line":""},{"line_number":1907,"context_line":""},{"line_number":1908,"context_line":"def get_pmu_constraint("},{"line_number":1909,"context_line":"    flavor: \u0027objects.Flavor\u0027,"},{"line_number":1910,"context_line":"    image_meta: \u0027objects.ImageMeta\u0027,"},{"line_number":1911,"context_line":") -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":1,"id":"538c3403_569300a6","line":1908,"in_reply_to":"50680f38_ff6ec622","updated":"2021-05-20 20:09:16.000000000","message":"we dont actully have the same behvaior for all pairs.\n\nwe have intentionaly moved to raising confict in the last 5 or so years but before that we were not as strict\n\nthere are some case where we allow the image to override the flavor for example the realtime core mask\nin other the flavor gives the image permissin e.g. hw:mem_page_size\u003dlarge allows the image to request 1G or 2MB pages but not 4k or small pages\n\nhw:mem_page_size\u003dany allows the image to choose any page size.\n\nso while most extra specs now follow the parteren of if they dont macht its an error its always the case.\n\nin this case stephen is also encoding the default logic if  nethier are present in the return value\n\nreturn flavor_value or image_value or False\n\n\nso  you are right that we can proably create a helper funciton to do most of the work the sigurie you propsose is incorrect.\n\nwe would need to be able to pass in both the excption to raise on failure and a default value if netiner are set.","commit_id":"2c7b46a72ca4aa2e99e410afaf01c1490d4993e0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7c35d0241a011c37bc222d2ec8e663ed34ffe8da","unresolved":true,"context_lines":[{"line_number":1905,"context_line":"    return policy"},{"line_number":1906,"context_line":""},{"line_number":1907,"context_line":""},{"line_number":1908,"context_line":"def get_pmu_constraint("},{"line_number":1909,"context_line":"    flavor: \u0027objects.Flavor\u0027,"},{"line_number":1910,"context_line":"    image_meta: \u0027objects.ImageMeta\u0027,"},{"line_number":1911,"context_line":") -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":1,"id":"c2d79d39_6ec3a047","line":1908,"in_reply_to":"538c3403_569300a6","updated":"2021-05-25 16:23:14.000000000","message":"We actually do have a helper for this - \u0027_get_unique_flavor_image_meta\u0027. The problem is that it expects to be working with strings, not booleans (I\u0027d need to wrap the return value of flavor in \u0027bool_from_string\u0027 else the equality check would fail). I considered extending that helper further but it already seemed complex enough that I deferred for now","commit_id":"2c7b46a72ca4aa2e99e410afaf01c1490d4993e0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5c1cdfdd0b3fd1c7b04aad10e3bbde374b65e7f2","unresolved":false,"context_lines":[{"line_number":1905,"context_line":"    return policy"},{"line_number":1906,"context_line":""},{"line_number":1907,"context_line":""},{"line_number":1908,"context_line":"def get_pmu_constraint("},{"line_number":1909,"context_line":"    flavor: \u0027objects.Flavor\u0027,"},{"line_number":1910,"context_line":"    image_meta: \u0027objects.ImageMeta\u0027,"},{"line_number":1911,"context_line":") -\u003e bool:"}],"source_content_type":"text/x-python","patch_set":1,"id":"cbabc1ca_c01cb077","line":1908,"in_reply_to":"c2d79d39_6ec3a047","updated":"2022-02-02 12:22:47.000000000","message":"Marking as resolved.","commit_id":"2c7b46a72ca4aa2e99e410afaf01c1490d4993e0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"36deca419d7c589893c9ac050cc52c72dbf8c60c","unresolved":true,"context_lines":[{"line_number":1821,"context_line":"            \"%(image_name)s which has %(prefix)s_%(key)s explicitly set to \""},{"line_number":1822,"context_line":"            \"%(image_val)s.\""},{"line_number":1823,"context_line":"        )"},{"line_number":1824,"context_line":"        raise exception.FlavorImageConflict("},{"line_number":1825,"context_line":"            msg % {"},{"line_number":1826,"context_line":"                \u0027prefix\u0027: \u0027hw\u0027,"},{"line_number":1827,"context_line":"                \u0027key\u0027: \u0027pmu\u0027,"},{"line_number":1828,"context_line":"                \u0027flavor_name\u0027: flavor.name,"},{"line_number":1829,"context_line":"                \u0027flavor_val\u0027: flavor_value,"},{"line_number":1830,"context_line":"                \u0027image_name\u0027: image_meta.name,"},{"line_number":1831,"context_line":"                \u0027image_val\u0027: image_value,"},{"line_number":1832,"context_line":"            },"},{"line_number":1833,"context_line":"        )"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":"    return flavor_value if flavor_value is not None else image_value"},{"line_number":1836,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"09c6bbff_85d692d6","line":1833,"range":{"start_line":1824,"start_character":8,"end_line":1833,"end_character":1},"updated":"2021-07-22 18:12:52.000000000","message":"-1 tthis is goitng to result in a 500 error not the 403 that we had before.\n\nyou need to also set the code.\n\n        raise exception.FlavorImageConflict(\n            message\u003dmsg % {\n                \u0027prefix\u0027: \u0027hw\u0027,\n                \u0027key\u0027: \u0027pmu\u0027,\n                \u0027flavor_name\u0027: flavor.name,\n                \u0027flavor_val\u0027: flavor_value,\n                \u0027image_name\u0027: image_meta.name,\n                \u0027image_val\u0027: image_value,\n            },\n            code\u003d403\n        )\n\nwe could use code 400 but that would change the api return code \n\na 500 is definetly not correct.","commit_id":"bcd2daa6982868d2a62814f6a867af7349a72f30"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5c1cdfdd0b3fd1c7b04aad10e3bbde374b65e7f2","unresolved":false,"context_lines":[{"line_number":1821,"context_line":"            \"%(image_name)s which has %(prefix)s_%(key)s explicitly set to \""},{"line_number":1822,"context_line":"            \"%(image_val)s.\""},{"line_number":1823,"context_line":"        )"},{"line_number":1824,"context_line":"        raise exception.FlavorImageConflict("},{"line_number":1825,"context_line":"            msg % {"},{"line_number":1826,"context_line":"                \u0027prefix\u0027: \u0027hw\u0027,"},{"line_number":1827,"context_line":"                \u0027key\u0027: \u0027pmu\u0027,"},{"line_number":1828,"context_line":"                \u0027flavor_name\u0027: flavor.name,"},{"line_number":1829,"context_line":"                \u0027flavor_val\u0027: flavor_value,"},{"line_number":1830,"context_line":"                \u0027image_name\u0027: image_meta.name,"},{"line_number":1831,"context_line":"                \u0027image_val\u0027: image_value,"},{"line_number":1832,"context_line":"            },"},{"line_number":1833,"context_line":"        )"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":"    return flavor_value if flavor_value is not None else image_value"},{"line_number":1836,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"28a793a2_60dafdba","line":1833,"range":{"start_line":1824,"start_character":8,"end_line":1833,"end_character":1},"in_reply_to":"09c6bbff_85d692d6","updated":"2022-02-02 12:22:47.000000000","message":"No longer an issue, thankfully.","commit_id":"bcd2daa6982868d2a62814f6a867af7349a72f30"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c27d9c1dccc14082c34b82f90f9b925c64d797ae","unresolved":true,"context_lines":[{"line_number":1821,"context_line":"            \"%(image_name)s which has %(prefix)s_%(key)s explicitly set to \""},{"line_number":1822,"context_line":"            \"%(image_val)s.\""},{"line_number":1823,"context_line":"        )"},{"line_number":1824,"context_line":"        # TODO(sean-k-mooney): we should consider changing this 403 to a 400,"},{"line_number":1825,"context_line":"        # 403 was originally chosen to signify the user did not have"},{"line_number":1826,"context_line":"        # permission to override the flavor request in the image however a"},{"line_number":1827,"context_line":"        # 403 can be confused with a policy or keystone permission issue."},{"line_number":1828,"context_line":"        raise exception.FlavorImageConflict("},{"line_number":1829,"context_line":"            msg % {"},{"line_number":1830,"context_line":"                \u0027prefix\u0027: \u0027hw\u0027,"},{"line_number":1831,"context_line":"                \u0027key\u0027: \u0027pmu\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"b91a3844_a5eaa23c","line":1828,"range":{"start_line":1824,"start_character":0,"end_line":1828,"end_character":44},"updated":"2022-02-01 10:50:56.000000000","message":"Hm, isn\u0027t it now actually a HTTP400 due to https://github.com/openstack/nova/blob/e8feef747f128a4cc6033a09c9a1059110534950/nova/api/openstack/compute/servers.py#L58","commit_id":"ab6c8d77fc28bcecf95d8c03e03dcdabb546842d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0a529adba1bfc6e5b91a04e925bf6623432a6ae1","unresolved":false,"context_lines":[{"line_number":1821,"context_line":"            \"%(image_name)s which has %(prefix)s_%(key)s explicitly set to \""},{"line_number":1822,"context_line":"            \"%(image_val)s.\""},{"line_number":1823,"context_line":"        )"},{"line_number":1824,"context_line":"        # TODO(sean-k-mooney): we should consider changing this 403 to a 400,"},{"line_number":1825,"context_line":"        # 403 was originally chosen to signify the user did not have"},{"line_number":1826,"context_line":"        # permission to override the flavor request in the image however a"},{"line_number":1827,"context_line":"        # 403 can be confused with a policy or keystone permission issue."},{"line_number":1828,"context_line":"        raise exception.FlavorImageConflict("},{"line_number":1829,"context_line":"            msg % {"},{"line_number":1830,"context_line":"                \u0027prefix\u0027: \u0027hw\u0027,"},{"line_number":1831,"context_line":"                \u0027key\u0027: \u0027pmu\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"aa0dae38_2b716b25","line":1828,"range":{"start_line":1824,"start_character":0,"end_line":1828,"end_character":44},"in_reply_to":"b91a3844_a5eaa23c","updated":"2022-02-01 17:58:13.000000000","message":"Good point. Done","commit_id":"ab6c8d77fc28bcecf95d8c03e03dcdabb546842d"}]}
