)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ca397597a2b79d974e6d910114420506b4225204","unresolved":true,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"blueprint unified-limits-nova"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Depends-On: https://review.opendev.org/c/openstack/oslo.limit/+/802814"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Change-Id: I272b59b7bc8975bfd602640789f80d2d5f7ee698"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"b18db38b_edb04c30","line":44,"updated":"2021-08-17 14:49:46.000000000","message":"We need to land this oslo.limits patch this week and get an oslo.limit release before the feature freeze then bump our oslo.limits requirements in nova.","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a802cb3f9f709bcddc7319124c74e41ab9898156","unresolved":true,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"blueprint unified-limits-nova"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Depends-On: https://review.opendev.org/c/openstack/oslo.limit/+/802814"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Change-Id: I272b59b7bc8975bfd602640789f80d2d5f7ee698"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"c9b1de91_0db5916c","line":44,"in_reply_to":"b18db38b_edb04c30","updated":"2021-08-18 10:30:50.000000000","message":"after talking to Melanie it turned out that this oslo.limit patch is just a good to have thing but not mandatory. So we can actually land this series without it.\n\nPlease ignore my oslo.limit version bump related comments.","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"52966064cfe07e0756f1d74340a6d8d095593ea0","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"blueprint unified-limits-nova"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Depends-On: https://review.opendev.org/c/openstack/oslo.limit/+/802814"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Change-Id: I272b59b7bc8975bfd602640789f80d2d5f7ee698"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"70c6d1ab_d5720938","line":44,"in_reply_to":"c9b1de91_0db5916c","updated":"2022-02-09 06:46:04.000000000","message":"Done","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"cabdf887fe584bd214c64cdee83002ddc2a4ceea","unresolved":true,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"blueprint unified-limits-nova"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Depends-On: https://review.opendev.org/c/openstack/oslo.limit/+/802814"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Change-Id: I272b59b7bc8975bfd602640789f80d2d5f7ee698"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"d59178ff_db16935c","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":70},"updated":"2021-08-29 03:51:07.000000000","message":"Argh, I forgot to remove this. Will wait for feedback before respinning as I\u0027m sure there are other things that need changing.","commit_id":"561f9af1435f6ee5f2f20b709b130f151be08fae"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"52966064cfe07e0756f1d74340a6d8d095593ea0","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"blueprint unified-limits-nova"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Depends-On: https://review.opendev.org/c/openstack/oslo.limit/+/802814"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Change-Id: I272b59b7bc8975bfd602640789f80d2d5f7ee698"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"b105d8d5_91e4c5b7","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":70},"in_reply_to":"d59178ff_db16935c","updated":"2022-02-09 06:46:04.000000000","message":"Done","commit_id":"561f9af1435f6ee5f2f20b709b130f151be08fae"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f9b7890af23411fd3f6eb99072ca10067f89f451","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"b6b024fc_10a20208","updated":"2021-11-10 23:23:57.000000000","message":"recheck","commit_id":"91b44cad8a955a6f2c8c499505ac984f4995fe41"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"ee396dc2d49dfda182b11f54db0e8db141685ccf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"46af3ad1_abdf6db3","updated":"2021-11-12 19:16:15.000000000","message":"recheck Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct. Service Unavailable (HTTP 503)","commit_id":"ac61b373d43290976a269c913ab4f2829985c195"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"8464f0cfa983c514e50cb2dfe86234b2dd2964e8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":27,"id":"1ffe0ed9_f7508d92","updated":"2021-12-09 20:25:43.000000000","message":"recheck bug 1911574","commit_id":"b726762e480f06ad13148cfe52ae83fd3bb22799"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5c5bba941655b959bc867a2c453e27ad527bb93e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":27,"id":"0fa79671_6568909e","updated":"2021-12-08 00:14:35.000000000","message":"recheck libvirt.libvirtError: Requested operation is not valid: domain is not running","commit_id":"b726762e480f06ad13148cfe52ae83fd3bb22799"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f9fe15d2c708dd5c57c628a0b6ea399da7af32ca","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"94941651_57099839","updated":"2022-01-21 19:52:32.000000000","message":"recheck bug 1957941","commit_id":"c96f7a8bfc2d8b273d8230ab855f31f9b254c6fe"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2134ddd8e570fce12a7dbc8a045dde8a11792c2c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"66a10c61_14c3ebb9","updated":"2022-01-21 01:07:45.000000000","message":"recheck dep updated","commit_id":"c96f7a8bfc2d8b273d8230ab855f31f9b254c6fe"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a3d20fbc6bbd01715f68970ba30de651581c3d8b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"f82d0e4a_ababeef0","updated":"2022-01-28 00:26:21.000000000","message":"recheck 2022-01-27 21:49:59,125 107445 DEBUG    [tempest.lib.common.utils.test_utils] Call _is_port_status_active returns false in 60.000000 seconds","commit_id":"052ab4a6e7dd5d5efc4cdb8461c9d18ca2b2197c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"ecae63b9a50ce1550589b0bf3896b5e47a40c049","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"a856c9db_fb73ede6","updated":"2022-01-27 20:22:45.000000000","message":"recheck openstacksdk-functional-devstack POST_FAILURE","commit_id":"052ab4a6e7dd5d5efc4cdb8461c9d18ca2b2197c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"495ad5bde0ab12c1f09a517eb8c657d2b7e51f4b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":30,"id":"fb43300d_c3e744fe","updated":"2022-02-02 16:09:56.000000000","message":"recheck nova-next has been fixed. \n\nlooks good. The nit is OK to be covered in a followup","commit_id":"5aae8922db60bff5bb2f0d4397f95b8cf5ea6711"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"844bd4daa9580786139987c5d0559919e208e220","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":34,"id":"aaf3814f_b590fae0","updated":"2022-02-17 15:11:08.000000000","message":"Looks good overall but I have a question about shelved/offloaded instances and how we track them.","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5989d34cb5b7fe3fd21e2b383d778fdda8e938f8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":34,"id":"cc8a59e5_43258c46","updated":"2022-02-17 16:22:49.000000000","message":"moving to +2 as we discussed over IRC.","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fb233a706346a6c6f6eaa473e99f8b5dfd610052","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":34,"id":"7a4739b6_a3369729","updated":"2022-02-11 20:32:45.000000000","message":"recheck Deleting allocation in placement for migration e96f5cd1-3120-4ec3-b344-61691f87ecca failed 409\n\nFeb 11 04:34:47.650103 ubuntu-focal-rax-dfw-0028413004 nova-compute[53387]: ERROR nova.compute.manager [None req-66ebd81a-e3cf-4d56-9149-16855fbf8f67 tempest-MinBwAllocationPlacementTest-1269745210 tempest-MinBwAllocationPlacementTest-1269745210-project] Deleting allocation in placement for migration e96f5cd1-3120-4ec3-b344-61691f87ecca failed. The instance 41c102a9-2a6e-4ac7-be5f-eb05d1c060d8 will be put to ERROR state but the allocation held by the migration is leaked.: nova.exception.AllocationDeleteFailed: Failed to delete allocations for consumer e96f5cd1-3120-4ec3-b344-61691f87ecca. Error: {\"errors\": [{\"status\": 409, \"title\": \"Conflict\", \"detail\": \"There was a conflict when trying to complete your request.\\n\\n Inventory and/or allocations changed while attempting to allocate: Another thread concurrently updated the resource provider data. Please retry your update  \", \"code\": \"placement.concurrent_update\", \"request_id\": \"req-3898864a-b159-4759-9c1f-07263b526573\"}]}","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"84f44d75c9bbd6c5f19a062dfbc93ab211d712a8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":34,"id":"38a72e4e_4c604478","updated":"2022-02-11 23:15:18.000000000","message":"recheck bug 1944779","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"736034135facdb3e58528e312ceac928f546d489","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"b66e3c56_59f1a58e","updated":"2022-02-25 05:56:59.000000000","message":"Deletes of migration related allocations use force\u003dFalse:\n\nFeb 24 23:47:02.554283 ubuntu-focal-rax-dfw-0028603010 nova-compute[53278]: ERROR nova.virt.libvirt.driver [instance: 0d7171c2-2438-4dda-9d2a-1f1cfc97d3c0] nova.exception.AllocationDeleteFailed: Failed to delete allocations for consumer b3ce4fcb-70fe-45fd-9ff6-8f91c6834bb6. Error: {\"errors\": [{\"status\": 409, \"title\": \"Conflict\", \"detail\": \"There was a conflict when trying to complete your request.\\n\\n Inventory and/or allocations changed while attempting to allocate: Another thread concurrently updated the resource provider data. Please retry your update  \", \"code\": \"placement.concurrent_update\", \"request_id\": \"req-a34b0997-011d-4832-b0bd-b4d51bca5f5b\"}]}","commit_id":"d984a6d88670b60e12b8dc374607ec59f169c5f1"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"3a544d3d91033e2d89439d81bdbabbdc36dbae05","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"19f1c67a_ea102fc8","updated":"2022-02-26 09:21:03.000000000","message":"recheck","commit_id":"d984a6d88670b60e12b8dc374607ec59f169c5f1"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"008c6d83c7d96d1ab5ac703d8afda93b8a5b9f91","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"a3427b70_9218e6f1","updated":"2022-02-26 13:48:59.000000000","message":"recheck","commit_id":"d984a6d88670b60e12b8dc374607ec59f169c5f1"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"804414154e873bbf6ee685cbcef03fa1971c6111","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"aea97508_ca9e2d32","updated":"2022-02-25 12:52:54.000000000","message":"recheck","commit_id":"d984a6d88670b60e12b8dc374607ec59f169c5f1"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9aa0ae953adbe68d2724f6b073aeea5bd01d9c67","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"c67051df_79efcbd7","updated":"2022-02-24 22:07:13.000000000","message":"recheck","commit_id":"d984a6d88670b60e12b8dc374607ec59f169c5f1"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a01c6389cffa3f678b5235da14940a2d8adceb58","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"9215f1d2_f38da255","updated":"2022-02-25 05:55:02.000000000","message":"recheck + /opt/stack/nova/gate/post_test_hook.sh:main:98 :   echo \u0027There were leaked allocations; failing.\u0027","commit_id":"d984a6d88670b60e12b8dc374607ec59f169c5f1"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"91e8a22d9670b33f8c4fec281d0464db36536f2e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"275cc0a5_7c8465dc","updated":"2022-02-24 18:45:53.000000000","message":"recheck [ERROR] /opt/stack/devstack/lib/neutron_plugins/ovn_agent:178 Socket /var/run/openvswitch/ovnnb_db.sock not found","commit_id":"d984a6d88670b60e12b8dc374607ec59f169c5f1"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"aecf6d0d6d0017f28e24027925f09a2f1efe700a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"4f9bd4cc_b98a296c","updated":"2022-02-26 18:41:31.000000000","message":"recheck bug 1959677","commit_id":"d984a6d88670b60e12b8dc374607ec59f169c5f1"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"c15d50e58f8bfaee2fd31ab3f697f8517be66a4e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"72bb72f1_6e894a81","updated":"2022-02-26 11:58:40.000000000","message":"recheck ssh timeout","commit_id":"d984a6d88670b60e12b8dc374607ec59f169c5f1"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3270742bf0676ffac61c99ac8f72b70eddd2b7e3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"8570131d_feae737b","updated":"2022-02-26 20:36:34.000000000","message":"recheck tempest.lib.exceptions.SSHTimeout: Connection to the 172.24.5.243 via SSH timed out.","commit_id":"d984a6d88670b60e12b8dc374607ec59f169c5f1"}],"lower-constraints.txt":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ca397597a2b79d974e6d910114420506b4225204","unresolved":true,"context_lines":[{"line_number":73,"context_line":"oslo.context\u003d\u003d3.1.1"},{"line_number":74,"context_line":"oslo.db\u003d\u003d10.0.0"},{"line_number":75,"context_line":"oslo.i18n\u003d\u003d5.0.1"},{"line_number":76,"context_line":"oslo.limit\u003d\u003d1.4.0"},{"line_number":77,"context_line":"oslo.log\u003d\u003d4.4.0"},{"line_number":78,"context_line":"oslo.messaging\u003d\u003d10.3.0"},{"line_number":79,"context_line":"oslo.middleware\u003d\u003d3.31.0"}],"source_content_type":"text/plain","patch_set":10,"id":"20101b15_b85b462b","line":76,"updated":"2021-08-17 14:49:46.000000000","message":"This will need another bump when the depends-on patch lands and released in oslo.limits","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"52966064cfe07e0756f1d74340a6d8d095593ea0","unresolved":false,"context_lines":[{"line_number":73,"context_line":"oslo.context\u003d\u003d3.1.1"},{"line_number":74,"context_line":"oslo.db\u003d\u003d10.0.0"},{"line_number":75,"context_line":"oslo.i18n\u003d\u003d5.0.1"},{"line_number":76,"context_line":"oslo.limit\u003d\u003d1.4.0"},{"line_number":77,"context_line":"oslo.log\u003d\u003d4.4.0"},{"line_number":78,"context_line":"oslo.messaging\u003d\u003d10.3.0"},{"line_number":79,"context_line":"oslo.middleware\u003d\u003d3.31.0"}],"source_content_type":"text/plain","patch_set":10,"id":"c8c4c2c5_4f264758","line":76,"in_reply_to":"20101b15_b85b462b","updated":"2022-02-09 06:46:04.000000000","message":"Done","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"}],"nova/conf/workarounds.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"844bd4daa9580786139987c5d0559919e208e220","unresolved":true,"context_lines":[{"line_number":397,"context_line":"Related options:"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"* :oslo.config:option:`quota.driver`"},{"line_number":400,"context_line":"\"\"\"),"},{"line_number":401,"context_line":"]"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"90df73ad_222ca5d5","line":400,"updated":"2022-02-17 15:11:08.000000000","message":"Could you please amend the spec with a FUP explaining this ?","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fb507b0f245beeb05ce440cd5e0bebc80d9e1baf","unresolved":true,"context_lines":[{"line_number":397,"context_line":"Related options:"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"* :oslo.config:option:`quota.driver`"},{"line_number":400,"context_line":"\"\"\"),"},{"line_number":401,"context_line":"]"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"74145bca_a9506984","line":400,"in_reply_to":"90df73ad_222ca5d5","updated":"2022-02-25 00:29:42.000000000","message":"I have added a note about this config option to the spec amendment patch:\n\nhttps://review.opendev.org/c/openstack/nova-specs/+/829413","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"}],"nova/limit/keystone.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"94f3f5441630397dd94a8d02dfd6baffa2a0ec20","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    # NOTE(johngarbutt): this skips bfv and port resources"},{"line_number":93,"context_line":"    # but it still gives us better checks than before unified limits"},{"line_number":94,"context_line":"    # We need an instance in the DB to use the current is_bfv logic"},{"line_number":95,"context_line":"    # which doesn\u0027t work well for instances that don\u0027t yet have a uuid"},{"line_number":96,"context_line":"    deltas_from_flavor \u003d utils.resources_for_limits(flavor, is_bfv)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    deltas \u003d {\"servers\": count}"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_c0d2585c","line":95,"range":{"start_line":95,"start_character":34,"end_line":95,"end_character":70},"updated":"2020-04-09 00:01:39.000000000","message":"What does this mean? Instances have a uuid from the start, they just don\u0027t have an Instance record until they are scheduled.\n\nSee this code for details:\n\nhttps://github.com/openstack/nova/blob/22ce38aae48c0979bf2beb1147a1b955b6042e37/nova/compute/api.py#L1274-L1297","commit_id":"154b23e2b6cd277d39d8db1043a5c56c02ba8c40"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d6010f48c9ac042aa50a66ecf79fa0ca00cb69a1","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    # NOTE(johngarbutt): this skips bfv and port resources"},{"line_number":93,"context_line":"    # but it still gives us better checks than before unified limits"},{"line_number":94,"context_line":"    # We need an instance in the DB to use the current is_bfv logic"},{"line_number":95,"context_line":"    # which doesn\u0027t work well for instances that don\u0027t yet have a uuid"},{"line_number":96,"context_line":"    deltas_from_flavor \u003d utils.resources_for_limits(flavor, is_bfv)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    deltas \u003d {\"servers\": count}"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_0480cb45","line":95,"range":{"start_line":95,"start_character":34,"end_line":95,"end_character":70},"in_reply_to":"df33271e_c0d2585c","updated":"2020-04-09 10:17:12.000000000","message":"This is all not tree any more, sorry I forgot to remove it after I fixed the old issue.","commit_id":"154b23e2b6cd277d39d8db1043a5c56c02ba8c40"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"94f3f5441630397dd94a8d02dfd6baffa2a0ec20","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"def _enforce_with_oslo(context, project_id, deltas):"},{"line_number":106,"context_line":"    # NOTE(johngarbutt) should we move context arg into oslo.limit?"},{"line_number":107,"context_line":"    def callback(project_id, resource_names):"},{"line_number":108,"context_line":"        return _get_usage(context, project_id, resource_names)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_a033d4aa","line":106,"updated":"2020-04-09 00:01:39.000000000","message":"How would that work? Shouldn\u0027t the context come from nova?","commit_id":"154b23e2b6cd277d39d8db1043a5c56c02ba8c40"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d6010f48c9ac042aa50a66ecf79fa0ca00cb69a1","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"def _enforce_with_oslo(context, project_id, deltas):"},{"line_number":106,"context_line":"    # NOTE(johngarbutt) should we move context arg into oslo.limit?"},{"line_number":107,"context_line":"    def callback(project_id, resource_names):"},{"line_number":108,"context_line":"        return _get_usage(context, project_id, resource_names)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_64dd576f","line":106,"in_reply_to":"df33271e_a033d4aa","updated":"2020-04-09 10:17:12.000000000","message":"I really mean we could have callback signature that olso.limit expects include a context argument, rather than needing that callback wrapper function below.","commit_id":"154b23e2b6cd277d39d8db1043a5c56c02ba8c40"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"94f3f5441630397dd94a8d02dfd6baffa2a0ec20","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    return new_name"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def enforce_num_instances(context, project_id, flavor, is_bfvm,"},{"line_number":125,"context_line":"                          min_count, max_count):"},{"line_number":126,"context_line":"    \"\"\"Return max instances possible, else raise TooManyInstances exception.\"\"\""},{"line_number":127,"context_line":"    if not limit_utils.use_unified_limits():"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_604eec38","line":124,"range":{"start_line":124,"start_character":55,"end_line":124,"end_character":62},"updated":"2020-04-09 00:01:39.000000000","message":"is_bfvm? Whats the m?","commit_id":"154b23e2b6cd277d39d8db1043a5c56c02ba8c40"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d6010f48c9ac042aa50a66ecf79fa0ca00cb69a1","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    return new_name"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def enforce_num_instances(context, project_id, flavor, is_bfvm,"},{"line_number":125,"context_line":"                          min_count, max_count):"},{"line_number":126,"context_line":"    \"\"\"Return max instances possible, else raise TooManyInstances exception.\"\"\""},{"line_number":127,"context_line":"    if not limit_utils.use_unified_limits():"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_a4e3df33","line":124,"range":{"start_line":124,"start_character":55,"end_line":124,"end_character":62},"in_reply_to":"df33271e_604eec38","updated":"2020-04-09 10:17:12.000000000","message":"good question, its a typo I think, oops.","commit_id":"154b23e2b6cd277d39d8db1043a5c56c02ba8c40"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c94f8ee78e078d3c3874cfd847b4682bdcd626d8","unresolved":true,"context_lines":[{"line_number":107,"context_line":"    def callback(project_id, resource_names):"},{"line_number":108,"context_line":"        return _get_usage(context, project_id, resource_names)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    enforcer \u003d limit.Enforcer(callback)"},{"line_number":111,"context_line":"    enforcer.enforce(project_id, deltas)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"42e66631_ba4566d0","line":110,"updated":"2021-05-11 19:22:48.000000000","message":"This will raise that exception you mention if we fail to contact placement right? I expect we\u0027ll see a 500 from nova-api in that case if we let it bubble from here.","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"32dcadef10885a5f0baaead175b6a40b2bff142b","unresolved":true,"context_lines":[{"line_number":107,"context_line":"    def callback(project_id, resource_names):"},{"line_number":108,"context_line":"        return _get_usage(context, project_id, resource_names)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    enforcer \u003d limit.Enforcer(callback)"},{"line_number":111,"context_line":"    enforcer.enforce(project_id, deltas)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"63cab7aa_2a01cb61","line":110,"in_reply_to":"414154ff_193a5b7a","updated":"2021-07-29 02:03:02.000000000","message":"PLACEMENT_CLIENT.get_usages_counts_for_limits will raise exception.UsagesRetrievalFailed if it fails to contact placement after some retries.\n\nWe\u0027re not currently handling it when CONF.quota.count_usage_from_placement \u003d True either. It\u0027s not immediately clear to me what else we should do in this case though because it is legitimately an internal server error. It\u0027s not Invalid, PermissionDenied, Unauthorized, NotFound...","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5b18938429a6166fe25be3e2eeedf3876962c085","unresolved":true,"context_lines":[{"line_number":107,"context_line":"    def callback(project_id, resource_names):"},{"line_number":108,"context_line":"        return _get_usage(context, project_id, resource_names)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    enforcer \u003d limit.Enforcer(callback)"},{"line_number":111,"context_line":"    enforcer.enforce(project_id, deltas)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"414154ff_193a5b7a","line":110,"in_reply_to":"42e66631_ba4566d0","updated":"2021-06-07 15:19:30.000000000","message":"eek, yes...","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"52966064cfe07e0756f1d74340a6d8d095593ea0","unresolved":false,"context_lines":[{"line_number":107,"context_line":"    def callback(project_id, resource_names):"},{"line_number":108,"context_line":"        return _get_usage(context, project_id, resource_names)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    enforcer \u003d limit.Enforcer(callback)"},{"line_number":111,"context_line":"    enforcer.enforce(project_id, deltas)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"b5b8d7c7_3d59aac4","line":110,"in_reply_to":"63cab7aa_2a01cb61","updated":"2022-02-09 06:46:04.000000000","message":"Done","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c94f8ee78e078d3c3874cfd847b4682bdcd626d8","unresolved":true,"context_lines":[{"line_number":121,"context_line":"    return new_name"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def enforce_num_instances(context, project_id, flavor, is_bfvm,"},{"line_number":125,"context_line":"                          min_count, max_count):"},{"line_number":126,"context_line":"    \"\"\"Return max instances possible, else raise TooManyInstances exception.\"\"\""},{"line_number":127,"context_line":"    if not limit_utils.use_unified_limits():"}],"source_content_type":"text/x-python","patch_set":7,"id":"9188e901_a0f5a1ea","line":124,"range":{"start_line":124,"start_character":4,"end_line":124,"end_character":25},"updated":"2021-05-11 19:22:48.000000000","message":"It looks to me like this is mis-named. This is not just enforcing the num_instances quota, but all the resources as well yeah?","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e5cd437abc9979df8feab4a3424531d3dcfcb49c","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    return new_name"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def enforce_num_instances(context, project_id, flavor, is_bfvm,"},{"line_number":125,"context_line":"                          min_count, max_count):"},{"line_number":126,"context_line":"    \"\"\"Return max instances possible, else raise TooManyInstances exception.\"\"\""},{"line_number":127,"context_line":"    if not limit_utils.use_unified_limits():"}],"source_content_type":"text/x-python","patch_set":7,"id":"bdcf1b74_6480d9a2","line":124,"range":{"start_line":124,"start_character":4,"end_line":124,"end_character":25},"in_reply_to":"0165722e_f0625e16","updated":"2022-02-11 03:12:46.000000000","message":"Done","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5b18938429a6166fe25be3e2eeedf3876962c085","unresolved":true,"context_lines":[{"line_number":121,"context_line":"    return new_name"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def enforce_num_instances(context, project_id, flavor, is_bfvm,"},{"line_number":125,"context_line":"                          min_count, max_count):"},{"line_number":126,"context_line":"    \"\"\"Return max instances possible, else raise TooManyInstances exception.\"\"\""},{"line_number":127,"context_line":"    if not limit_utils.use_unified_limits():"}],"source_content_type":"text/x-python","patch_set":7,"id":"0165722e_f0625e16","line":124,"range":{"start_line":124,"start_character":4,"end_line":124,"end_character":25},"in_reply_to":"9188e901_a0f5a1ea","updated":"2021-06-07 15:19:30.000000000","message":"I was matching the name: \"check_num_instances_quota\", but I didn\u0027t like \"check\". Now you mention it, \"num_instances\" is also rubbish. \"enforce_server_limits\" might be better... but then its odd you get a number of servers back.","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c94f8ee78e078d3c3874cfd847b4682bdcd626d8","unresolved":true,"context_lines":[{"line_number":153,"context_line":"            overs \u003d [_convert_to_legacy_name(info.resource_name) for info in"},{"line_number":154,"context_line":"                     over_info]"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            raise exception.TooManyInstances(overs\u003d\", \".join(overs),"},{"line_number":157,"context_line":"                                             req\u003d\", \".join(req),"},{"line_number":158,"context_line":"                                             used\u003d\", \".join(used),"},{"line_number":159,"context_line":"                                             allowed\u003d\", \".join(allowed))"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":162,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"f25bd601_6e7bbd90","line":159,"range":{"start_line":156,"start_character":12,"end_line":159,"end_character":72},"updated":"2021-05-11 19:22:48.000000000","message":"FWIW, the exception raised by oslo.limit pretty much covers this. It says something like \"Request for 1 cookie with 31 currently used cookies would be over limit of 32 cookies\".\n\nI guess the goal here is to make the error message look the same as it did before, but is it worth it? As inconsistent as quota enforcement is across the projects, it seems like maybe letting our moving to oslo.limit clean up our error messages at the same time might be a good thing.","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5b18938429a6166fe25be3e2eeedf3876962c085","unresolved":true,"context_lines":[{"line_number":153,"context_line":"            overs \u003d [_convert_to_legacy_name(info.resource_name) for info in"},{"line_number":154,"context_line":"                     over_info]"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            raise exception.TooManyInstances(overs\u003d\", \".join(overs),"},{"line_number":157,"context_line":"                                             req\u003d\", \".join(req),"},{"line_number":158,"context_line":"                                             used\u003d\", \".join(used),"},{"line_number":159,"context_line":"                                             allowed\u003d\", \".join(allowed))"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":162,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"bfdeaa70_b4dfb221","line":159,"range":{"start_line":156,"start_character":12,"end_line":159,"end_character":72},"in_reply_to":"f25bd601_6e7bbd90","updated":"2021-06-07 15:19:30.000000000","message":"I was going zero API changes. But now we have some adoption of oslo.limit, I like your idea of a common error string. I certainly hate the crud I am doing here.","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c94f8ee78e078d3c3874cfd847b4682bdcd626d8","unresolved":true,"context_lines":[{"line_number":161,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":162,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","},{"line_number":163,"context_line":"                  max_count, max_count - 1)"},{"line_number":164,"context_line":"        return enforce_num_instances(context, project_id, flavor, is_bfvm,"},{"line_number":165,"context_line":"                                     min_count, max_count - 1)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    # no problems with max_count, so we return max count"},{"line_number":168,"context_line":"    return max_count"}],"source_content_type":"text/x-python","patch_set":7,"id":"45e47b77_8e948523","line":165,"range":{"start_line":164,"start_character":8,"end_line":165,"end_character":62},"updated":"2021-05-11 19:22:48.000000000","message":"I don\u0027t really know for sure, but won\u0027t this continue hitting keystone for the limit each time we retry? If I keep asking to boot 1000 instances, I can make nova do a lot of queries against keystone...","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"32dcadef10885a5f0baaead175b6a40b2bff142b","unresolved":true,"context_lines":[{"line_number":161,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":162,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","},{"line_number":163,"context_line":"                  max_count, max_count - 1)"},{"line_number":164,"context_line":"        return enforce_num_instances(context, project_id, flavor, is_bfvm,"},{"line_number":165,"context_line":"                                     min_count, max_count - 1)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    # no problems with max_count, so we return max count"},{"line_number":168,"context_line":"    return max_count"}],"source_content_type":"text/x-python","patch_set":7,"id":"d76f33fc_f2eda559","line":165,"range":{"start_line":164,"start_character":8,"end_line":165,"end_character":62},"in_reply_to":"0a25ac6e_065d99ec","updated":"2021-07-29 02:03:02.000000000","message":"Based on these comments, I have taken a try at Enforcer limit caching here:\n\nhttps://review.opendev.org/c/openstack/oslo.limit/+/802814","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5b18938429a6166fe25be3e2eeedf3876962c085","unresolved":true,"context_lines":[{"line_number":161,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":162,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","},{"line_number":163,"context_line":"                  max_count, max_count - 1)"},{"line_number":164,"context_line":"        return enforce_num_instances(context, project_id, flavor, is_bfvm,"},{"line_number":165,"context_line":"                                     min_count, max_count - 1)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    # no problems with max_count, so we return max count"},{"line_number":168,"context_line":"    return max_count"}],"source_content_type":"text/x-python","patch_set":7,"id":"abd46af9_307034aa","line":165,"range":{"start_line":164,"start_character":8,"end_line":165,"end_character":62},"in_reply_to":"45e47b77_8e948523","updated":"2021-06-07 15:19:30.000000000","message":"Yeah, its pretty horrible, this is POC rubbish.\n\nIn my head I wanted oslo.limit to manage the caching of all that info, as I don\u0027t need it fresh here. But as you point out, it doesn\u0027t do that today.\n\nProbably could generate headroom info, and do stuff like this: https://github.com/openstack/nova/blob/50fdbc752a9ca9c31488140ef2997ed59d861a41/nova/compute/utils.py#L1134","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3e7f326ca07e9713a02f25664c05bde266d8dd0b","unresolved":true,"context_lines":[{"line_number":161,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":162,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","},{"line_number":163,"context_line":"                  max_count, max_count - 1)"},{"line_number":164,"context_line":"        return enforce_num_instances(context, project_id, flavor, is_bfvm,"},{"line_number":165,"context_line":"                                     min_count, max_count - 1)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    # no problems with max_count, so we return max count"},{"line_number":168,"context_line":"    return max_count"}],"source_content_type":"text/x-python","patch_set":7,"id":"0a25ac6e_065d99ec","line":165,"range":{"start_line":164,"start_character":8,"end_line":165,"end_character":62},"in_reply_to":"abd46af9_307034aa","updated":"2021-06-07 15:53:26.000000000","message":"Yeah, I agree that oslo.limit needs to cache, at least per instance of Enforcer() for things like this. I\u0027m hesitant to make it cache with a timeframe outside the existence of that object, because I think that an operator will want to be able to immediately stop bleeding by setting a quota on a thing, without having to wait for a TTL to notice. But, making it cache on Enforcer would handle your case here I think, if you would just instantiate Enforcer once per request and pass it into your helper methods here.","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e5cd437abc9979df8feab4a3424531d3dcfcb49c","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":162,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","},{"line_number":163,"context_line":"                  max_count, max_count - 1)"},{"line_number":164,"context_line":"        return enforce_num_instances(context, project_id, flavor, is_bfvm,"},{"line_number":165,"context_line":"                                     min_count, max_count - 1)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    # no problems with max_count, so we return max count"},{"line_number":168,"context_line":"    return max_count"}],"source_content_type":"text/x-python","patch_set":7,"id":"cb54d1e7_220bbf53","line":165,"range":{"start_line":164,"start_character":8,"end_line":165,"end_character":62},"in_reply_to":"d76f33fc_f2eda559","updated":"2022-02-11 03:12:46.000000000","message":"Done","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ca397597a2b79d974e6d910114420506b4225204","unresolved":true,"context_lines":[{"line_number":93,"context_line":"    if count \u003c 0:"},{"line_number":94,"context_line":"        raise ValueError(\"count\")"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    # NOTE(johngarbutt): this skips bfv and port resources"},{"line_number":97,"context_line":"    # but it still gives us better checks than before unified limits"},{"line_number":98,"context_line":"    # We need an instance in the DB to use the current is_bfv logic"},{"line_number":99,"context_line":"    # which doesn\u0027t work well for instances that don\u0027t yet have a uuid"}],"source_content_type":"text/x-python","patch_set":10,"id":"f4a3b69b_22343fb4","line":96,"range":{"start_line":96,"start_character":25,"end_line":96,"end_character":58},"updated":"2021-08-17 14:49:46.000000000","message":"and cyborg resources","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"52966064cfe07e0756f1d74340a6d8d095593ea0","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    if count \u003c 0:"},{"line_number":94,"context_line":"        raise ValueError(\"count\")"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    # NOTE(johngarbutt): this skips bfv and port resources"},{"line_number":97,"context_line":"    # but it still gives us better checks than before unified limits"},{"line_number":98,"context_line":"    # We need an instance in the DB to use the current is_bfv logic"},{"line_number":99,"context_line":"    # which doesn\u0027t work well for instances that don\u0027t yet have a uuid"}],"source_content_type":"text/x-python","patch_set":10,"id":"9d79f9f4_8f20fc35","line":96,"range":{"start_line":96,"start_character":25,"end_line":96,"end_character":58},"in_reply_to":"f4a3b69b_22343fb4","updated":"2022-02-09 06:46:04.000000000","message":"Done","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ca397597a2b79d974e6d910114420506b4225204","unresolved":true,"context_lines":[{"line_number":118,"context_line":"    if new_name \u003d\u003d \"servers\":"},{"line_number":119,"context_line":"        return \"instances\""},{"line_number":120,"context_line":"    if new_name \u003d\u003d \"class:VCPU\":"},{"line_number":121,"context_line":"        return \"cores\""},{"line_number":122,"context_line":"    if new_name \u003d\u003d \"class:MEMORY_MB\":"},{"line_number":123,"context_line":"        return \"ram\""},{"line_number":124,"context_line":"    return new_name"}],"source_content_type":"text/x-python","patch_set":10,"id":"774b90f5_97a0de4c","line":121,"updated":"2021-08-17 14:49:46.000000000","message":"So this does not consider PCPUs, is this still produces the same result as the legacy quota system? I.e is the legacy quota system also ignores PCPUs?","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c44aaa72bb0763203724c8cadc58cfb0acae7497","unresolved":true,"context_lines":[{"line_number":138,"context_line":"        raise ValueError(\"invalid max_count\")"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    deltas \u003d _get_deltas_by_flavor(flavor, is_bfvm, max_count)"},{"line_number":141,"context_line":"    enforcer \u003d _get_enforcer(context, project_id)"},{"line_number":142,"context_line":"    try:"},{"line_number":143,"context_line":"        enforcer.enforce(project_id, deltas)"},{"line_number":144,"context_line":"    except limit_exceptions.ProjectOverLimit as e:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3bd29d47_f13e6ce3","line":141,"updated":"2021-08-11 06:24:04.000000000","message":"Should we also handle failure to contact keystone? Creation of a Enforcer object can raise an exception if keystone cannot be reached.","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"52966064cfe07e0756f1d74340a6d8d095593ea0","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        raise ValueError(\"invalid max_count\")"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    deltas \u003d _get_deltas_by_flavor(flavor, is_bfvm, max_count)"},{"line_number":141,"context_line":"    enforcer \u003d _get_enforcer(context, project_id)"},{"line_number":142,"context_line":"    try:"},{"line_number":143,"context_line":"        enforcer.enforce(project_id, deltas)"},{"line_number":144,"context_line":"    except limit_exceptions.ProjectOverLimit as e:"}],"source_content_type":"text/x-python","patch_set":10,"id":"e3c1b921_dc2adc7c","line":141,"in_reply_to":"3bd29d47_f13e6ce3","updated":"2022-02-09 06:46:04.000000000","message":"Done","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ca397597a2b79d974e6d910114420506b4225204","unresolved":true,"context_lines":[{"line_number":142,"context_line":"    try:"},{"line_number":143,"context_line":"        enforcer.enforce(project_id, deltas)"},{"line_number":144,"context_line":"    except limit_exceptions.ProjectOverLimit as e:"},{"line_number":145,"context_line":"        if max_count \u003c\u003d min_count:"},{"line_number":146,"context_line":"            # Copy the exception message to a QuotaError to propagate to the"},{"line_number":147,"context_line":"            # API layer"},{"line_number":148,"context_line":"            raise exception.QuotaError(message\u003dstr(e))"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a4ab174_783cf738","line":145,"range":{"start_line":145,"start_character":11,"end_line":145,"end_character":34},"updated":"2021-08-17 14:49:46.000000000","message":"As per L135 this basically means max_count \u003d\u003d min_count\nAlso a comment would help here that this is the case when not even the min_count fits the quota therefore we gave up and raise an quota error.","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"}],"nova/limit/placement.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3e5f50a373a977b3c8edf5bd8e2db6710caaa157","unresolved":true,"context_lines":[{"line_number":85,"context_line":"    for resource_class in resource_classes:"},{"line_number":86,"context_line":"        # Placement doesn\u0027t know about classes with zero usage"},{"line_number":87,"context_line":"        # so default to zero to tell oslo.limit usage is zero"},{"line_number":88,"context_line":"        resource_counts[resource_class] \u003d usages.get(resource_class, 0)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    return resource_counts"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"594977b0_85e0e8b2","line":88,"range":{"start_line":88,"start_character":24,"end_line":88,"end_character":38},"updated":"2021-09-01 05:12:17.000000000","message":"Found another bug while writing a func test, we need to prefix the resource class name back with \u0027class:\u0027 that was stripped earlier on L57.","commit_id":"802f55c032f5c09b7a3417ec558fc786aee6b793"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"33284ef2c7498d307c68e3071e3a40ca27c2c129","unresolved":true,"context_lines":[{"line_number":85,"context_line":"    for resource_class in resource_classes:"},{"line_number":86,"context_line":"        # Placement doesn\u0027t know about classes with zero usage"},{"line_number":87,"context_line":"        # so default to zero to tell oslo.limit usage is zero"},{"line_number":88,"context_line":"        resource_counts[resource_class] \u003d usages.get(resource_class, 0)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    return resource_counts"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"c3d254e8_8f483363","line":88,"range":{"start_line":88,"start_character":24,"end_line":88,"end_character":38},"in_reply_to":"594977b0_85e0e8b2","updated":"2021-09-01 06:26:18.000000000","message":"Ah, looks like this was added in a later (legacy limit handling) patch in the set:\n\nhttps://review.opendev.org/c/openstack/nova/+/713498/15/nova/limit/placement.py#94\n\nbut AFAICT we need it here before we start enforcing limits in the next patch.","commit_id":"802f55c032f5c09b7a3417ec558fc786aee6b793"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9aa0ae953adbe68d2724f6b073aeea5bd01d9c67","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    for resource_class in resource_classes:"},{"line_number":86,"context_line":"        # Placement doesn\u0027t know about classes with zero usage"},{"line_number":87,"context_line":"        # so default to zero to tell oslo.limit usage is zero"},{"line_number":88,"context_line":"        resource_counts[resource_class] \u003d usages.get(resource_class, 0)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    return resource_counts"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"f6c1e28b_dfcb596f","line":88,"range":{"start_line":88,"start_character":24,"end_line":88,"end_character":38},"in_reply_to":"c3d254e8_8f483363","updated":"2022-02-24 22:07:13.000000000","message":"Ack","commit_id":"802f55c032f5c09b7a3417ec558fc786aee6b793"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5c88181d1b92974a1c603381d792f456635754e6","unresolved":true,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"def enforce_num_instances_and_flavor(context, project_id, flavor, is_bfvm,"},{"line_number":136,"context_line":"                                     min_count, max_count, enforcer\u003dNone):"},{"line_number":137,"context_line":"    \"\"\"Return max instances possible, else raise TooManyInstances exception.\"\"\""},{"line_number":138,"context_line":"    if not limit_utils.use_unified_limits():"},{"line_number":139,"context_line":"        return max_count"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"26ae9b88_5ec78452","line":137,"range":{"start_line":137,"start_character":49,"end_line":137,"end_character":65},"updated":"2021-09-16 18:53:09.000000000","message":"I think this is a LIE!","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e22c2798f0ee1eaa39962635fb7d9699e2fe1db5","unresolved":true,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"def enforce_num_instances_and_flavor(context, project_id, flavor, is_bfvm,"},{"line_number":136,"context_line":"                                     min_count, max_count, enforcer\u003dNone):"},{"line_number":137,"context_line":"    \"\"\"Return max instances possible, else raise TooManyInstances exception.\"\"\""},{"line_number":138,"context_line":"    if not limit_utils.use_unified_limits():"},{"line_number":139,"context_line":"        return max_count"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7e013843_962346c0","line":137,"range":{"start_line":137,"start_character":49,"end_line":137,"end_character":65},"in_reply_to":"26ae9b88_5ec78452","updated":"2021-09-16 19:30:07.000000000","message":"Oops! Indeed it is. So, I dunno what everyone else thinks but with unified limits what I\u0027ve done is change all the quota exceptions to raise the generic QuotaError with an exact copy of the message from oslo.limit, based on the earlier discussion on this? review about it being maybe better to abandon the old exception messages. My thinking was that we probably don\u0027t want to handle oslo.limit exceptions in various places in our code and that translating them to nova exceptions might be best. I added QuotaError catching accordingly in upper layers where needed.\n\nI can change this if people think this should be done a different way.","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ce0875c6fb92449d0f73e1913b8f541d9d2db12b","unresolved":true,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"def enforce_num_instances_and_flavor(context, project_id, flavor, is_bfvm,"},{"line_number":136,"context_line":"                                     min_count, max_count, enforcer\u003dNone):"},{"line_number":137,"context_line":"    \"\"\"Return max instances possible, else raise TooManyInstances exception.\"\"\""},{"line_number":138,"context_line":"    if not limit_utils.use_unified_limits():"},{"line_number":139,"context_line":"        return max_count"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"cc72d812_2245e80a","line":137,"range":{"start_line":137,"start_character":49,"end_line":137,"end_character":65},"in_reply_to":"7e013843_962346c0","updated":"2021-09-16 19:48:28.000000000","message":"No, I think that\u0027s fine, I just think they should match :D","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f6431af483334e1efad9608333dfc45fe2153bc6","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"def enforce_num_instances_and_flavor(context, project_id, flavor, is_bfvm,"},{"line_number":136,"context_line":"                                     min_count, max_count, enforcer\u003dNone):"},{"line_number":137,"context_line":"    \"\"\"Return max instances possible, else raise TooManyInstances exception.\"\"\""},{"line_number":138,"context_line":"    if not limit_utils.use_unified_limits():"},{"line_number":139,"context_line":"        return max_count"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3ffb39aa_be87fb90","line":137,"range":{"start_line":137,"start_character":49,"end_line":137,"end_character":65},"in_reply_to":"cc72d812_2245e80a","updated":"2021-09-23 05:16:26.000000000","message":"Done","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5c88181d1b92974a1c603381d792f456635754e6","unresolved":true,"context_lines":[{"line_number":152,"context_line":"        if max_count \u003c\u003d min_count:"},{"line_number":153,"context_line":"            # Copy the exception message to a QuotaError to propagate to the"},{"line_number":154,"context_line":"            # API layer"},{"line_number":155,"context_line":"            raise exception.QuotaError(message\u003dstr(e))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":158,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","}],"source_content_type":"text/x-python","patch_set":15,"id":"23ca6b55_588dde96","line":155,"range":{"start_line":155,"start_character":28,"end_line":155,"end_character":38},"updated":"2021-09-16 18:53:09.000000000","message":"I think this is what the docstring is saying should be TooManyInstances.","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e22c2798f0ee1eaa39962635fb7d9699e2fe1db5","unresolved":true,"context_lines":[{"line_number":152,"context_line":"        if max_count \u003c\u003d min_count:"},{"line_number":153,"context_line":"            # Copy the exception message to a QuotaError to propagate to the"},{"line_number":154,"context_line":"            # API layer"},{"line_number":155,"context_line":"            raise exception.QuotaError(message\u003dstr(e))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":158,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","}],"source_content_type":"text/x-python","patch_set":15,"id":"3fdd9532_0ff18cd5","line":155,"range":{"start_line":155,"start_character":28,"end_line":155,"end_character":38},"in_reply_to":"23ca6b55_588dde96","updated":"2021-09-16 19:30:07.000000000","message":"Yes, in this case I forgot to update the docstring.","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ce0875c6fb92449d0f73e1913b8f541d9d2db12b","unresolved":true,"context_lines":[{"line_number":152,"context_line":"        if max_count \u003c\u003d min_count:"},{"line_number":153,"context_line":"            # Copy the exception message to a QuotaError to propagate to the"},{"line_number":154,"context_line":"            # API layer"},{"line_number":155,"context_line":"            raise exception.QuotaError(message\u003dstr(e))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":158,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","}],"source_content_type":"text/x-python","patch_set":15,"id":"bc169423_4937cf4f","line":155,"range":{"start_line":155,"start_character":28,"end_line":155,"end_character":38},"in_reply_to":"3fdd9532_0ff18cd5","updated":"2021-09-16 19:48:28.000000000","message":"Ack, QuotaError is fine as long as the things calling this are expecting that and not TooManyInstances (of course).","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f6431af483334e1efad9608333dfc45fe2153bc6","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        if max_count \u003c\u003d min_count:"},{"line_number":153,"context_line":"            # Copy the exception message to a QuotaError to propagate to the"},{"line_number":154,"context_line":"            # API layer"},{"line_number":155,"context_line":"            raise exception.QuotaError(message\u003dstr(e))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":158,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","}],"source_content_type":"text/x-python","patch_set":15,"id":"c3dd9547_c9db48c6","line":155,"range":{"start_line":155,"start_character":28,"end_line":155,"end_character":38},"in_reply_to":"bc169423_4937cf4f","updated":"2021-09-23 05:16:26.000000000","message":"Done","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5c88181d1b92974a1c603381d792f456635754e6","unresolved":true,"context_lines":[{"line_number":157,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":158,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","},{"line_number":159,"context_line":"                  max_count, max_count - 1)"},{"line_number":160,"context_line":"        return enforce_num_instances_and_flavor(context, project_id, flavor,"},{"line_number":161,"context_line":"                                                is_bfvm, min_count,"},{"line_number":162,"context_line":"                                                max_count - 1,"},{"line_number":163,"context_line":"                                                enforcer\u003denforcer)"}],"source_content_type":"text/x-python","patch_set":15,"id":"b0b254a5_0747775f","line":160,"updated":"2021-09-16 18:53:09.000000000","message":"If we can\u0027t fit any, we\u0027ll eventually raise ValueError here, right? I\u0027m not sure that\u0027s the right behavior (L143 and L145) so maybe those should also raise TooManyInstances?","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ce0875c6fb92449d0f73e1913b8f541d9d2db12b","unresolved":true,"context_lines":[{"line_number":157,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":158,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","},{"line_number":159,"context_line":"                  max_count, max_count - 1)"},{"line_number":160,"context_line":"        return enforce_num_instances_and_flavor(context, project_id, flavor,"},{"line_number":161,"context_line":"                                                is_bfvm, min_count,"},{"line_number":162,"context_line":"                                                max_count - 1,"},{"line_number":163,"context_line":"                                                enforcer\u003denforcer)"}],"source_content_type":"text/x-python","patch_set":15,"id":"74393213_6fd2b7ec","line":160,"in_reply_to":"452f3db5_280b5536","updated":"2021-09-16 19:48:28.000000000","message":"Ah, okay, that\u0027s maybe a little fragile, if we change one of those conditions and not the other so that the recursion can happen in that case. To make it more integrated, what if we remove the check on L152 and replace with with try..except ValueError around this call, and the raise with the same str(e) from the original OverLimit on L151? That way if someone tweaks the logic between L141-L145 we\u0027ll just catch whatever that new logic is here and raise the quota error.","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f6431af483334e1efad9608333dfc45fe2153bc6","unresolved":true,"context_lines":[{"line_number":157,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":158,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","},{"line_number":159,"context_line":"                  max_count, max_count - 1)"},{"line_number":160,"context_line":"        return enforce_num_instances_and_flavor(context, project_id, flavor,"},{"line_number":161,"context_line":"                                                is_bfvm, min_count,"},{"line_number":162,"context_line":"                                                max_count - 1,"},{"line_number":163,"context_line":"                                                enforcer\u003denforcer)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ad2ceab6_9e6c28b6","line":160,"in_reply_to":"74393213_6fd2b7ec","updated":"2021-09-23 05:16:26.000000000","message":"Makes sense, done.","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"52966064cfe07e0756f1d74340a6d8d095593ea0","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":158,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","},{"line_number":159,"context_line":"                  max_count, max_count - 1)"},{"line_number":160,"context_line":"        return enforce_num_instances_and_flavor(context, project_id, flavor,"},{"line_number":161,"context_line":"                                                is_bfvm, min_count,"},{"line_number":162,"context_line":"                                                max_count - 1,"},{"line_number":163,"context_line":"                                                enforcer\u003denforcer)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dc2da76b_d19ce269","line":160,"in_reply_to":"ad2ceab6_9e6c28b6","updated":"2022-02-09 06:46:04.000000000","message":"Done","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e22c2798f0ee1eaa39962635fb7d9699e2fe1db5","unresolved":true,"context_lines":[{"line_number":157,"context_line":"        # NOTE(johngarbutt) we can do better, but this is very simple"},{"line_number":158,"context_line":"        LOG.debug(\"Limit check failed with count %s retrying with count %s\","},{"line_number":159,"context_line":"                  max_count, max_count - 1)"},{"line_number":160,"context_line":"        return enforce_num_instances_and_flavor(context, project_id, flavor,"},{"line_number":161,"context_line":"                                                is_bfvm, min_count,"},{"line_number":162,"context_line":"                                                max_count - 1,"},{"line_number":163,"context_line":"                                                enforcer\u003denforcer)"}],"source_content_type":"text/x-python","patch_set":15,"id":"452f3db5_280b5536","line":160,"in_reply_to":"b0b254a5_0747775f","updated":"2021-09-16 19:30:07.000000000","message":"Hm, I think it doesn\u0027t because of the guard on L152 which will raise before min and max can become ValueErrors. This test appears to be demonstrating that case:\n\nhttps://review.opendev.org/c/openstack/nova/+/713301/15/nova/tests/unit/limit/test_placement.py#240","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3b57400f99e6360677b3b69ece471cf56b26e14b","unresolved":true,"context_lines":[{"line_number":85,"context_line":"    except exception.UsagesRetrievalFailed as e:"},{"line_number":86,"context_line":"        # If there was a failure to retrieve the usages from placement, copy"},{"line_number":87,"context_line":"        # the exception message to a QuotaError to propagate to the API layer"},{"line_number":88,"context_line":"        raise exception.QuotaError(message\u003dstr(e))"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    # Use legacy behavior VCPU \u003d VCPU + PCPU if configured."},{"line_number":91,"context_line":"    if CONF.workarounds.unified_limits_count_pcpu_as_vcpu:"}],"source_content_type":"text/x-python","patch_set":30,"id":"9fa662df_e4e31ad0","line":88,"updated":"2022-02-08 16:00:57.000000000","message":"QuotaError (before my refactor) actually means \"Over quota\", so wrapping a placement api failure in this seems a little wrong. We should probably report to the user that there was some error calculating quotas and _log_ this low-level error.","commit_id":"5aae8922db60bff5bb2f0d4397f95b8cf5ea6711"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"52966064cfe07e0756f1d74340a6d8d095593ea0","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    except exception.UsagesRetrievalFailed as e:"},{"line_number":86,"context_line":"        # If there was a failure to retrieve the usages from placement, copy"},{"line_number":87,"context_line":"        # the exception message to a QuotaError to propagate to the API layer"},{"line_number":88,"context_line":"        raise exception.QuotaError(message\u003dstr(e))"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    # Use legacy behavior VCPU \u003d VCPU + PCPU if configured."},{"line_number":91,"context_line":"    if CONF.workarounds.unified_limits_count_pcpu_as_vcpu:"}],"source_content_type":"text/x-python","patch_set":30,"id":"77aeecb2_74cdbe29","line":88,"in_reply_to":"9fa662df_e4e31ad0","updated":"2022-02-09 06:46:04.000000000","message":"Done","commit_id":"5aae8922db60bff5bb2f0d4397f95b8cf5ea6711"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"495ad5bde0ab12c1f09a517eb8c657d2b7e51f4b","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    # Use legacy behavior VCPU \u003d VCPU + PCPU if configured."},{"line_number":91,"context_line":"    if CONF.workarounds.unified_limits_count_pcpu_as_vcpu:"},{"line_number":92,"context_line":"        # If PCPU is in resource_classes, that means it was specified in the"},{"line_number":93,"context_line":"        # flavor explicitly. In that case, we expect it to have its own limit"},{"line_number":94,"context_line":"        # registered and we should not fold it into VCPU."},{"line_number":95,"context_line":"        if orc.PCPU in usages and orc.PCPU not in resource_classes:"},{"line_number":96,"context_line":"            usages[orc.VCPU] \u003d (usages.get(orc.VCPU, 0) +"},{"line_number":97,"context_line":"                                usages.get(orc.PCPU, 0))"}],"source_content_type":"text/x-python","patch_set":30,"id":"f1c6667e_da28d596","line":94,"range":{"start_line":92,"start_character":0,"end_line":94,"end_character":57},"updated":"2022-02-02 16:09:56.000000000","message":"I\u0027m wondering if we have to cover the case when the PCPU resource was not in the flavor explicitly but nova still allocated PCPU resource due to the pinning policy [1].\n\n// later\nProbably that case still covered by the VCPU quota by default.\n\n[1] https://github.com/openstack/nova/blob/c8940f9d60f1b0290ebea94fb6174efac9a1632e/nova/scheduler/utils.py#L377","commit_id":"5aae8922db60bff5bb2f0d4397f95b8cf5ea6711"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"495ad5bde0ab12c1f09a517eb8c657d2b7e51f4b","unresolved":true,"context_lines":[{"line_number":112,"context_line":"    if count \u003c 0:"},{"line_number":113,"context_line":"        raise ValueError(\"count\")"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    # NOTE(johngarbutt): this skips bfv and port resources"},{"line_number":116,"context_line":"    # but it still gives us better checks than before unified limits"},{"line_number":117,"context_line":"    # We need an instance in the DB to use the current is_bfv logic"},{"line_number":118,"context_line":"    # which doesn\u0027t work well for instances that don\u0027t yet have a uuid"}],"source_content_type":"text/x-python","patch_set":30,"id":"bcef2f23_63f3dd79","line":115,"range":{"start_line":115,"start_character":4,"end_line":115,"end_character":58},"updated":"2022-02-02 16:09:56.000000000","message":"nit: and cyborg resources","commit_id":"5aae8922db60bff5bb2f0d4397f95b8cf5ea6711"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"52966064cfe07e0756f1d74340a6d8d095593ea0","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    if count \u003c 0:"},{"line_number":113,"context_line":"        raise ValueError(\"count\")"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    # NOTE(johngarbutt): this skips bfv and port resources"},{"line_number":116,"context_line":"    # but it still gives us better checks than before unified limits"},{"line_number":117,"context_line":"    # We need an instance in the DB to use the current is_bfv logic"},{"line_number":118,"context_line":"    # which doesn\u0027t work well for instances that don\u0027t yet have a uuid"}],"source_content_type":"text/x-python","patch_set":30,"id":"a18000bf_35f57e17","line":115,"range":{"start_line":115,"start_character":4,"end_line":115,"end_character":58},"in_reply_to":"bcef2f23_63f3dd79","updated":"2022-02-09 06:46:04.000000000","message":"Done","commit_id":"5aae8922db60bff5bb2f0d4397f95b8cf5ea6711"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"844bd4daa9580786139987c5d0559919e208e220","unresolved":true,"context_lines":[{"line_number":43,"context_line":"def _get_usage(context, project_id, resource_names):"},{"line_number":44,"context_line":"    \"\"\"Called by oslo_limit\u0027s enforcer\"\"\""},{"line_number":45,"context_line":"    if not limit_utils.use_unified_limits():"},{"line_number":46,"context_line":"        raise NotImplementedError(\"unified limits is disabled\")"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    count_servers \u003d False"},{"line_number":49,"context_line":"    resource_classes \u003d []"}],"source_content_type":"text/x-python","patch_set":34,"id":"57d206ca_c43a8f3f","line":46,"range":{"start_line":46,"start_character":35,"end_line":46,"end_character":61},"updated":"2022-02-17 15:11:08.000000000","message":"micronit : \"Unified limits support is disabled\".","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5989d34cb5b7fe3fd21e2b383d778fdda8e938f8","unresolved":true,"context_lines":[{"line_number":77,"context_line":"            LOG.error(\u0027Must migrate all instance mappings before using \u0027"},{"line_number":78,"context_line":"                      \u0027unified limits\u0027)"},{"line_number":79,"context_line":"            raise ValueError(\"must first migrate instance mappings\")"},{"line_number":80,"context_line":"        mappings \u003d objects.InstanceMappingList.get_counts(context, project_id)"},{"line_number":81,"context_line":"        resource_counts[\u0027servers\u0027] \u003d mappings[\u0027project\u0027][\u0027instances\u0027]"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":34,"id":"7c713760_8541a0cc","line":80,"updated":"2022-02-17 16:22:49.000000000","message":"Later: we discussed this on IRC and it\u0027s documented already that there will be a few differences : https://docs.openstack.org/nova/latest/admin/quotas.html#quota-usage-from-placement","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"844bd4daa9580786139987c5d0559919e208e220","unresolved":true,"context_lines":[{"line_number":77,"context_line":"            LOG.error(\u0027Must migrate all instance mappings before using \u0027"},{"line_number":78,"context_line":"                      \u0027unified limits\u0027)"},{"line_number":79,"context_line":"            raise ValueError(\"must first migrate instance mappings\")"},{"line_number":80,"context_line":"        mappings \u003d objects.InstanceMappingList.get_counts(context, project_id)"},{"line_number":81,"context_line":"        resource_counts[\u0027servers\u0027] \u003d mappings[\u0027project\u0027][\u0027instances\u0027]"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":34,"id":"c0ff0a91_338355ea","line":80,"updated":"2022-02-17 15:11:08.000000000","message":"when we shelve-offload an instance, we still have the instance mapping, right?\nIf so, should we count it ?","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9aa0ae953adbe68d2724f6b073aeea5bd01d9c67","unresolved":true,"context_lines":[{"line_number":77,"context_line":"            LOG.error(\u0027Must migrate all instance mappings before using \u0027"},{"line_number":78,"context_line":"                      \u0027unified limits\u0027)"},{"line_number":79,"context_line":"            raise ValueError(\"must first migrate instance mappings\")"},{"line_number":80,"context_line":"        mappings \u003d objects.InstanceMappingList.get_counts(context, project_id)"},{"line_number":81,"context_line":"        resource_counts[\u0027servers\u0027] \u003d mappings[\u0027project\u0027][\u0027instances\u0027]"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":34,"id":"e162f01d_30eead9c","line":80,"in_reply_to":"c0ff0a91_338355ea","updated":"2022-02-24 22:07:13.000000000","message":"Correct, we still have instance mapping. It could be debated whether or not to count it but counting it keeps the existing (legacy) behavior. In the future when we are counting instances from placement, the behavior will change to not count shelved offloaded instances against user\u0027s quota.","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"}],"nova/quota.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"844bd4daa9580786139987c5d0559919e208e220","unresolved":true,"context_lines":[{"line_number":1223,"context_line":"    return {\u0027user\u0027: {\u0027server_group_members\u0027: count}}"},{"line_number":1224,"context_line":""},{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"def is_qfd_populated(context):"},{"line_number":1227,"context_line":"    global UID_QFD_POPULATED_CACHE_ALL"},{"line_number":1228,"context_line":"    if not UID_QFD_POPULATED_CACHE_ALL:"},{"line_number":1229,"context_line":"        LOG.debug(\u0027Checking whether user_id and queued_for_delete are \u0027"}],"source_content_type":"text/x-python","patch_set":34,"id":"c8b8a94b_72859b77","line":1226,"range":{"start_line":1226,"start_character":4,"end_line":1226,"end_character":20},"updated":"2022-02-17 15:11:08.000000000","message":"nit: well, sure the name is better but we need to understand the acronym so maybe a docstring could be nice.","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fb507b0f245beeb05ce440cd5e0bebc80d9e1baf","unresolved":true,"context_lines":[{"line_number":1223,"context_line":"    return {\u0027user\u0027: {\u0027server_group_members\u0027: count}}"},{"line_number":1224,"context_line":""},{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"def is_qfd_populated(context):"},{"line_number":1227,"context_line":"    global UID_QFD_POPULATED_CACHE_ALL"},{"line_number":1228,"context_line":"    if not UID_QFD_POPULATED_CACHE_ALL:"},{"line_number":1229,"context_line":"        LOG.debug(\u0027Checking whether user_id and queued_for_delete are \u0027"}],"source_content_type":"text/x-python","patch_set":34,"id":"a15c0e42_8851ffbf","line":1226,"range":{"start_line":1226,"start_character":4,"end_line":1226,"end_character":20},"in_reply_to":"c8b8a94b_72859b77","updated":"2022-02-25 00:29:42.000000000","message":"I have added a docstring in a follow up patch here:\n\nhttps://review.opendev.org/c/openstack/nova/+/830918","commit_id":"2468dc4591b6b0374ce682a97e5cbfe6b97e9185"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"af51d51de7445337b66b80bf1487b13993ac717c","unresolved":false,"context_lines":[{"line_number":2363,"context_line":"                 fails"},{"line_number":2364,"context_line":"        \"\"\""},{"line_number":2365,"context_line":"        def _get_core_usages(usages):"},{"line_number":2366,"context_line":"            \"\"\"For backward-compatible with existing behavior, the quota limit"},{"line_number":2367,"context_line":"            on flavor.vcpus. That included the shared and dedicated CPU. So"},{"line_number":2368,"context_line":"            we need to count both the orc.VCPU and orc.PCPU at here."},{"line_number":2369,"context_line":"            \"\"\""},{"line_number":2370,"context_line":"            vcpus \u003d usages[\u0027usages\u0027].get(orc.VCPU, 0)"},{"line_number":2371,"context_line":"            pcpus \u003d usages[\u0027usages\u0027].get(orc.PCPU, 0)"},{"line_number":2372,"context_line":"            return vcpus + pcpus"},{"line_number":2373,"context_line":""},{"line_number":2374,"context_line":"        total_counts \u003d {\u0027project\u0027: {}}"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_86fe3503","line":2371,"range":{"start_line":2366,"start_character":0,"end_line":2371,"end_character":53},"updated":"2020-03-17 10:17:00.000000000","message":"Need to make the fact this is no longer the case much clearer.","commit_id":"64c33376afa65441df5ea0fadee08cd113ff4d10"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"183d719f4bcfbb434c2d9133ba15292aa94bef56","unresolved":true,"context_lines":[{"line_number":2472,"context_line":"        The response from placement will not contain a resource class if"},{"line_number":2473,"context_line":"        there is no usage. i.e. if there is no usage, you get an empty dict."},{"line_number":2474,"context_line":""},{"line_number":2475,"context_line":"        Note resources are counted as placement sees them, as such note"},{"line_number":2476,"context_line":"        that VCPUs and PCPUs will be counted independently."},{"line_number":2477,"context_line":""},{"line_number":2478,"context_line":"        :param context: The request context"},{"line_number":2479,"context_line":"        :param project_id: The project_id to count across"}],"source_content_type":"text/x-python","patch_set":15,"id":"92d4b791_d01db391","line":2476,"range":{"start_line":2475,"start_character":8,"end_line":2476,"end_character":59},"updated":"2021-09-16 04:03:56.000000000","message":"As stephenfin noted in a review comment earlier on, this will be a change in behavior from the current quota system. Currently, \"cores\" quota adds VCPU + PCPU when considering usage, see L2515.\n\nIf anyone thinks this would be a problem, please add a comment.","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ce0875c6fb92449d0f73e1913b8f541d9d2db12b","unresolved":true,"context_lines":[{"line_number":2472,"context_line":"        The response from placement will not contain a resource class if"},{"line_number":2473,"context_line":"        there is no usage. i.e. if there is no usage, you get an empty dict."},{"line_number":2474,"context_line":""},{"line_number":2475,"context_line":"        Note resources are counted as placement sees them, as such note"},{"line_number":2476,"context_line":"        that VCPUs and PCPUs will be counted independently."},{"line_number":2477,"context_line":""},{"line_number":2478,"context_line":"        :param context: The request context"},{"line_number":2479,"context_line":"        :param project_id: The project_id to count across"}],"source_content_type":"text/x-python","patch_set":15,"id":"c1b179f6_e847d339","line":2476,"range":{"start_line":2475,"start_character":8,"end_line":2476,"end_character":59},"in_reply_to":"4c5d4283_3c6cd802","updated":"2021-09-16 19:48:28.000000000","message":"Yeah, I think I\u0027d rather the reno say \"you might want to turn on this workaround if upgrading\" instead of \"you might want to do math, and then do different math again later\".","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8875b81c5e25d5674b5971201c1b2e43f21edae6","unresolved":true,"context_lines":[{"line_number":2472,"context_line":"        The response from placement will not contain a resource class if"},{"line_number":2473,"context_line":"        there is no usage. i.e. if there is no usage, you get an empty dict."},{"line_number":2474,"context_line":""},{"line_number":2475,"context_line":"        Note resources are counted as placement sees them, as such note"},{"line_number":2476,"context_line":"        that VCPUs and PCPUs will be counted independently."},{"line_number":2477,"context_line":""},{"line_number":2478,"context_line":"        :param context: The request context"},{"line_number":2479,"context_line":"        :param project_id: The project_id to count across"}],"source_content_type":"text/x-python","patch_set":15,"id":"b6f9254c_64933987","line":2476,"range":{"start_line":2475,"start_character":8,"end_line":2476,"end_character":59},"in_reply_to":"92d4b791_d01db391","updated":"2021-09-16 13:47:22.000000000","message":"Hmm, that sounds like a problem for anyone that runs hot. I guess we really can\u0027t fix it for the old method, but maybe we should add a workaround flag to opt into summing them for keystone-based quotas until they can sort their usage? I guess we could also tell people to halve that quota when they create it in keystone, but for some reason that seems like it might be worse as it could change the dynamics a lot if there are some users on a system that don\u0027t use any PCPUs.","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e22c2798f0ee1eaa39962635fb7d9699e2fe1db5","unresolved":true,"context_lines":[{"line_number":2472,"context_line":"        The response from placement will not contain a resource class if"},{"line_number":2473,"context_line":"        there is no usage. i.e. if there is no usage, you get an empty dict."},{"line_number":2474,"context_line":""},{"line_number":2475,"context_line":"        Note resources are counted as placement sees them, as such note"},{"line_number":2476,"context_line":"        that VCPUs and PCPUs will be counted independently."},{"line_number":2477,"context_line":""},{"line_number":2478,"context_line":"        :param context: The request context"},{"line_number":2479,"context_line":"        :param project_id: The project_id to count across"}],"source_content_type":"text/x-python","patch_set":15,"id":"4c5d4283_3c6cd802","line":2476,"range":{"start_line":2475,"start_character":8,"end_line":2476,"end_character":59},"in_reply_to":"b6f9254c_64933987","updated":"2021-09-16 19:30:07.000000000","message":"Workaround flag sounds like a nice way to handle this. Adding VCPU + PCPU by default would feel odd in the new scheme considering that placement tracks VCPU and PCPU separately, you can set quotas class:VCPU and class:PCPU separately, and you can also make flavors with separate resources:VCPU and resources:PCPU. So having to opt-in via [workarounds] makes sense.\n\nYeah, halving quota would also be an option. As you point out, the reno would have to say something like, \"if you use PCPU in your deployment, you will want to halve your class:VCPU and class:PCPU quota limits\".","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"f6431af483334e1efad9608333dfc45fe2153bc6","unresolved":true,"context_lines":[{"line_number":2472,"context_line":"        The response from placement will not contain a resource class if"},{"line_number":2473,"context_line":"        there is no usage. i.e. if there is no usage, you get an empty dict."},{"line_number":2474,"context_line":""},{"line_number":2475,"context_line":"        Note resources are counted as placement sees them, as such note"},{"line_number":2476,"context_line":"        that VCPUs and PCPUs will be counted independently."},{"line_number":2477,"context_line":""},{"line_number":2478,"context_line":"        :param context: The request context"},{"line_number":2479,"context_line":"        :param project_id: The project_id to count across"}],"source_content_type":"text/x-python","patch_set":15,"id":"f7bbe03e_7637d2b1","line":2476,"range":{"start_line":2475,"start_character":8,"end_line":2476,"end_character":59},"in_reply_to":"c1b179f6_e847d339","updated":"2021-09-23 05:16:26.000000000","message":"I\u0027ve added the workarounds option and added it to the reno at the end of this set.\n\nNote that I have initially not merged VCPU + PCPU if PCPU has been explicitly specified in the flavor. My thinking is that if it\u0027s in the flavor as \"PCPU\" then it is the expectation of the operator for it to have its own limit registered and usage be counted separately despite the config option being set to True.\n\nThis ^ might be me lacking understanding of how PCPU is used, though. If it is/was expected to be present in the flavor but only the quota limit for VCPU be used, then I need to merge it no matter what when the workaround is True. Let me know if I should change it.","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"183d719f4bcfbb434c2d9133ba15292aa94bef56","unresolved":true,"context_lines":[{"line_number":2512,"context_line":"            \"\"\""},{"line_number":2513,"context_line":"            vcpus \u003d usages[\u0027usages\u0027].get(orc.VCPU, 0)"},{"line_number":2514,"context_line":"            pcpus \u003d usages[\u0027usages\u0027].get(orc.PCPU, 0)"},{"line_number":2515,"context_line":"            return vcpus + pcpus"},{"line_number":2516,"context_line":""},{"line_number":2517,"context_line":"        total_counts: ty.Dict[str, ty.Dict[str, int]] \u003d {\u0027project\u0027: {}}"},{"line_number":2518,"context_line":"        # First query counts across all users of a project"}],"source_content_type":"text/x-python","patch_set":15,"id":"ca9182f5_26dd43de","line":2515,"updated":"2021-09-16 04:03:56.000000000","message":"Here is where VCPU + PCPU happens.","commit_id":"02eb4375d242800a4bb18060d49130e32818e090"}],"nova/scheduler/utils.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a69ab10d60731e1f45a8a5db4a36a114d0736782","unresolved":false,"context_lines":[{"line_number":564,"context_line":"    # TODO(Johngarbutt): we should be boot from volume aware to correctly"},{"line_number":565,"context_line":"    #  make use of the disk limits in the boot from volume case."},{"line_number":566,"context_line":"    #  For now we assume its not boot from volume to keep the same behaviour."},{"line_number":567,"context_line":"    req_spec \u003d objects.RequestSpec(flavor\u003dflavor, is_bfv\u003dFalse)"},{"line_number":568,"context_line":"    res_req \u003d ResourceRequest(req_spec)"},{"line_number":569,"context_line":"    return res_req.merged_resources()"},{"line_number":570,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_d2d948f4","line":567,"range":{"start_line":567,"start_character":50,"end_line":567,"end_character":63},"updated":"2020-03-17 10:05:36.000000000","message":"I should fix this stupidity. Historically we didn\u0027t have any disk quota, but this is just silly really.\n\nGiven instance.resources exists now, we might want to just pass resources in rather than the flavor to the quota check.","commit_id":"64c33376afa65441df5ea0fadee08cd113ff4d10"}],"nova/tests/unit/limit/test_keystone.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c94f8ee78e078d3c3874cfd847b4682bdcd626d8","unresolved":true,"context_lines":[{"line_number":79,"context_line":"        e \u003d self.assertRaises(NotImplementedError, keystone_limits._get_usage,"},{"line_number":80,"context_line":"                              self.context, uuids.project, [])"},{"line_number":81,"context_line":"        self.assertEqual(\"unified limits is disabled\", str(e))"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"class TestGetDeltas(test.NoDBTestCase):"},{"line_number":85,"context_line":"    def test_get_deltas(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"4e629935_f64e1bf4","line":82,"updated":"2021-05-11 19:22:48.000000000","message":"Need a test for failure to contact placement?","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"da8a73e909aa0a75b60b2af8f9c6a6616e8becc2","unresolved":true,"context_lines":[{"line_number":79,"context_line":"        e \u003d self.assertRaises(NotImplementedError, keystone_limits._get_usage,"},{"line_number":80,"context_line":"                              self.context, uuids.project, [])"},{"line_number":81,"context_line":"        self.assertEqual(\"unified limits is disabled\", str(e))"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"class TestGetDeltas(test.NoDBTestCase):"},{"line_number":85,"context_line":"    def test_get_deltas(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"f1ba79f1_0ffd583d","line":82,"in_reply_to":"4e629935_f64e1bf4","updated":"2021-06-07 15:25:41.000000000","message":"yes, I hadn\u0027t thought about that case.","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c94f8ee78e078d3c3874cfd847b4682bdcd626d8","unresolved":true,"context_lines":[{"line_number":211,"context_line":"                              keystone_limits.enforce_num_instances,"},{"line_number":212,"context_line":"                              self.context, uuids.project_id, self.flavor,"},{"line_number":213,"context_line":"                              True, 2, 4)"},{"line_number":214,"context_line":"        self.assertEqual(\"Quota exceeded for cores, instances: \""},{"line_number":215,"context_line":"                         \"Requested 20, 2, but already used 0, 1 of \""},{"line_number":216,"context_line":"                         \"12, 2 cores, instances\", str(e))"},{"line_number":217,"context_line":"        self.assertEqual(3, mock_enforcer.enforce.call_count)"}],"source_content_type":"text/x-python","patch_set":7,"id":"45a0caca_215d4854","line":216,"range":{"start_line":214,"start_character":26,"end_line":216,"end_character":48},"updated":"2021-05-11 19:22:48.000000000","message":"I could be wrong, but this is a bit hard to parse for me, and presumably that\u0027s what you\u0027re expecting to have prepared for the user.","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"da8a73e909aa0a75b60b2af8f9c6a6616e8becc2","unresolved":true,"context_lines":[{"line_number":211,"context_line":"                              keystone_limits.enforce_num_instances,"},{"line_number":212,"context_line":"                              self.context, uuids.project_id, self.flavor,"},{"line_number":213,"context_line":"                              True, 2, 4)"},{"line_number":214,"context_line":"        self.assertEqual(\"Quota exceeded for cores, instances: \""},{"line_number":215,"context_line":"                         \"Requested 20, 2, but already used 0, 1 of \""},{"line_number":216,"context_line":"                         \"12, 2 cores, instances\", str(e))"},{"line_number":217,"context_line":"        self.assertEqual(3, mock_enforcer.enforce.call_count)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ebb906b0_0d52a639","line":216,"range":{"start_line":214,"start_character":26,"end_line":216,"end_character":48},"in_reply_to":"45a0caca_215d4854","updated":"2021-06-07 15:25:41.000000000","message":"I am purely trying to respect the old format here. Agreed it seems like total nonsense.","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c94f8ee78e078d3c3874cfd847b4682bdcd626d8","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":7,"id":"32dbc8ae_786da3c6","line":218,"updated":"2021-05-11 19:22:48.000000000","message":"Need a test for how Enforcer handles your failed-call-to-placement exception case?","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"da8a73e909aa0a75b60b2af8f9c6a6616e8becc2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":7,"id":"ae7ae0cf_b3110558","line":218,"in_reply_to":"32dbc8ae_786da3c6","updated":"2021-06-07 15:25:41.000000000","message":"+1, I didn\u0027t see that failure mode (facepalm).","commit_id":"206d077e576098c3ea58571b2014927342dfb86e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c44aaa72bb0763203724c8cadc58cfb0acae7497","unresolved":true,"context_lines":[{"line_number":238,"context_line":"        self.assertEqual(3, mock_enforcer.enforce.call_count)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    @mock.patch(\u0027oslo_limit.limit.Enforcer\u0027)"},{"line_number":241,"context_line":"    def test_enforce_num_instances_and_flavor_placement_fail(self, mock_limit):"},{"line_number":242,"context_line":"        mock_enforcer \u003d mock.MagicMock()"},{"line_number":243,"context_line":"        mock_limit.return_value \u003d mock_enforcer"},{"line_number":244,"context_line":"        mock_enforcer.enforce.side_effect \u003d exception.QuotaError("}],"source_content_type":"text/x-python","patch_set":10,"id":"5b9878a9_844cd114","line":241,"updated":"2021-08-11 06:24:04.000000000","message":"Note to self: not totally sure this test adds value.","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e5cd437abc9979df8feab4a3424531d3dcfcb49c","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        self.assertEqual(3, mock_enforcer.enforce.call_count)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    @mock.patch(\u0027oslo_limit.limit.Enforcer\u0027)"},{"line_number":241,"context_line":"    def test_enforce_num_instances_and_flavor_placement_fail(self, mock_limit):"},{"line_number":242,"context_line":"        mock_enforcer \u003d mock.MagicMock()"},{"line_number":243,"context_line":"        mock_limit.return_value \u003d mock_enforcer"},{"line_number":244,"context_line":"        mock_enforcer.enforce.side_effect \u003d exception.QuotaError("}],"source_content_type":"text/x-python","patch_set":10,"id":"4badb844_95595994","line":241,"in_reply_to":"5b9878a9_844cd114","updated":"2022-02-11 03:12:46.000000000","message":"Ack","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"}],"requirements.txt":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ca397597a2b79d974e6d910114420506b4225204","unresolved":true,"context_lines":[{"line_number":71,"context_line":"openstacksdk\u003e\u003d0.35.0 # Apache-2.0"},{"line_number":72,"context_line":"dataclasses\u003e\u003d0.7;python_version\u003d\u003d\u00273.6\u0027  # Apache 2.0 License"},{"line_number":73,"context_line":"PyYAML\u003e\u003d5.1 # MIT"},{"line_number":74,"context_line":"oslo.limit\u003e\u003d1.4.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":10,"id":"fd88f3eb_70f18677","line":74,"updated":"2021-08-17 14:49:46.000000000","message":"need a bump when the depends-on patch lands and released","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e5cd437abc9979df8feab4a3424531d3dcfcb49c","unresolved":false,"context_lines":[{"line_number":71,"context_line":"openstacksdk\u003e\u003d0.35.0 # Apache-2.0"},{"line_number":72,"context_line":"dataclasses\u003e\u003d0.7;python_version\u003d\u003d\u00273.6\u0027  # Apache 2.0 License"},{"line_number":73,"context_line":"PyYAML\u003e\u003d5.1 # MIT"},{"line_number":74,"context_line":"oslo.limit\u003e\u003d1.4.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":10,"id":"157a3eca_79a6f3f7","line":74,"in_reply_to":"fd88f3eb_70f18677","updated":"2022-02-11 03:12:46.000000000","message":"Done","commit_id":"2cefcb39e980b7455b504156f362751248b192a4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"328251c7298d2058aac1bf05625bcc18346162f2","unresolved":true,"context_lines":[{"line_number":69,"context_line":"openstacksdk\u003e\u003d0.35.0 # Apache-2.0"},{"line_number":70,"context_line":"dataclasses\u003e\u003d0.7;python_version\u003d\u003d\u00273.6\u0027  # Apache 2.0 License"},{"line_number":71,"context_line":"PyYAML\u003e\u003d5.1 # MIT"},{"line_number":72,"context_line":"oslo.limit\u003e\u003d1.4.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":12,"id":"3377f818_dd8b66e1","line":72,"updated":"2021-08-29 15:58:29.000000000","message":"Need to remove.","commit_id":"0b983e35644f717480e9ec59c34c9c8f572adf71"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e5cd437abc9979df8feab4a3424531d3dcfcb49c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"openstacksdk\u003e\u003d0.35.0 # Apache-2.0"},{"line_number":70,"context_line":"dataclasses\u003e\u003d0.7;python_version\u003d\u003d\u00273.6\u0027  # Apache 2.0 License"},{"line_number":71,"context_line":"PyYAML\u003e\u003d5.1 # MIT"},{"line_number":72,"context_line":"oslo.limit\u003e\u003d1.4.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":12,"id":"0e8a6ac6_09c97e2e","line":72,"in_reply_to":"3377f818_dd8b66e1","updated":"2022-02-11 03:12:46.000000000","message":"Done","commit_id":"0b983e35644f717480e9ec59c34c9c8f572adf71"}]}
