)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"61ee81f5bd81da72e02316aee335247d3d232987","unresolved":false,"context_lines":[{"line_number":30,"context_line":"default to 0.0, if they are not set, they evaluate to False."},{"line_number":31,"context_line":"We can also control this behavior to only overwrite what is in the"},{"line_number":32,"context_line":"inventory dict if we\u0027re using the update_provider_tree() flow."},{"line_number":33,"context_line":"Note that the ironic driver does provide a \"reserved\" value in"},{"line_number":34,"context_line":"its inventory dict, however, that driver only reports a custom"},{"line_number":35,"context_line":"resource class inventory for which we have no config so"},{"line_number":36,"context_line":"RT._normalize_inventory_from_cn_obj() will not override it."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Change-Id: I72c83a95dabd581998470edb9543079acb6536a5"},{"line_number":39,"context_line":"Closes-Bug: #1799727"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_49fc633e","line":36,"range":{"start_line":33,"start_character":0,"end_line":36,"end_character":59},"updated":"2018-10-25 14:14:41.000000000","message":"Guh unfortunately that won\u0027t be true for ironic in stable/rocky:\n\nhttps://github.com/openstack/nova/blob/stable/rocky/nova/virt/ironic/driver.py#L807\n\nSo I guess we\u0027ll have to deal with that in stable/rocky somehow, maybe with a flag on the virt driver to tell the RT to never overwrite reserved from the driver-reported inventory.","commit_id":"220677368370fd2c373d87b3cb03e7d054d24d13"}],"doc/source/reference/update-provider-tree.rst":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"50a28f63ec5c3861d553601be87a229cd93d3827","unresolved":false,"context_lines":[{"line_number":152,"context_line":"      provider_tree.update_inventory(nodename, inv_data)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"When reporting inventory for the standard resource classes ``VCPU``,"},{"line_number":155,"context_line":"``MEMORY_MB`` and ``DISK_GB``, implementors of ``update_provider_tree`` may"},{"line_number":156,"context_line":"need to set the ``allocation_ratio`` and ``reserved`` values in the"},{"line_number":157,"context_line":"``inv_data`` dict based on configuration to reflect changes on the compute"},{"line_number":158,"context_line":"for allocation ratios and reserved resource amounts back to the placement"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3f79a3b5_c842713c","line":155,"range":{"start_line":155,"start_character":72,"end_line":155,"end_character":75},"updated":"2018-10-29 18:00:11.000000000","message":"This \"may\" sort of implies that they only need to do if they want, but if I understand right, what we\u0027re saying is that they _will_ need to do so if the configuration changes?\n\nSuch is the ambiguity of \"may\" (if something happens, you may v if you wanna, you may)","commit_id":"ca279c68a54b054cb54d45ee9d2eed8ade9a6db5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4e225e783a9d1647279767d34a3010755d58761e","unresolved":false,"context_lines":[{"line_number":152,"context_line":"      provider_tree.update_inventory(nodename, inv_data)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"When reporting inventory for the standard resource classes ``VCPU``,"},{"line_number":155,"context_line":"``MEMORY_MB`` and ``DISK_GB``, implementors of ``update_provider_tree`` may"},{"line_number":156,"context_line":"need to set the ``allocation_ratio`` and ``reserved`` values in the"},{"line_number":157,"context_line":"``inv_data`` dict based on configuration to reflect changes on the compute"},{"line_number":158,"context_line":"for allocation ratios and reserved resource amounts back to the placement"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3f79a3b5_f1add431","line":155,"range":{"start_line":155,"start_character":72,"end_line":155,"end_character":75},"in_reply_to":"3f79a3b5_c842713c","updated":"2018-10-29 22:15:20.000000000","message":"Fact that it\u0027s \"may need to\" implies the former to me. But in this case, I think it should be s/may need to/should/, or even s/may//. Because moving forward, we\u0027re headed for a world where that\u0027s the *only* place those values are going to be set.\n\n...unless you want them to be 1.0 I guess.\n\nOr if your driver wants them not to be configurable. Which could definitely be a thing. (E.g. PowerVM has the concept of dedicated procs; if you set VCPU alloc ratio bigger than we think it should be, you\u0027ll simply fail to spawn after you hit the real limit.)\n\nSo effit, I guess I\u0027ve convinced myself that \"may need to\" is appropriately vague and hedgy.","commit_id":"ca279c68a54b054cb54d45ee9d2eed8ade9a6db5"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f85852e573a91d38c805203a11c3b816decb3feb","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        if (\u0027allocation_ratio\u0027 not in cpu_inv or"},{"line_number":113,"context_line":"                overwrite_ratios_from_config and CONF.cpu_allocation_ratio):"},{"line_number":114,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":115,"context_line":"        if \u0027reserved\u0027 not in cpu_inv:"},{"line_number":116,"context_line":"            cpu_inv[\u0027reserved\u0027] \u003d CONF.reserved_host_cpus"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"},{"line_number":119,"context_line":"        mem_inv \u003d inv_data[fields.ResourceClass.MEMORY_MB]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_62514d31","line":116,"range":{"start_line":115,"start_character":8,"end_line":116,"end_character":57},"updated":"2018-10-24 17:55:20.000000000","message":"The reserved config values will have the same issue. That needs to be worked into the functional test and the fix.","commit_id":"cb1d8d1bce627a7402eaa6052425021cb74ef08b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5606dcd9e5121504e00479b42c0cc3997c78febb","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    :param inv_data: Dict, keyed by resource class, of inventory information"},{"line_number":103,"context_line":"                     returned from virt driver\u0027s get_inventory() method"},{"line_number":104,"context_line":"    :param compute_node: `objects.ComputeNode` describing the compute node"},{"line_number":105,"context_line":"    :param overwrite_from_config: If True and \"reserved\" or \"allocation_ratio\""},{"line_number":106,"context_line":"        is in any inventory record and the related config option value is"},{"line_number":107,"context_line":"        set, let that override what is in the inventory record from the"},{"line_number":108,"context_line":"        virt driver/ProviderTree."}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_e9a3ef9a","line":105,"range":{"start_line":105,"start_character":47,"end_line":105,"end_character":55},"updated":"2018-10-25 14:05:07.000000000","message":"The ironic driver\u0027s update_provider_tree interface does actually return reserved based on whether or not the node is available, but it uses custom resource classes for which we don\u0027t have config, so it should be a non-issue here.","commit_id":"a43e50e22a7d1f99ee25557beec4ffe0cf62b754"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"05f170a4dfc150e26c4a7f2e734f509aa529c166","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"def _normalize_inventory_from_cn_obj(inv_data, cn,"},{"line_number":87,"context_line":"                                     overwrite_from_config\u003dFalse):"},{"line_number":88,"context_line":"    \"\"\"Helper function that injects various information from a compute node"},{"line_number":89,"context_line":"    object into the inventory dict returned from the virt driver\u0027s"},{"line_number":90,"context_line":"    get_inventory() method. This function allows us to marry information like"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_4202e3bb","line":87,"updated":"2018-10-26 12:56:28.000000000","message":"given we only have two callers, I\u0027m not sure we really need to add a new parameter here, which would be confusing.","commit_id":"220677368370fd2c373d87b3cb03e7d054d24d13"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"037fc3f865a52af02b05d2b86d098c026f1ada17","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"def _normalize_inventory_from_cn_obj(inv_data, cn,"},{"line_number":87,"context_line":"                                     overwrite_from_config\u003dFalse):"},{"line_number":88,"context_line":"    \"\"\"Helper function that injects various information from a compute node"},{"line_number":89,"context_line":"    object into the inventory dict returned from the virt driver\u0027s"},{"line_number":90,"context_line":"    get_inventory() method. This function allows us to marry information like"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_c1090e83","line":87,"in_reply_to":"3f79a3b5_4202e3bb","updated":"2018-10-26 15:50:03.000000000","message":"Because it\u0027s the update_provider_tree flow that has the problem because that gets the existing inventory from placement to construct a tree and then passes the tree to the virt driver to update and then passes whatever the final inventory is here, but if the inventory ratios were ever set we won\u0027t update them in here (since the ratio key will always be in the dict now). I was trying to avoid any weird side effect to the other flow. But if the other flow never has the ratio key in the dict anyway, I guess it\u0027s a non-issue.\n\nI will, however, need that flag for the ironic driver in stable/rocky since it sets reserved\u003dtotal if the node is not available (and in rocky the ironic driver still reports standard resource class inventory).","commit_id":"220677368370fd2c373d87b3cb03e7d054d24d13"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"05f170a4dfc150e26c4a7f2e734f509aa529c166","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    :param overwrite_from_config: If True and \"reserved\" or \"allocation_ratio\""},{"line_number":106,"context_line":"        is in any inventory record and the related config option value is"},{"line_number":107,"context_line":"        set, let that override what is in the inventory record from the"},{"line_number":108,"context_line":"        virt driver/ProviderTree."},{"line_number":109,"context_line":"    \"\"\""},{"line_number":110,"context_line":"    if fields.ResourceClass.VCPU in inv_data:"},{"line_number":111,"context_line":"        cpu_inv \u003d inv_data[fields.ResourceClass.VCPU]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_82e9dbe4","line":108,"updated":"2018-10-26 12:56:28.000000000","message":"I would rather flip the logic at least until we have https://review.openstack.org/#/c/552105/ implemented.\nLet try to explain it : if the operator provides a config option, they don\u0027t really care whether the virt driver provides a default value. They just want their own ratio to be passed to Placement.\n\nIn this case, the ComputeNode.xxx_ratio field always takes precedence over what the virt driver proposes, *except one case* which is if the CN field is still a default value.\n\nBased on the above, here is the logic I\u0027d like to get implemented :\n- lookup the CN ratio value\n- if not default, update the inventory with this value *anyway*\n- if default, lookup whether inventory already has a value and leave it then, or use the default CN value.","commit_id":"220677368370fd2c373d87b3cb03e7d054d24d13"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"037fc3f865a52af02b05d2b86d098c026f1ada17","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    :param overwrite_from_config: If True and \"reserved\" or \"allocation_ratio\""},{"line_number":106,"context_line":"        is in any inventory record and the related config option value is"},{"line_number":107,"context_line":"        set, let that override what is in the inventory record from the"},{"line_number":108,"context_line":"        virt driver/ProviderTree."},{"line_number":109,"context_line":"    \"\"\""},{"line_number":110,"context_line":"    if fields.ResourceClass.VCPU in inv_data:"},{"line_number":111,"context_line":"        cpu_inv \u003d inv_data[fields.ResourceClass.VCPU]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_a17bb2f0","line":108,"in_reply_to":"3f79a3b5_82e9dbe4","updated":"2018-10-26 15:50:03.000000000","message":"To be clear, you don\u0027t expect this fix to depend on the initial_allocation_ratios config options, right? Because this fix needs to be backported.\n\n\u003e if not default, update the inventory with this value *anyway*\n\nWell that won\u0027t work for the ironic driver which sets reserved in rocky, but that\u0027s where the overwrite_from_config param would be used. I guess you could argue that you shouldn\u0027t be changing defaults for ratios/reserved amounts for nova-compute services managing ironic nodes in the first place.","commit_id":"220677368370fd2c373d87b3cb03e7d054d24d13"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"10687b53607f1678e45b27ffccec931ee8689016","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        if (\u0027allocation_ratio\u0027 not in cpu_inv or"},{"line_number":113,"context_line":"                # CONF.cpu_allocation_ratio defaults to 0.0 so it\u0027s Falsey"},{"line_number":114,"context_line":"                overwrite_from_config and CONF.cpu_allocation_ratio):"},{"line_number":115,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":116,"context_line":"        if (\u0027reserved\u0027 not in cpu_inv or"},{"line_number":117,"context_line":"                overwrite_from_config and"},{"line_number":118,"context_line":"                cpu_inv[\u0027reserved\u0027] !\u003d CONF.reserved_host_cpus):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_8bcee88c","line":115,"range":{"start_line":115,"start_character":42,"end_line":115,"end_character":65},"updated":"2018-10-25 20:23:44.000000000","message":"...where this was set to CONF.cpu_allocation_ratio somewhere else?\n\nIf so, this is a bit confusing; is there a good reason we shouldn\u0027t say\n\n cpu_inv[\u0027allocation_ratio\u0027] \u003d CONF.cpu_allocation_ratio\n\ninstead?\n\nLikewise below.","commit_id":"220677368370fd2c373d87b3cb03e7d054d24d13"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"037fc3f865a52af02b05d2b86d098c026f1ada17","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        if (\u0027allocation_ratio\u0027 not in cpu_inv or"},{"line_number":113,"context_line":"                # CONF.cpu_allocation_ratio defaults to 0.0 so it\u0027s Falsey"},{"line_number":114,"context_line":"                overwrite_from_config and CONF.cpu_allocation_ratio):"},{"line_number":115,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":116,"context_line":"        if (\u0027reserved\u0027 not in cpu_inv or"},{"line_number":117,"context_line":"                overwrite_from_config and"},{"line_number":118,"context_line":"                cpu_inv[\u0027reserved\u0027] !\u003d CONF.reserved_host_cpus):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_61d7dac1","line":115,"range":{"start_line":115,"start_character":42,"end_line":115,"end_character":65},"in_reply_to":"3f79a3b5_8bcee88c","updated":"2018-10-26 15:50:03.000000000","message":"Because if you\u0027re xen and not using the update_provider_tree flow, \"\u0027allocation_ratio\u0027 not in cpu_inv\" will always be True and then we\u0027d potentially set allocation_ratio to 0.0 which is the default value for CONF.cpu_allocation_ratio. Remember it\u0027s the ComputeNode object that provides the facade for the default ratio values until the initial_allocation_ratio stuff is implemented.","commit_id":"220677368370fd2c373d87b3cb03e7d054d24d13"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"10687b53607f1678e45b27ffccec931ee8689016","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                overwrite_from_config and CONF.cpu_allocation_ratio):"},{"line_number":115,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":116,"context_line":"        if (\u0027reserved\u0027 not in cpu_inv or"},{"line_number":117,"context_line":"                overwrite_from_config and"},{"line_number":118,"context_line":"                cpu_inv[\u0027reserved\u0027] !\u003d CONF.reserved_host_cpus):"},{"line_number":119,"context_line":"            cpu_inv[\u0027reserved\u0027] \u003d CONF.reserved_host_cpus"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_cbc0604e","line":118,"range":{"start_line":117,"start_character":37,"end_line":118,"end_character":62},"updated":"2018-10-25 20:23:44.000000000","message":"This part seems unnecessary, just preventing the next line from writing the same value again, which I doubt is more expensive than this check. Omitting it is IMO more readable and explicit.\n\nLikewise below.","commit_id":"220677368370fd2c373d87b3cb03e7d054d24d13"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"037fc3f865a52af02b05d2b86d098c026f1ada17","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                overwrite_from_config and CONF.cpu_allocation_ratio):"},{"line_number":115,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":116,"context_line":"        if (\u0027reserved\u0027 not in cpu_inv or"},{"line_number":117,"context_line":"                overwrite_from_config and"},{"line_number":118,"context_line":"                cpu_inv[\u0027reserved\u0027] !\u003d CONF.reserved_host_cpus):"},{"line_number":119,"context_line":"            cpu_inv[\u0027reserved\u0027] \u003d CONF.reserved_host_cpus"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_61003a36","line":118,"range":{"start_line":117,"start_character":37,"end_line":118,"end_character":62},"in_reply_to":"3f79a3b5_cbc0604e","updated":"2018-10-26 15:50:03.000000000","message":"\u003e This part seems unnecessary, just preventing the next line from writing the same value again\n\nMaybe it is...I was trying to overwriting the reserved value unless it changed in config, which I can only tell if the values are different, unlike the allocation_ratio ones where they default to Falsey (0.0).\n\nBut now that I think about it, reserved_host_cpus and reserved_host_disk_mb default to 0 so I could use the same Falsey conditionals for those as I\u0027m doing for allocation ratios. Unfortunately that\u0027s not the case for reserved_host_memory_mb which defaults to 512.","commit_id":"220677368370fd2c373d87b3cb03e7d054d24d13"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7398994d05804c46978f544a66ebb3c30f54e495","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                overwrite_from_config and CONF.cpu_allocation_ratio):"},{"line_number":115,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":116,"context_line":"        if (\u0027reserved\u0027 not in cpu_inv or"},{"line_number":117,"context_line":"                overwrite_from_config and"},{"line_number":118,"context_line":"                cpu_inv[\u0027reserved\u0027] !\u003d CONF.reserved_host_cpus):"},{"line_number":119,"context_line":"            cpu_inv[\u0027reserved\u0027] \u003d CONF.reserved_host_cpus"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_0b3ad833","line":118,"range":{"start_line":117,"start_character":37,"end_line":118,"end_character":62},"in_reply_to":"3f79a3b5_cbc0604e","updated":"2018-10-25 20:26:56.000000000","message":"BTW, if you\u0027re not going to remove it, please add parens so I don\u0027t have to go figure out that `and` binds more tightly than `or`.","commit_id":"220677368370fd2c373d87b3cb03e7d054d24d13"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"05f170a4dfc150e26c4a7f2e734f509aa529c166","unresolved":false,"context_lines":[{"line_number":973,"context_line":"            # update_provider_tree isn\u0027t implemented yet - try get_inventory"},{"line_number":974,"context_line":"            try:"},{"line_number":975,"context_line":"                inv_data \u003d self.driver.get_inventory(nodename)"},{"line_number":976,"context_line":"                _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":977,"context_line":"                self.scheduler_client.set_inventory_for_provider("},{"line_number":978,"context_line":"                    context,"},{"line_number":979,"context_line":"                    compute_node.uuid,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_228007f6","line":976,"updated":"2018-10-26 12:56:28.000000000","message":"I just feel that if we follow the logic I mentioned in L108, there wouldn\u0027t need to special-case this call.","commit_id":"220677368370fd2c373d87b3cb03e7d054d24d13"}],"nova/virt/driver.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4e225e783a9d1647279767d34a3010755d58761e","unresolved":false,"context_lines":[{"line_number":874,"context_line":"        This method supersedes get_inventory(): if this method is implemented,"},{"line_number":875,"context_line":"        get_inventory() is not used."},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        Implementors of this interface are expected to set ``allocation_ratio``"},{"line_number":878,"context_line":"        and ``reserved`` values for inventory records, which may be based on"},{"line_number":879,"context_line":"        configuration options, e.g. ``[DEFAULT]/cpu_allocation_ratio``,"},{"line_number":880,"context_line":"        depending on the driver and resource class. If not provided, allocation"},{"line_number":881,"context_line":"        ratio defaults to 1.0 and reserved defaults to 0 in placement."},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"        :note: Renaming the root provider (by deleting it from provider_tree"},{"line_number":884,"context_line":"        and re-adding it with a different name) is not supported at this time."}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_b1519c33","line":881,"range":{"start_line":877,"start_character":0,"end_line":881,"end_character":70},"updated":"2018-10-29 22:15:20.000000000","message":"++\n\nCould we just use this wording in the doc?","commit_id":"ca279c68a54b054cb54d45ee9d2eed8ade9a6db5"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f766dec31389d66be92a1a14820ad4102f05e764","unresolved":false,"context_lines":[{"line_number":874,"context_line":"        This method supersedes get_inventory(): if this method is implemented,"},{"line_number":875,"context_line":"        get_inventory() is not used."},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        Implementors of this interface are expected to set ``allocation_ratio``"},{"line_number":878,"context_line":"        and ``reserved`` values for inventory records, which may be based on"},{"line_number":879,"context_line":"        configuration options, e.g. ``[DEFAULT]/cpu_allocation_ratio``,"},{"line_number":880,"context_line":"        depending on the driver and resource class. If not provided, allocation"},{"line_number":881,"context_line":"        ratio defaults to 1.0 and reserved defaults to 0 in placement."},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"        :note: Renaming the root provider (by deleting it from provider_tree"},{"line_number":884,"context_line":"        and re-adding it with a different name) is not supported at this time."}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_f575a0ca","line":881,"range":{"start_line":877,"start_character":0,"end_line":881,"end_character":70},"in_reply_to":"3f79a3b5_9789f025","updated":"2018-10-31 07:22:15.000000000","message":"Does it mean any implementors need to follow this http://specs.openstack.org/openstack/nova-specs/specs/stein/approved/initial-allocation-ratios.html in the future?","commit_id":"ca279c68a54b054cb54d45ee9d2eed8ade9a6db5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d0e99126b3821c130dd3f364f0b98ae32985c109","unresolved":false,"context_lines":[{"line_number":874,"context_line":"        This method supersedes get_inventory(): if this method is implemented,"},{"line_number":875,"context_line":"        get_inventory() is not used."},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        Implementors of this interface are expected to set ``allocation_ratio``"},{"line_number":878,"context_line":"        and ``reserved`` values for inventory records, which may be based on"},{"line_number":879,"context_line":"        configuration options, e.g. ``[DEFAULT]/cpu_allocation_ratio``,"},{"line_number":880,"context_line":"        depending on the driver and resource class. If not provided, allocation"},{"line_number":881,"context_line":"        ratio defaults to 1.0 and reserved defaults to 0 in placement."},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"        :note: Renaming the root provider (by deleting it from provider_tree"},{"line_number":884,"context_line":"        and re-adding it with a different name) is not supported at this time."}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_9789f025","line":881,"range":{"start_line":877,"start_character":0,"end_line":881,"end_character":70},"in_reply_to":"3f79a3b5_b1519c33","updated":"2018-10-30 00:14:49.000000000","message":"Could if that\u0027s what people want. I wrote this before the doc, not sure why I didn\u0027t just copy it.","commit_id":"ca279c68a54b054cb54d45ee9d2eed8ade9a6db5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb6e98946a663d3d0908eee85e54274578826716","unresolved":false,"context_lines":[{"line_number":874,"context_line":"        This method supersedes get_inventory(): if this method is implemented,"},{"line_number":875,"context_line":"        get_inventory() is not used."},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        Implementors of this interface are expected to set ``allocation_ratio``"},{"line_number":878,"context_line":"        and ``reserved`` values for inventory records, which may be based on"},{"line_number":879,"context_line":"        configuration options, e.g. ``[DEFAULT]/cpu_allocation_ratio``,"},{"line_number":880,"context_line":"        depending on the driver and resource class. If not provided, allocation"},{"line_number":881,"context_line":"        ratio defaults to 1.0 and reserved defaults to 0 in placement."},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"        :note: Renaming the root provider (by deleting it from provider_tree"},{"line_number":884,"context_line":"        and re-adding it with a different name) is not supported at this time."}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_18bac9df","line":881,"range":{"start_line":877,"start_character":0,"end_line":881,"end_character":70},"in_reply_to":"3f79a3b5_f575a0ca","updated":"2018-10-31 15:10:15.000000000","message":"\u003e Does it mean any implementors need to follow this http://specs.openstack.org/openstack/nova-specs/specs/stein/approved/initial-allocation-ratios.html\n \u003e in the future?\n\nI\u0027m not sure what you mean. The TODOs in the code note that we\u0027ll replace the option usage added in the update_provider_tree method when blueprint initial-allocation-ratios happens, meaning the \"CONF.cpu_allocation_ratio or 16.0\" in here will change to just \"CONF.initial_cpu_allocation_ratio\" if CONF.cpu_allocation_ratio is None (which will be the new default in that blueprint). We\u0027ll also use the initial* options if the inventory hasn\u0027t been reported yet, but I think that\u0027s maybe something the ResourceTracker will have to deal with since it\u0027s the only thing that knows if the compute node resource provider exists yet or not, the virt driver doesn\u0027t necessarily know that I don\u0027t think, unless there is already an entry in the provider tree?","commit_id":"ca279c68a54b054cb54d45ee9d2eed8ade9a6db5"}]}
