)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"6ff150c83663a6b695bf882aaf3e8d5c887050b9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b346a219_ad5c6de6","updated":"2026-01-23 16:03:18.000000000","message":"Is this not handled by the flavor plugin in `update_reservation`? https://opendev.org/openstack/blazar/src/branch/master/blazar/plugins/flavor/flavor_plugin.py#L414-L416\n\nI think the manager service should be resource type agnostic, and shouldn\u0027t do anything different per resource type.","commit_id":"3f0427b12cd907c2b45c388f3dc597cbc61a486b"},{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"0dc062d460c4c33489565f7bca8fdab326913832","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1533f142_256c6f4c","in_reply_to":"b346a219_ad5c6de6","updated":"2026-01-26 15:15:23.000000000","message":"The issue is that it fails before ever calling update_reservation:\n\n```\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/blazar/blazar/manager/service.py\", line 563, in update_lease\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server     new_allocs \u003d self._allocation_candidates(values,\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/blazar/blazar/manager/service.py\", line 810, in _allocation_candidates\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server     candidate_ids \u003d plugin.allocation_candidates(res)\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/blazar/blazar/plugins/flavor/flavor_plugin.py\", line 67, in allocation_candidates\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server     host_ids, _ \u003d self._pick_hosts(reservation)\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server   File \"/opt/stack/blazar/blazar/plugins/flavor/flavor_plugin.py\", line 87, in _pick_hosts\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server     raise mgr_exceptions.NotEnoughHostsAvailable()\nJan 26 15:05:58 mattc-blazar blazar-manager[1601645]: ERROR oslo_messaging.rpc.server blazar.manager.exceptions.NotEnoughHostsAvailable: Not enough hosts available\n```\n\nThis means all a user sees is `ERROR: Not enough hosts available`, which isn\u0027t helpful. I suppose to keep the manager agnostic, we could handle this in _pick_hosts instead. I\u0027ll have a think on it.","commit_id":"3f0427b12cd907c2b45c388f3dc597cbc61a486b"}],"blazar/manager/service.py":[{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"4ae1835ef95e9a76846caee86411ce350adaf970","unresolved":true,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        lease \u003d db_api.lease_get(lease_id)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        if lease[\u0027reservations\u0027][0][\u0027resource_type\u0027] \u003d\u003d \u0027flavor:instance\u0027:"},{"line_number":503,"context_line":"            raise exceptions.NotImplemented("},{"line_number":504,"context_line":"                error\u003d\"Updating leases for \u0027flavor:instance\u0027 type \""},{"line_number":505,"context_line":"                      \"reservations is not yet supported.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"57447355_1e342f98","line":502,"updated":"2026-02-19 15:13:46.000000000","message":"Is it always the case there is is at least one reservation? I think it may be possible to make a lease without any reservations, though not a very useful one.","commit_id":"3f0427b12cd907c2b45c388f3dc597cbc61a486b"},{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"7effd03abd759835d20f41e8e0b483297acdc7c0","unresolved":true,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        lease \u003d db_api.lease_get(lease_id)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        if lease[\u0027reservations\u0027][0][\u0027resource_type\u0027] \u003d\u003d \u0027flavor:instance\u0027:"},{"line_number":503,"context_line":"            raise exceptions.NotImplemented("},{"line_number":504,"context_line":"                error\u003d\"Updating leases for \u0027flavor:instance\u0027 type \""},{"line_number":505,"context_line":"                      \"reservations is not yet supported.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"b31ca69b_ab4a6269","line":502,"in_reply_to":"57447355_1e342f98","updated":"2026-02-19 15:40:01.000000000","message":"I will add a check just in case","commit_id":"3f0427b12cd907c2b45c388f3dc597cbc61a486b"},{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"42ea19c22b25234430159e4c3e927d52934d7851","unresolved":false,"context_lines":[{"line_number":499,"context_line":""},{"line_number":500,"context_line":"        lease \u003d db_api.lease_get(lease_id)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        if lease[\u0027reservations\u0027][0][\u0027resource_type\u0027] \u003d\u003d \u0027flavor:instance\u0027:"},{"line_number":503,"context_line":"            raise exceptions.NotImplemented("},{"line_number":504,"context_line":"                error\u003d\"Updating leases for \u0027flavor:instance\u0027 type \""},{"line_number":505,"context_line":"                      \"reservations is not yet supported.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"2114a8e3_f8e58fea","line":502,"in_reply_to":"b31ca69b_ab4a6269","updated":"2026-02-25 14:20:08.000000000","message":"Done. I needed to move it to a separate function to keep tox happy.","commit_id":"3f0427b12cd907c2b45c388f3dc597cbc61a486b"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"df9794781a29f3c497fc9cbe242f92d29f952a33","unresolved":true,"context_lines":[{"line_number":473,"context_line":"        return reservations"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"    def _handle_resource_type_exception(self, lease):"},{"line_number":476,"context_line":"        if len(lease[\u0027reservations\u0027]) \u003c\u003d 0:"},{"line_number":477,"context_line":"            return"},{"line_number":478,"context_line":"        if lease[\u0027reservations\u0027][0][\u0027resource_type\u0027] \u003d\u003d \u0027flavor:instance\u0027:"},{"line_number":479,"context_line":"            raise exceptions.NotImplemented("},{"line_number":480,"context_line":"                error\u003d\"Updating leases for \u0027flavor:instance\u0027 type \""}],"source_content_type":"text/x-python","patch_set":2,"id":"91cd6abf_39cb7e6f","line":477,"range":{"start_line":476,"start_character":0,"end_line":477,"end_character":18},"updated":"2026-03-05 15:11:18.000000000","message":"I don\u0027t think len() can return a negative value, so we could change to \u003d\u003d 0.","commit_id":"2b5b71b2a8c0d977b2fec7884a02ea5ac64098d1"},{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"fc953f3e2ce033c913b39c277f9cef8635937730","unresolved":false,"context_lines":[{"line_number":473,"context_line":"        return reservations"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"    def _handle_resource_type_exception(self, lease):"},{"line_number":476,"context_line":"        if len(lease[\u0027reservations\u0027]) \u003c\u003d 0:"},{"line_number":477,"context_line":"            return"},{"line_number":478,"context_line":"        if lease[\u0027reservations\u0027][0][\u0027resource_type\u0027] \u003d\u003d \u0027flavor:instance\u0027:"},{"line_number":479,"context_line":"            raise exceptions.NotImplemented("},{"line_number":480,"context_line":"                error\u003d\"Updating leases for \u0027flavor:instance\u0027 type \""}],"source_content_type":"text/x-python","patch_set":2,"id":"7e1a06fe_9c10c681","line":477,"range":{"start_line":476,"start_character":0,"end_line":477,"end_character":18},"in_reply_to":"91cd6abf_39cb7e6f","updated":"2026-03-05 15:37:17.000000000","message":"Done","commit_id":"2b5b71b2a8c0d977b2fec7884a02ea5ac64098d1"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"010ee897efb53887567eadfb5a295f451ceb8617","unresolved":true,"context_lines":[{"line_number":475,"context_line":"    def _handle_resource_type_exception(self, lease):"},{"line_number":476,"context_line":"        if len(lease[\u0027reservations\u0027]) \u003c\u003d 0:"},{"line_number":477,"context_line":"            return"},{"line_number":478,"context_line":"        if lease[\u0027reservations\u0027][0][\u0027resource_type\u0027] \u003d\u003d \u0027flavor:instance\u0027:"},{"line_number":479,"context_line":"            raise exceptions.NotImplemented("},{"line_number":480,"context_line":"                error\u003d\"Updating leases for \u0027flavor:instance\u0027 type \""},{"line_number":481,"context_line":"                      \"reservations is not yet supported.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"266acc4b_741ddfce","line":478,"updated":"2026-03-05 15:10:48.000000000","message":"This should iterate over all reservations any flavor:instance.","commit_id":"2b5b71b2a8c0d977b2fec7884a02ea5ac64098d1"},{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"fc953f3e2ce033c913b39c277f9cef8635937730","unresolved":false,"context_lines":[{"line_number":475,"context_line":"    def _handle_resource_type_exception(self, lease):"},{"line_number":476,"context_line":"        if len(lease[\u0027reservations\u0027]) \u003c\u003d 0:"},{"line_number":477,"context_line":"            return"},{"line_number":478,"context_line":"        if lease[\u0027reservations\u0027][0][\u0027resource_type\u0027] \u003d\u003d \u0027flavor:instance\u0027:"},{"line_number":479,"context_line":"            raise exceptions.NotImplemented("},{"line_number":480,"context_line":"                error\u003d\"Updating leases for \u0027flavor:instance\u0027 type \""},{"line_number":481,"context_line":"                      \"reservations is not yet supported.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"bce6a782_51f7c761","line":478,"in_reply_to":"266acc4b_741ddfce","updated":"2026-03-05 15:37:17.000000000","message":"Done","commit_id":"2b5b71b2a8c0d977b2fec7884a02ea5ac64098d1"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"466ff1573e5bcacd1d613407ebe6bd526f796f1d","unresolved":true,"context_lines":[{"line_number":473,"context_line":"        return reservations"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"    def _handle_resource_type_exception(self, lease):"},{"line_number":476,"context_line":"        if len(lease[\u0027reservations\u0027]) \u003d\u003d 0:"},{"line_number":477,"context_line":"            return"},{"line_number":478,"context_line":"        for reservation in lease[\u0027reservations\u0027]:"},{"line_number":479,"context_line":"            if reservation[\u0027resource_type\u0027] \u003d\u003d \u0027flavor:instance\u0027:"},{"line_number":480,"context_line":"                raise exceptions.NotImplemented("}],"source_content_type":"text/x-python","patch_set":3,"id":"3ce9ff98_894fafa5","line":477,"range":{"start_line":476,"start_character":0,"end_line":477,"end_character":18},"updated":"2026-03-05 15:45:44.000000000","message":"Actually this is not necessary now that you iterate on reservations.","commit_id":"a0f18bfc843669914822f5eddda2fb33ec962c2a"},{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"d75440df85357d0c479ccc954eecbbadc66a04d0","unresolved":false,"context_lines":[{"line_number":473,"context_line":"        return reservations"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"    def _handle_resource_type_exception(self, lease):"},{"line_number":476,"context_line":"        if len(lease[\u0027reservations\u0027]) \u003d\u003d 0:"},{"line_number":477,"context_line":"            return"},{"line_number":478,"context_line":"        for reservation in lease[\u0027reservations\u0027]:"},{"line_number":479,"context_line":"            if reservation[\u0027resource_type\u0027] \u003d\u003d \u0027flavor:instance\u0027:"},{"line_number":480,"context_line":"                raise exceptions.NotImplemented("}],"source_content_type":"text/x-python","patch_set":3,"id":"e09828ce_64e114f2","line":477,"range":{"start_line":476,"start_character":0,"end_line":477,"end_character":18},"in_reply_to":"3ce9ff98_894fafa5","updated":"2026-03-05 15:58:29.000000000","message":"Done","commit_id":"a0f18bfc843669914822f5eddda2fb33ec962c2a"}]}
