)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"ac6cc07a33a2572ebf8e13e7d7ea9cbe1f8a2adc","unresolved":true,"context_lines":[{"line_number":10,"context_line":"details."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Note: this assumes nothing changes."},{"line_number":13,"context_line":"If it does you need to add a remove a host."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I1fa9b40823bac94550a0fc1b83a9f6818936cea4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"222911e3_6fb1799d","line":13,"updated":"2024-07-31 09:52:43.000000000","message":"Do you mean \"you need to remove and add the host again\"?","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"910f1f9fed9d805ddde11c9a7335536396627d8e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"details."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Note: this assumes nothing changes."},{"line_number":13,"context_line":"If it does you need to add a remove a host."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I1fa9b40823bac94550a0fc1b83a9f6818936cea4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"0c03182d_d2288c6f","line":13,"in_reply_to":"222911e3_6fb1799d","updated":"2024-08-06 10:36:44.000000000","message":"Done","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"aa58cf9e3c82c1df799d48787f689932608c87a2","unresolved":false,"context_lines":[{"line_number":10,"context_line":"details."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Note: this assumes nothing changes."},{"line_number":13,"context_line":"If it does you need to add a remove a host."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I1fa9b40823bac94550a0fc1b83a9f6818936cea4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1725e223_81e405b4","line":13,"in_reply_to":"222911e3_6fb1799d","updated":"2024-08-06 10:36:38.000000000","message":"Done","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"3104a1db7897d098ec746b127ff46ca2bfde3db4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"c48d1910_88438fde","updated":"2024-06-28 15:13:33.000000000","message":"Voting +1 for now as I\u0027ve tested this patch does work, but I\u0027ve got some comments and nitpicks.","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"e41f2a334b725ea667da976052afb4d675d338c5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"9db419d8_c929f7f4","updated":"2024-08-28 15:16:36.000000000","message":"recheck\n\nurllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host\u003d\u0027127.0.0.1\u0027, port\u003d80): Read timed out. (read timeout\u003d30)","commit_id":"8d439d84449cdfc4b3fb34f6e964fa2383eafde9"}],"blazar/plugins/oshosts/host_plugin.py":[{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"3104a1db7897d098ec746b127ff46ca2bfde3db4","unresolved":true,"context_lines":[{"line_number":408,"context_line":"            inventories \u003d self.placement_client.get_inventory(rp[\u0027uuid\u0027])"},{"line_number":409,"context_line":"            for rc, inventory in inventories[\u0027inventories\u0027].items():"},{"line_number":410,"context_line":"                reserved \u003d int(inventory[\u0027reserved\u0027])"},{"line_number":411,"context_line":"                # Hack for when ironic nodes are not currently available"},{"line_number":412,"context_line":"                if reserved \u003d\u003d 1:"},{"line_number":413,"context_line":"                    reserved \u003d 0"},{"line_number":414,"context_line":"                cr \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"46be9d92_417297c2","line":411,"updated":"2024-06-28 15:13:33.000000000","message":"Might be thinking too much into this, but could there be an issue here if a non-ironic node has also reserved 100% of the resource for it\u0027s own use? It would then get put into the db as fully available, when it\u0027s actually not at all. \n\nI\u0027d prefer a more concrete check for the node being ironic-managed, if that exists. If not, I suppose this \"hack\" is fine as it would be a bit daft to have a hypervisor enrolled with 100% reserved anyway.","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"71b35d51ac1f7ea84315e8c36642c56df438d402","unresolved":false,"context_lines":[{"line_number":408,"context_line":"            inventories \u003d self.placement_client.get_inventory(rp[\u0027uuid\u0027])"},{"line_number":409,"context_line":"            for rc, inventory in inventories[\u0027inventories\u0027].items():"},{"line_number":410,"context_line":"                reserved \u003d int(inventory[\u0027reserved\u0027])"},{"line_number":411,"context_line":"                # Hack for when ironic nodes are not currently available"},{"line_number":412,"context_line":"                if reserved \u003d\u003d 1:"},{"line_number":413,"context_line":"                    reserved \u003d 0"},{"line_number":414,"context_line":"                cr \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"61a2bd68_6bc07f8a","line":411,"in_reply_to":"2f3c688c_2a7eb508","updated":"2024-08-02 07:28:58.000000000","message":"Let\u0027s remove this workaround for now, since there are other checks that would fail when registering an Ironic node that is in use: earlier in the function we check that the node is not running any instances.","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"ac6cc07a33a2572ebf8e13e7d7ea9cbe1f8a2adc","unresolved":true,"context_lines":[{"line_number":408,"context_line":"            inventories \u003d self.placement_client.get_inventory(rp[\u0027uuid\u0027])"},{"line_number":409,"context_line":"            for rc, inventory in inventories[\u0027inventories\u0027].items():"},{"line_number":410,"context_line":"                reserved \u003d int(inventory[\u0027reserved\u0027])"},{"line_number":411,"context_line":"                # Hack for when ironic nodes are not currently available"},{"line_number":412,"context_line":"                if reserved \u003d\u003d 1:"},{"line_number":413,"context_line":"                    reserved \u003d 0"},{"line_number":414,"context_line":"                cr \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"2f3c688c_2a7eb508","line":411,"in_reply_to":"46be9d92_417297c2","updated":"2024-07-31 09:52:43.000000000","message":"The `reserved` field is not a percentage, but an integer amount of the unit of the resource.\n\nWhile it is unlikely someone would reserve 1 MB of memory for the hypervisor, reserving 1 GB of disk is possible (e.g. if using a dedicated partition for Nova instances) and reserving 1 VCPU is definitely valid.\n\nThere are ways to check for Ironic resources:\n\n- check that min_unit/max_unit/total is also equal to 1\n- check that resource class starts with CUSTOM_","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"},{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"3104a1db7897d098ec746b127ff46ca2bfde3db4","unresolved":true,"context_lines":[{"line_number":411,"context_line":"                # Hack for when ironic nodes are not currently available"},{"line_number":412,"context_line":"                if reserved \u003d\u003d 1:"},{"line_number":413,"context_line":"                    reserved \u003d 0"},{"line_number":414,"context_line":"                cr \u003d {"},{"line_number":415,"context_line":"                    \u0027computehost_id\u0027: host[\u0027id\u0027],"},{"line_number":416,"context_line":"                    \u0027resource_class\u0027: rc,"},{"line_number":417,"context_line":"                    \u0027allocation_ratio\u0027: inventory[\u0027allocation_ratio\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ffc42d0_4cfa418d","line":414,"range":{"start_line":414,"start_character":16,"end_line":414,"end_character":18},"updated":"2024-06-28 15:13:33.000000000","message":"nit: IMO ``cr``, ``rc`` and ``rp`` should be expanded into partial/full words. They\u0027re not \"standard\" abbreviations so it makes it harder to understand the code on first reading, particularly ``cr`` as custom_resource isn\u0027t mentioned by name in this file","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"11384d35750b8063f9c01f02673c9dc0737f0424","unresolved":false,"context_lines":[{"line_number":411,"context_line":"                # Hack for when ironic nodes are not currently available"},{"line_number":412,"context_line":"                if reserved \u003d\u003d 1:"},{"line_number":413,"context_line":"                    reserved \u003d 0"},{"line_number":414,"context_line":"                cr \u003d {"},{"line_number":415,"context_line":"                    \u0027computehost_id\u0027: host[\u0027id\u0027],"},{"line_number":416,"context_line":"                    \u0027resource_class\u0027: rc,"},{"line_number":417,"context_line":"                    \u0027allocation_ratio\u0027: inventory[\u0027allocation_ratio\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"1557d9b2_78d80954","line":414,"range":{"start_line":414,"start_character":16,"end_line":414,"end_character":18},"in_reply_to":"5ffc42d0_4cfa418d","updated":"2024-08-06 10:25:42.000000000","message":"I agree with `cr` not being a good name since it does not match the underlying DB API. I left `rc` and `rp` since they are defined from clearly named functions, to avoid breaking lines further.","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"}],"blazar/utils/openstack/placement.py":[{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"3104a1db7897d098ec746b127ff46ca2bfde3db4","unresolved":true,"context_lines":[{"line_number":320,"context_line":"        raise exceptions.ResourceProviderNotFound(resource_provider\u003drp_uuid)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def get_traits(self, rp_uuid):"},{"line_number":323,"context_line":"        \"\"\"Calls the placement API to get resource inventory information."},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        :param rp_uuid: UUID of the resource provider to get"},{"line_number":326,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"c98ebc22_1c1d8e9d","line":323,"range":{"start_line":323,"start_character":51,"end_line":323,"end_character":60},"updated":"2024-06-28 15:13:33.000000000","message":"nit: ``inventory`` -\u003e ``trait``","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"aa58cf9e3c82c1df799d48787f689932608c87a2","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        raise exceptions.ResourceProviderNotFound(resource_provider\u003drp_uuid)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def get_traits(self, rp_uuid):"},{"line_number":323,"context_line":"        \"\"\"Calls the placement API to get resource inventory information."},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        :param rp_uuid: UUID of the resource provider to get"},{"line_number":326,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"73a96e5b_9d523707","line":323,"range":{"start_line":323,"start_character":51,"end_line":323,"end_character":60},"in_reply_to":"c98ebc22_1c1d8e9d","updated":"2024-08-06 10:36:38.000000000","message":"Done","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"910f1f9fed9d805ddde11c9a7335536396627d8e","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        raise exceptions.ResourceProviderNotFound(resource_provider\u003drp_uuid)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def get_traits(self, rp_uuid):"},{"line_number":323,"context_line":"        \"\"\"Calls the placement API to get resource inventory information."},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        :param rp_uuid: UUID of the resource provider to get"},{"line_number":326,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"87b3c266_9f3cbbe8","line":323,"range":{"start_line":323,"start_character":51,"end_line":323,"end_character":60},"in_reply_to":"c98ebc22_1c1d8e9d","updated":"2024-08-06 10:36:44.000000000","message":"Done","commit_id":"3287e2a57db074e9f12458088e83276e14194afa"}]}
