)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1c691ff31d920da076d42c6261de93b3598d2a1d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"the virt driver to be the source of truth for those values."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"We still do want that, and that\u0027s still the case (because we only set"},{"line_number":15,"context_line":"them if unset). But at least for now, for backward compatibility, since"},{"line_number":16,"context_line":"the virt driver doesn\u0027t have access to the compute_node object itself,"},{"line_number":17,"context_line":"we still have to do that normalization even for the update_provider_tree"},{"line_number":18,"context_line":"path. This patch makes it so."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5f7c97a3_02648fb8","line":15,"range":{"start_line":15,"start_character":15,"end_line":15,"end_character":37},"updated":"2018-05-18 09:27:16.000000000","message":"Like I said in my other comment on the code, I\u0027d strongly disagree with us passing down the ComputeNode object to the virt driver. Of course, that would be an easy thing, but that would just blow up the relationship and the chain of responsibility we have between the virt driver and the compute service.\n\nImagine one second that we pass a ComputeNode object, what would prevent the virt driver to update it for crazy things ? Brrrr....","commit_id":"d8c229abb3ba433a3b9c4b7694e2a367ea8f3ace"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1c691ff31d920da076d42c6261de93b3598d2a1d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"the virt driver to be the source of truth for those values."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"We still do want that, and that\u0027s still the case (because we only set"},{"line_number":15,"context_line":"them if unset). But at least for now, for backward compatibility, since"},{"line_number":16,"context_line":"the virt driver doesn\u0027t have access to the compute_node object itself,"},{"line_number":17,"context_line":"we still have to do that normalization even for the update_provider_tree"},{"line_number":18,"context_line":"path. This patch makes it so."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5f7c97a3_a2ca7b9e","line":15,"range":{"start_line":15,"start_character":41,"end_line":15,"end_character":65},"updated":"2018-05-18 09:27:16.000000000","message":"this nothing has to do with backwards compat\u0027, unless you started to change the interface.","commit_id":"d8c229abb3ba433a3b9c4b7694e2a367ea8f3ace"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d0504784bd31b2049a2c3267ec4b2e8462aa1c03","unresolved":false,"context_lines":[{"line_number":881,"context_line":"            self.driver.update_provider_tree(prov_tree, nodename)"},{"line_number":882,"context_line":"            # NOTE(efried): We still need to normalize inventory data for the"},{"line_number":883,"context_line":"            # compute node provider (inject allocation ratio and reserved"},{"line_number":884,"context_line":"            # amounts from the compute_node record) because the virt driver"},{"line_number":885,"context_line":"            # doesn\u0027t have access to the compute_node."},{"line_number":886,"context_line":"            inv_data \u003d prov_tree.data(nodename).inventory"},{"line_number":887,"context_line":"            _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":888,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_453dbf2a","line":885,"range":{"start_line":884,"start_character":52,"end_line":885,"end_character":34},"updated":"2018-05-17 19:30:29.000000000","message":"yet? or ever?\n\nIt\u0027s both not clear which you mean here, and also how it should be long term. If the compute node has the good info, does the virt driver need it?","commit_id":"3935d2a927214cd1f948c08cdcb858b493bfd680"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b06939d89780f6711fc29458d00aae91fd9e3ac","unresolved":false,"context_lines":[{"line_number":881,"context_line":"            self.driver.update_provider_tree(prov_tree, nodename)"},{"line_number":882,"context_line":"            # NOTE(efried): We still need to normalize inventory data for the"},{"line_number":883,"context_line":"            # compute node provider (inject allocation ratio and reserved"},{"line_number":884,"context_line":"            # amounts from the compute_node record) because the virt driver"},{"line_number":885,"context_line":"            # doesn\u0027t have access to the compute_node."},{"line_number":886,"context_line":"            inv_data \u003d prov_tree.data(nodename).inventory"},{"line_number":887,"context_line":"            _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":888,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_36a1db96","line":885,"range":{"start_line":884,"start_character":52,"end_line":885,"end_character":34},"in_reply_to":"5f7c97a3_453dbf2a","updated":"2018-05-17 21:42:23.000000000","message":"Yeah, we\u0027re reworking allocation ratio stuff, but I don\u0027t think we\u0027re reworking it in a way that changes anything about this comment.  At least not soon.","commit_id":"3935d2a927214cd1f948c08cdcb858b493bfd680"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d0504784bd31b2049a2c3267ec4b2e8462aa1c03","unresolved":false,"context_lines":[{"line_number":884,"context_line":"            # amounts from the compute_node record) because the virt driver"},{"line_number":885,"context_line":"            # doesn\u0027t have access to the compute_node."},{"line_number":886,"context_line":"            inv_data \u003d prov_tree.data(nodename).inventory"},{"line_number":887,"context_line":"            _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":888,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"},{"line_number":889,"context_line":"            # Flush any changes."},{"line_number":890,"context_line":"            reportclient.update_from_provider_tree(context, prov_tree)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_c5122fb5","line":887,"updated":"2018-05-17 19:30:29.000000000","message":"This is probably a ship sailed (and even if not, not worth doing here), but I wish this returned a new inv_data rather than modifying in place.","commit_id":"3935d2a927214cd1f948c08cdcb858b493bfd680"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7b06939d89780f6711fc29458d00aae91fd9e3ac","unresolved":false,"context_lines":[{"line_number":884,"context_line":"            # amounts from the compute_node record) because the virt driver"},{"line_number":885,"context_line":"            # doesn\u0027t have access to the compute_node."},{"line_number":886,"context_line":"            inv_data \u003d prov_tree.data(nodename).inventory"},{"line_number":887,"context_line":"            _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":888,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"},{"line_number":889,"context_line":"            # Flush any changes."},{"line_number":890,"context_line":"            reportclient.update_from_provider_tree(context, prov_tree)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_56ad772f","line":887,"in_reply_to":"5f7c97a3_c5122fb5","updated":"2018-05-17 21:42:23.000000000","message":"Meh, easy enough to fix, I can throw that on top.","commit_id":"3935d2a927214cd1f948c08cdcb858b493bfd680"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1c691ff31d920da076d42c6261de93b3598d2a1d","unresolved":false,"context_lines":[{"line_number":881,"context_line":"            self.driver.update_provider_tree(prov_tree, nodename)"},{"line_number":882,"context_line":"            # NOTE(efried): We still need to normalize inventory data for the"},{"line_number":883,"context_line":"            # compute node provider (inject allocation ratio and reserved"},{"line_number":884,"context_line":"            # amounts from the compute_node record) because the virt driver"},{"line_number":885,"context_line":"            # doesn\u0027t have access to the compute_node."},{"line_number":886,"context_line":"            inv_data \u003d prov_tree.data(nodename).inventory"},{"line_number":887,"context_line":"            _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":888,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_62db037d","line":885,"range":{"start_line":884,"start_character":52,"end_line":885,"end_character":54},"updated":"2018-05-18 09:27:16.000000000","message":"we could pass the object down to the virt driver but that would break our model where the virt driver should never assume anything coming from the nova-compute service.\nSo, yeah I assume it\u0027s a necessary thing : allocation ratios are defined by the nova-compute service and not the hypervisor, it\u0027s not gross to normalize the inventory here *at least* for both reserved and allocation_ratios.","commit_id":"d8c229abb3ba433a3b9c4b7694e2a367ea8f3ace"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"13380eaffa64bc2083a14fa9c1433df7498d8b88","unresolved":false,"context_lines":[{"line_number":881,"context_line":"            self.driver.update_provider_tree(prov_tree, nodename)"},{"line_number":882,"context_line":"            # NOTE(efried): We still need to normalize inventory data for the"},{"line_number":883,"context_line":"            # compute node provider (inject allocation ratio and reserved"},{"line_number":884,"context_line":"            # amounts from the compute_node record) because the virt driver"},{"line_number":885,"context_line":"            # doesn\u0027t have access to the compute_node."},{"line_number":886,"context_line":"            inv_data \u003d prov_tree.data(nodename).inventory"},{"line_number":887,"context_line":"            _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":888,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_87c18983","line":885,"range":{"start_line":884,"start_character":52,"end_line":885,"end_character":54},"in_reply_to":"5f7c97a3_62db037d","updated":"2018-05-18 15:27:29.000000000","message":"Sorry, I didn\u0027t mean to imply we would ever pass the compute_node to the virt driver; rather that we might some day stop pushing allocation_ratio and reserved amounts through the compute_node entirely (and let the virt driver be the sole source of truth for those values).\n\nI reworded the comment accordingly.","commit_id":"d8c229abb3ba433a3b9c4b7694e2a367ea8f3ace"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6d16455bebac1b0ccbfcf013f2030aeeb5f5d264","unresolved":false,"context_lines":[{"line_number":884,"context_line":"            # compute_node record if not set by the virt driver) because the"},{"line_number":885,"context_line":"            # virt driver does not and will not have access to the compute_node"},{"line_number":886,"context_line":"            inv_data \u003d prov_tree.data(nodename).inventory"},{"line_number":887,"context_line":"            _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":888,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"},{"line_number":889,"context_line":"            # Flush any changes."},{"line_number":890,"context_line":"            reportclient.update_from_provider_tree(context, prov_tree)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_c73d402d","line":887,"range":{"start_line":887,"start_character":0,"end_line":887,"end_character":68},"updated":"2018-05-18 16:38:05.000000000","message":"so we\u0027re going to overwrite the values for the compute node that the virt driver set in line 881? I don\u0027t see why that should be done.","commit_id":"c4dc86107b8ae7a98ca40032efb1d5dd75701db9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fa8e3e6b09a702481e0a079d5597a663e12ebc26","unresolved":false,"context_lines":[{"line_number":884,"context_line":"            # compute_node record if not set by the virt driver) because the"},{"line_number":885,"context_line":"            # virt driver does not and will not have access to the compute_node"},{"line_number":886,"context_line":"            inv_data \u003d prov_tree.data(nodename).inventory"},{"line_number":887,"context_line":"            _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":888,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"},{"line_number":889,"context_line":"            # Flush any changes."},{"line_number":890,"context_line":"            reportclient.update_from_provider_tree(context, prov_tree)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_70c2e4eb","line":887,"range":{"start_line":887,"start_character":0,"end_line":887,"end_character":68},"in_reply_to":"5f7c97a3_c73d402d","updated":"2018-05-18 19:34:28.000000000","message":"No, _normalize... doesn\u0027t overwrite values if they\u0027re already present, as noted in the comment above (L884).  The virt driver is the ultimate source of truth for those values.  This only sets them if not set by the virt driver.","commit_id":"c4dc86107b8ae7a98ca40032efb1d5dd75701db9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d7a1deaebbbf3924cdf3ed7ac0cad45f95b9c9eb","unresolved":false,"context_lines":[{"line_number":883,"context_line":"            # (inject allocation ratio and reserved amounts from the"},{"line_number":884,"context_line":"            # compute_node record if not set by the virt driver) because the"},{"line_number":885,"context_line":"            # virt driver does not and will not have access to the compute_node"},{"line_number":886,"context_line":"            inv_data \u003d prov_tree.data(nodename).inventory"},{"line_number":887,"context_line":"            _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":888,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"},{"line_number":889,"context_line":"            # Flush any changes."},{"line_number":890,"context_line":"            reportclient.update_from_provider_tree(context, prov_tree)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_e22c7d01","line":887,"range":{"start_line":886,"start_character":12,"end_line":887,"end_character":68},"updated":"2018-10-24 17:42:58.000000000","message":"This is the cause of regression bug 1799727. Once the inventory data allocation_ratios are set in the provider tree,  they won\u0027t be unset and then _normalize_inventory_from_cn_obj won\u0027t override them based on config changes, because it thinks the virt driver provided specific allocation ratios, when it really didn\u0027t.","commit_id":"8ab386ed9b6e48343910e08a15ba18325c09f3b6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1ddb595140b1bf1c6a70b6d4405502435194c794","unresolved":false,"context_lines":[{"line_number":883,"context_line":"            # (inject allocation ratio and reserved amounts from the"},{"line_number":884,"context_line":"            # compute_node record if not set by the virt driver) because the"},{"line_number":885,"context_line":"            # virt driver does not and will not have access to the compute_node"},{"line_number":886,"context_line":"            inv_data \u003d prov_tree.data(nodename).inventory"},{"line_number":887,"context_line":"            _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":888,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"},{"line_number":889,"context_line":"            # Flush any changes."},{"line_number":890,"context_line":"            reportclient.update_from_provider_tree(context, prov_tree)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_cef16b66","line":887,"range":{"start_line":886,"start_character":12,"end_line":887,"end_character":68},"in_reply_to":"3f79a3b5_e22c7d01","updated":"2018-10-24 20:02:53.000000000","message":"How would _normalized_inventory_from_cn_obj() *know* if the virt driver provided specific allocation ratios or whether the compute node allocation ratio attributes were set from CONF values? There\u0027s no way to know that information in _normalize_inventory_from_cn_obj() :(","commit_id":"8ab386ed9b6e48343910e08a15ba18325c09f3b6"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e0cfb4c0e2a31dfb66d7fda7be201c42d80f4d84","unresolved":false,"context_lines":[{"line_number":1374,"context_line":""},{"line_number":1375,"context_line":"        orig_compute \u003d _COMPUTE_NODE_FIXTURES[0].obj_clone()"},{"line_number":1376,"context_line":"        # TODO(efried): These are being overwritten to 0.0 on the global"},{"line_number":1377,"context_line":"        # somewhere else in this module. Find and fix that, and remove these:"},{"line_number":1378,"context_line":"        orig_compute.cpu_allocation_ratio \u003d 16.0"},{"line_number":1379,"context_line":"        orig_compute.ram_allocation_ratio \u003d 1.5"},{"line_number":1380,"context_line":"        orig_compute.disk_allocation_ratio \u003d 1.0"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_27c8b572","line":1377,"updated":"2018-05-18 15:37:41.000000000","message":"No, that\u0027s because https://github.com/openstack/nova/blob/30cda51/nova/conf/compute.py#L383\n\nThe default option value is 0.0, we normalize it through the ComputeNode object facade when we pull the object.","commit_id":"c4dc86107b8ae7a98ca40032efb1d5dd75701db9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ede8218a5017968e027e30f87e6f823924fde737","unresolved":false,"context_lines":[{"line_number":1374,"context_line":""},{"line_number":1375,"context_line":"        orig_compute \u003d _COMPUTE_NODE_FIXTURES[0].obj_clone()"},{"line_number":1376,"context_line":"        # TODO(efried): These are being overwritten to 0.0 on the global"},{"line_number":1377,"context_line":"        # somewhere else in this module. Find and fix that, and remove these:"},{"line_number":1378,"context_line":"        orig_compute.cpu_allocation_ratio \u003d 16.0"},{"line_number":1379,"context_line":"        orig_compute.ram_allocation_ratio \u003d 1.5"},{"line_number":1380,"context_line":"        orig_compute.disk_allocation_ratio \u003d 1.0"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_27abd575","line":1377,"in_reply_to":"5f7c97a3_27c8b572","updated":"2018-05-18 15:41:31.000000000","message":"The fixture (L60) is way beyond that point.  When I run this test in isolation it works fine.  It\u0027s only when I run the whole module that this override happens.","commit_id":"c4dc86107b8ae7a98ca40032efb1d5dd75701db9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e0cfb4c0e2a31dfb66d7fda7be201c42d80f4d84","unresolved":false,"context_lines":[{"line_number":1375,"context_line":"        orig_compute \u003d _COMPUTE_NODE_FIXTURES[0].obj_clone()"},{"line_number":1376,"context_line":"        # TODO(efried): These are being overwritten to 0.0 on the global"},{"line_number":1377,"context_line":"        # somewhere else in this module. Find and fix that, and remove these:"},{"line_number":1378,"context_line":"        orig_compute.cpu_allocation_ratio \u003d 16.0"},{"line_number":1379,"context_line":"        orig_compute.ram_allocation_ratio \u003d 1.5"},{"line_number":1380,"context_line":"        orig_compute.disk_allocation_ratio \u003d 1.0"},{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"        self.rt.compute_nodes[_NODENAME] \u003d orig_compute"},{"line_number":1383,"context_line":"        self.rt.old_resources[_NODENAME] \u003d orig_compute"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_a7a92591","line":1380,"range":{"start_line":1378,"start_character":0,"end_line":1380,"end_character":48},"updated":"2018-05-18 15:37:41.000000000","message":"why aren\u0027t you using self.flags instead ? Here you want to make sure that if the operators sets a value, then we have Placement updated with the right values.","commit_id":"c4dc86107b8ae7a98ca40032efb1d5dd75701db9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ede8218a5017968e027e30f87e6f823924fde737","unresolved":false,"context_lines":[{"line_number":1375,"context_line":"        orig_compute \u003d _COMPUTE_NODE_FIXTURES[0].obj_clone()"},{"line_number":1376,"context_line":"        # TODO(efried): These are being overwritten to 0.0 on the global"},{"line_number":1377,"context_line":"        # somewhere else in this module. Find and fix that, and remove these:"},{"line_number":1378,"context_line":"        orig_compute.cpu_allocation_ratio \u003d 16.0"},{"line_number":1379,"context_line":"        orig_compute.ram_allocation_ratio \u003d 1.5"},{"line_number":1380,"context_line":"        orig_compute.disk_allocation_ratio \u003d 1.0"},{"line_number":1381,"context_line":""},{"line_number":1382,"context_line":"        self.rt.compute_nodes[_NODENAME] \u003d orig_compute"},{"line_number":1383,"context_line":"        self.rt.old_resources[_NODENAME] \u003d orig_compute"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_67ca2d50","line":1380,"range":{"start_line":1378,"start_character":0,"end_line":1380,"end_character":48},"in_reply_to":"5f7c97a3_a7a92591","updated":"2018-05-18 15:41:31.000000000","message":"That\u0027s not what I\u0027m testing here.  I don\u0027t care where the values originate, just that they\u0027re set in the compute_node by the time it gets passed in to the _normalize... method.","commit_id":"c4dc86107b8ae7a98ca40032efb1d5dd75701db9"}]}
