)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch add new ``initial_xxx_allocation_ratio`` CONF options"},{"line_number":10,"context_line":"and modify resource tracker\u0027s initial compute node creation to"},{"line_number":11,"context_line":"use these values."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I14a310b20bd9892e7b34464e6baad49bf5928ece"},{"line_number":14,"context_line":"blueprint: initial-allocation-ratios"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_29ceb28e","line":12,"updated":"2018-11-26 22:00:59.000000000","message":"This, like the spec, was likely written before these changes to the virt drivers:\n\nhttps://github.com/openstack/nova/blob/594c653dc1a312d0364ad24c703e1a9b228133e1/nova/virt/libvirt/driver.py#L6460\n\nhttps://github.com/openstack/nova/blob/594c653dc1a312d0364ad24c703e1a9b228133e1/nova/virt/powervm/driver.py#L194\n\nhttps://review.openstack.org/#/c/613126/4/nova/virt/fake.py\n\nWhen driver.update_provider_tree is used, the RT won\u0027t call _normalize_inventory_from_cn_obj to set the allocation ratio from config. Note that happens after the RT calls _copy_resources() to set the allocation ratio from config onto the ComputeNode object. I don\u0027t think update_provider_tree knows if it\u0027s an initial create or not (the RT knows that though).\n\nAnyway, I think we might have a problem with the update_provider_tree logic because it will overwrite any allocation ratios set via the placement API, which was a problem described in the spec:\n\nhttps://specs.openstack.org/openstack/nova-specs/specs/stein/approved/initial-allocation-ratios.html#manually-set-placement-allocation-ratios-are-overwritten","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3e90bcf0efb6806a10498a9dc6c2a46f605cd18","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch add new ``initial_xxx_allocation_ratio`` CONF options"},{"line_number":10,"context_line":"and modify resource tracker\u0027s initial compute node creation to"},{"line_number":11,"context_line":"use these values."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I14a310b20bd9892e7b34464e6baad49bf5928ece"},{"line_number":14,"context_line":"blueprint: initial-allocation-ratios"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f79a3b5_e92bdae5","line":12,"in_reply_to":"3f79a3b5_29ceb28e","updated":"2018-11-26 22:09:20.000000000","message":"I think the drivers implementing update_provider_tree might be able to determine if they should provide allocation_ratio for VCPU/MEMORY_MB/DISK_GB resource classes if and only if the ProviderTree either does not have existing inventory (that\u0027s the initial create of those records) or CONF.*_allocation_ratio is not None (so the operator has told nova-compute to reflect a config-based allocation ratio back to placement and thus will overwrite any manually set values via the placement API). Would that solve this problem?","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":620,"context_line":"        stats.digest_stats(resources.get(\u0027stats\u0027))"},{"line_number":621,"context_line":"        compute_node.stats \u003d stats"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        # Update the allocation ratios for the related ComputeNode object"},{"line_number":624,"context_line":"        # but only if the configured values are not the default 0.0; the"},{"line_number":625,"context_line":"        # ComputeNode._from_db_object method takes care of providing default"},{"line_number":626,"context_line":"        # allocation ratios when the config is left at the 0.0 default, so"},{"line_number":627,"context_line":"        # we\u0027ll really end up with something like a"},{"line_number":628,"context_line":"        # ComputeNode.cpu_allocation_ratio of 16.0, not 0.0. We want to avoid"},{"line_number":629,"context_line":"        # resetting the ComputeNode fields to 0.0 because that will make"},{"line_number":630,"context_line":"        # the _resource_change method think something changed when really it"},{"line_number":631,"context_line":"        # didn\u0027t."},{"line_number":632,"context_line":"        # TODO(mriedem): Will this break any scenarios where an operator is"},{"line_number":633,"context_line":"        # trying to *reset* the allocation ratios by changing config from"},{"line_number":634,"context_line":"        # non-0.0 back to 0.0? Maybe we should only do this if the fields on"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_c9085e26","line":631,"range":{"start_line":623,"start_character":8,"end_line":631,"end_character":17},"updated":"2018-11-26 22:00:59.000000000","message":"This should probably be updated to mention the initial usage now, yeah?","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":620,"context_line":"        stats.digest_stats(resources.get(\u0027stats\u0027))"},{"line_number":621,"context_line":"        compute_node.stats \u003d stats"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        # Update the allocation ratios for the related ComputeNode object"},{"line_number":624,"context_line":"        # but only if the configured values are not the default 0.0; the"},{"line_number":625,"context_line":"        # ComputeNode._from_db_object method takes care of providing default"},{"line_number":626,"context_line":"        # allocation ratios when the config is left at the 0.0 default, so"},{"line_number":627,"context_line":"        # we\u0027ll really end up with something like a"},{"line_number":628,"context_line":"        # ComputeNode.cpu_allocation_ratio of 16.0, not 0.0. We want to avoid"},{"line_number":629,"context_line":"        # resetting the ComputeNode fields to 0.0 because that will make"},{"line_number":630,"context_line":"        # the _resource_change method think something changed when really it"},{"line_number":631,"context_line":"        # didn\u0027t."},{"line_number":632,"context_line":"        # TODO(mriedem): Will this break any scenarios where an operator is"},{"line_number":633,"context_line":"        # trying to *reset* the allocation ratios by changing config from"},{"line_number":634,"context_line":"        # non-0.0 back to 0.0? Maybe we should only do this if the fields on"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_93528469","line":631,"range":{"start_line":623,"start_character":8,"end_line":631,"end_character":17},"in_reply_to":"3f79a3b5_c9085e26","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":642,"context_line":"        # per-tenant quota is sticky once you change it in the API."},{"line_number":643,"context_line":"        for res in (\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027):"},{"line_number":644,"context_line":"            attr \u003d \u0027%s_allocation_ratio\u0027 % res"},{"line_number":645,"context_line":"            if initial:"},{"line_number":646,"context_line":"                conf_alloc_ratio \u003d getattr(CONF, \u0027initial_%s\u0027 % attr)"},{"line_number":647,"context_line":"            else:"},{"line_number":648,"context_line":"                conf_alloc_ratio \u003d getattr(self, attr)"},{"line_number":649,"context_line":"            # NOTE(yikun): In Stein version, we change the default value of"},{"line_number":650,"context_line":"            # (cpu|ram|disk)_allocation_ratio from 0.0 to None, but we still"},{"line_number":651,"context_line":"            # should allow 0.0 to keep compatibility, and this 0.0 condition"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_69134a5b","line":648,"range":{"start_line":645,"start_character":12,"end_line":648,"end_character":54},"updated":"2018-11-26 22:00:59.000000000","message":"Either here or above, the initial condition should be documented.","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":642,"context_line":"        # per-tenant quota is sticky once you change it in the API."},{"line_number":643,"context_line":"        for res in (\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027):"},{"line_number":644,"context_line":"            attr \u003d \u0027%s_allocation_ratio\u0027 % res"},{"line_number":645,"context_line":"            if initial:"},{"line_number":646,"context_line":"                conf_alloc_ratio \u003d getattr(CONF, \u0027initial_%s\u0027 % attr)"},{"line_number":647,"context_line":"            else:"},{"line_number":648,"context_line":"                conf_alloc_ratio \u003d getattr(self, attr)"},{"line_number":649,"context_line":"            # NOTE(yikun): In Stein version, we change the default value of"},{"line_number":650,"context_line":"            # (cpu|ram|disk)_allocation_ratio from 0.0 to None, but we still"},{"line_number":651,"context_line":"            # should allow 0.0 to keep compatibility, and this 0.0 condition"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_b3554053","line":648,"range":{"start_line":645,"start_character":12,"end_line":648,"end_character":54},"in_reply_to":"3f79a3b5_69134a5b","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"62a82d1ed6837a2e11dab356acf5091871602c49","unresolved":false,"context_lines":[{"line_number":632,"context_line":"        # NOTE(yikun): The CONF.initial_(cpu|ram|disk)_allocation_ratio would"},{"line_number":633,"context_line":"        # be used when we initialize the compute node object, that means the"},{"line_number":634,"context_line":"        # ComputeNode.(cpu|ram|disk)_allocation_ratio will be set to"},{"line_number":635,"context_line":"        # CONF.(cpu|ram|disk)_allocation_ratio when initial flag is True."},{"line_number":636,"context_line":"        # TODO(mriedem): Will this break any scenarios where an operator is"},{"line_number":637,"context_line":"        # trying to *reset* the allocation ratios by changing config from"},{"line_number":638,"context_line":"        # non-None back to None? Maybe we should only do this if the fields on"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_5a52ae6b","line":635,"range":{"start_line":635,"start_character":16,"end_line":635,"end_character":28},"updated":"2018-11-28 03:20:08.000000000","message":"*_initial_allocation_ratio?","commit_id":"ae4ec11510b4d4036e597cfe82e176fce4486571"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"a6cf933387a8c384887ce45281d386c4771ec5ca","unresolved":false,"context_lines":[{"line_number":632,"context_line":"        # NOTE(yikun): The CONF.initial_(cpu|ram|disk)_allocation_ratio would"},{"line_number":633,"context_line":"        # be used when we initialize the compute node object, that means the"},{"line_number":634,"context_line":"        # ComputeNode.(cpu|ram|disk)_allocation_ratio will be set to"},{"line_number":635,"context_line":"        # CONF.(cpu|ram|disk)_allocation_ratio when initial flag is True."},{"line_number":636,"context_line":"        # TODO(mriedem): Will this break any scenarios where an operator is"},{"line_number":637,"context_line":"        # trying to *reset* the allocation ratios by changing config from"},{"line_number":638,"context_line":"        # non-None back to None? Maybe we should only do this if the fields on"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_ebdacee4","line":635,"range":{"start_line":635,"start_character":16,"end_line":635,"end_character":28},"in_reply_to":"3f79a3b5_5a52ae6b","updated":"2018-11-28 08:39:23.000000000","message":"Done","commit_id":"ae4ec11510b4d4036e597cfe82e176fce4486571"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"532aa828b86eb23b5bf9eb9e2d451f379c149950","unresolved":false,"context_lines":[{"line_number":634,"context_line":"        # ComputeNode.(cpu|ram|disk)_allocation_ratio will be set to"},{"line_number":635,"context_line":"        # CONF.initial_(cpu|ram|disk)_allocation_ratio when initial flag is"},{"line_number":636,"context_line":"        # True."},{"line_number":637,"context_line":"        # TODO(mriedem): Will this break any scenarios where an operator is"},{"line_number":638,"context_line":"        # trying to *reset* the allocation ratios by changing config from"},{"line_number":639,"context_line":"        # non-None back to None? Maybe we should only do this if the fields on"},{"line_number":640,"context_line":"        # the ComputeNode object are not already set. For example, let\u0027s say"},{"line_number":641,"context_line":"        # the cpu_allocation_ratio config was 1.0 and then the operator wants"},{"line_number":642,"context_line":"        # to get back to the default (16.0 via the facade), and to do that they"},{"line_number":643,"context_line":"        # change the config back to None (or just unset the config option)."},{"line_number":644,"context_line":"        # Should we support that or treat these config options as \"sticky\" in"},{"line_number":645,"context_line":"        # that once you start setting them, you can\u0027t go back to the implied"},{"line_number":646,"context_line":"        # defaults by unsetting or resetting to None? Sort of like how"},{"line_number":647,"context_line":"        # per-tenant quota is sticky once you change it in the API."},{"line_number":648,"context_line":"        for res in (\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027):"},{"line_number":649,"context_line":"            attr \u003d \u0027%s_allocation_ratio\u0027 % res"},{"line_number":650,"context_line":"            if initial:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_d81e8660","line":647,"range":{"start_line":637,"start_character":8,"end_line":647,"end_character":67},"updated":"2018-11-30 19:24:05.000000000","message":"Given https://review.openstack.org/#/c/602804/14/nova/conf/compute.py@398 I think we can just remove this TODO now.","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":634,"context_line":"        # ComputeNode.(cpu|ram|disk)_allocation_ratio will be set to"},{"line_number":635,"context_line":"        # CONF.initial_(cpu|ram|disk)_allocation_ratio when initial flag is"},{"line_number":636,"context_line":"        # True."},{"line_number":637,"context_line":"        # TODO(mriedem): Will this break any scenarios where an operator is"},{"line_number":638,"context_line":"        # trying to *reset* the allocation ratios by changing config from"},{"line_number":639,"context_line":"        # non-None back to None? Maybe we should only do this if the fields on"},{"line_number":640,"context_line":"        # the ComputeNode object are not already set. For example, let\u0027s say"},{"line_number":641,"context_line":"        # the cpu_allocation_ratio config was 1.0 and then the operator wants"},{"line_number":642,"context_line":"        # to get back to the default (16.0 via the facade), and to do that they"},{"line_number":643,"context_line":"        # change the config back to None (or just unset the config option)."},{"line_number":644,"context_line":"        # Should we support that or treat these config options as \"sticky\" in"},{"line_number":645,"context_line":"        # that once you start setting them, you can\u0027t go back to the implied"},{"line_number":646,"context_line":"        # defaults by unsetting or resetting to None? Sort of like how"},{"line_number":647,"context_line":"        # per-tenant quota is sticky once you change it in the API."},{"line_number":648,"context_line":"        for res in (\u0027cpu\u0027, \u0027disk\u0027, \u0027ram\u0027):"},{"line_number":649,"context_line":"            attr \u003d \u0027%s_allocation_ratio\u0027 % res"},{"line_number":650,"context_line":"            if initial:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_93c46f3b","line":647,"range":{"start_line":637,"start_character":8,"end_line":647,"end_character":67},"in_reply_to":"3f79a3b5_d81e8660","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"}],"nova/conf/compute.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":379,"context_line":"\"\"\"),"},{"line_number":380,"context_line":"]"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"initial_allocation_ratio_opts \u003d ["},{"line_number":383,"context_line":"    cfg.FloatOpt(\u0027initial_cpu_allocation_ratio\u0027,"},{"line_number":384,"context_line":"                 default\u003d16.0,"},{"line_number":385,"context_line":"                 min\u003d0.0,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_099f36b2","line":382,"range":{"start_line":382,"start_character":0,"end_line":382,"end_character":29},"updated":"2018-11-26 22:00:59.000000000","message":"nit: can we just include these in the allocation_ratio_opts list below and alongside the non-initial (existing) options for context?","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":379,"context_line":"\"\"\"),"},{"line_number":380,"context_line":"]"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"initial_allocation_ratio_opts \u003d ["},{"line_number":383,"context_line":"    cfg.FloatOpt(\u0027initial_cpu_allocation_ratio\u0027,"},{"line_number":384,"context_line":"                 default\u003d16.0,"},{"line_number":385,"context_line":"                 min\u003d0.0,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_3341308f","line":382,"range":{"start_line":382,"start_character":0,"end_line":382,"end_character":29},"in_reply_to":"3f79a3b5_099f36b2","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":382,"context_line":"initial_allocation_ratio_opts \u003d ["},{"line_number":383,"context_line":"    cfg.FloatOpt(\u0027initial_cpu_allocation_ratio\u0027,"},{"line_number":384,"context_line":"                 default\u003d16.0,"},{"line_number":385,"context_line":"                 min\u003d0.0,"},{"line_number":386,"context_line":"                 help\u003d\"\"\""},{"line_number":387,"context_line":"This option helps you specify initial virtual CPU to physical CPU allocation"},{"line_number":388,"context_line":"ratio."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_a93642e7","line":385,"range":{"start_line":385,"start_character":17,"end_line":385,"end_character":25},"updated":"2018-11-26 22:00:59.000000000","message":"This is confusing, but I don\u0027t really know what else to do here. Setting to 0.0 would be wrong, and the ComputeNode._from_db_object facade would just change it to 16.0. It\u0027s almost like we need a PositiveFloatOpt config option type where min can never be \u003c\u003d0.\n\nSee discussion with the Oslo PTL about our options:\n\nhttp://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2018-11-26.log.html#t2018-11-26T21:35:23","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7de6692c3a871adf8b2899d248decca07fa79b2e","unresolved":false,"context_lines":[{"line_number":382,"context_line":"initial_allocation_ratio_opts \u003d ["},{"line_number":383,"context_line":"    cfg.FloatOpt(\u0027initial_cpu_allocation_ratio\u0027,"},{"line_number":384,"context_line":"                 default\u003d16.0,"},{"line_number":385,"context_line":"                 min\u003d0.0,"},{"line_number":386,"context_line":"                 help\u003d\"\"\""},{"line_number":387,"context_line":"This option helps you specify initial virtual CPU to physical CPU allocation"},{"line_number":388,"context_line":"ratio."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_09928f56","line":385,"range":{"start_line":385,"start_character":17,"end_line":385,"end_character":25},"in_reply_to":"3f79a3b5_5c74e689","updated":"2018-11-29 17:46:05.000000000","message":"We can define the new opt type in nova either in this change or before it in the series.","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":382,"context_line":"initial_allocation_ratio_opts \u003d ["},{"line_number":383,"context_line":"    cfg.FloatOpt(\u0027initial_cpu_allocation_ratio\u0027,"},{"line_number":384,"context_line":"                 default\u003d16.0,"},{"line_number":385,"context_line":"                 min\u003d0.0,"},{"line_number":386,"context_line":"                 help\u003d\"\"\""},{"line_number":387,"context_line":"This option helps you specify initial virtual CPU to physical CPU allocation"},{"line_number":388,"context_line":"ratio."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_d35d5c54","line":385,"range":{"start_line":385,"start_character":17,"end_line":385,"end_character":25},"in_reply_to":"3f79a3b5_a93642e7","updated":"2018-11-27 12:27:21.000000000","message":"yeah, I got your idea, but I should add a new opt type first, and then merge this patch? or we can do it in follow up?","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"428f2f518eb1489e1e4217cfeb7ce6b2a5b5ace5","unresolved":false,"context_lines":[{"line_number":382,"context_line":"initial_allocation_ratio_opts \u003d ["},{"line_number":383,"context_line":"    cfg.FloatOpt(\u0027initial_cpu_allocation_ratio\u0027,"},{"line_number":384,"context_line":"                 default\u003d16.0,"},{"line_number":385,"context_line":"                 min\u003d0.0,"},{"line_number":386,"context_line":"                 help\u003d\"\"\""},{"line_number":387,"context_line":"This option helps you specify initial virtual CPU to physical CPU allocation"},{"line_number":388,"context_line":"ratio."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_5c74e689","line":385,"range":{"start_line":385,"start_character":17,"end_line":385,"end_character":25},"in_reply_to":"3f79a3b5_d35d5c54","updated":"2018-11-28 10:02:20.000000000","message":"https://review.openstack.org/#/c/620547/","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":387,"context_line":"This option helps you specify initial virtual CPU to physical CPU allocation"},{"line_number":388,"context_line":"ratio."},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"This option is **ONLY** used if the resource tracker detects no existing"},{"line_number":391,"context_line":"record in the ``compute_nodes`` nova cell DB for that hypervisor."},{"line_number":392,"context_line":"\"\"\"),"},{"line_number":393,"context_line":"    cfg.FloatOpt(\u0027initial_ram_allocation_ratio\u0027,"},{"line_number":394,"context_line":"                 default\u003d1.5,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_49820e53","line":391,"range":{"start_line":390,"start_character":0,"end_line":391,"end_character":65},"updated":"2018-11-26 22:00:59.000000000","message":"This probably doesn\u0027t really mean anything to an operator (it\u0027s developer-speak). Probably better to say something like, \"This is only used when initially creating the ``computes_nodes`` table record for a given nova-compute service.\"","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":387,"context_line":"This option helps you specify initial virtual CPU to physical CPU allocation"},{"line_number":388,"context_line":"ratio."},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"This option is **ONLY** used if the resource tracker detects no existing"},{"line_number":391,"context_line":"record in the ``compute_nodes`` nova cell DB for that hypervisor."},{"line_number":392,"context_line":"\"\"\"),"},{"line_number":393,"context_line":"    cfg.FloatOpt(\u0027initial_ram_allocation_ratio\u0027,"},{"line_number":394,"context_line":"                 default\u003d1.5,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_f349788c","line":391,"range":{"start_line":390,"start_character":0,"end_line":391,"end_character":65},"in_reply_to":"3f79a3b5_49820e53","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":433,"context_line":"the allocation ratio will not change. Once set to a non-default value, it is"},{"line_number":434,"context_line":"not possible to \"unset\" the config to get back to the default behavior. If you"},{"line_number":435,"context_line":"want to reset back to the default, explicitly specify it to the value of"},{"line_number":436,"context_line":"``CONF.cpu_allocation_ratio``."},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"NOTE: As of the 16.0.0 Pike release, this configuration option is ignored"},{"line_number":439,"context_line":"for the ironic.IronicDriver compute driver and is hardcoded to 1.0."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_a992c29e","line":436,"range":{"start_line":436,"start_character":7,"end_line":436,"end_character":27},"updated":"2018-11-26 22:00:59.000000000","message":"initial_cpu_allocation_ratio - and remove \"CONF\" since that\u0027s code, not docs.","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":433,"context_line":"the allocation ratio will not change. Once set to a non-default value, it is"},{"line_number":434,"context_line":"not possible to \"unset\" the config to get back to the default behavior. If you"},{"line_number":435,"context_line":"want to reset back to the default, explicitly specify it to the value of"},{"line_number":436,"context_line":"``CONF.cpu_allocation_ratio``."},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"NOTE: As of the 16.0.0 Pike release, this configuration option is ignored"},{"line_number":439,"context_line":"for the ironic.IronicDriver compute driver and is hardcoded to 1.0."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_1350b42c","line":436,"range":{"start_line":436,"start_character":7,"end_line":436,"end_character":27},"in_reply_to":"3f79a3b5_a992c29e","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":440,"context_line":""},{"line_number":441,"context_line":"Possible values:"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"* Any valid positive integer or float value"},{"line_number":444,"context_line":"\"\"\"),"},{"line_number":445,"context_line":"    cfg.FloatOpt(\u0027ram_allocation_ratio\u0027,"},{"line_number":446,"context_line":"        default\u003dNone,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_29e47241","line":443,"updated":"2018-11-26 22:00:59.000000000","message":"Add:\n\nRelated options:\n\n* initial_cpu_allocation_ratio","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":440,"context_line":""},{"line_number":441,"context_line":"Possible values:"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"* Any valid positive integer or float value"},{"line_number":444,"context_line":"\"\"\"),"},{"line_number":445,"context_line":"    cfg.FloatOpt(\u0027ram_allocation_ratio\u0027,"},{"line_number":446,"context_line":"        default\u003dNone,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_05faab0f","line":443,"in_reply_to":"3f79a3b5_29e47241","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":463,"context_line":"the allocation ratio will not change. Once set to a non-default value, it is"},{"line_number":464,"context_line":"not possible to \"unset\" the config to get back to the default behavior. If you"},{"line_number":465,"context_line":"want to reset back to the default, explicitly specify it to the value of"},{"line_number":466,"context_line":"``CONF.ram_allocation_ratio``."},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"NOTE: As of the 16.0.0 Pike release, this configuration option is ignored"},{"line_number":469,"context_line":"for the ironic.IronicDriver compute driver and is hardcoded to 1.0."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_e9e99a17","line":466,"range":{"start_line":466,"start_character":7,"end_line":466,"end_character":27},"updated":"2018-11-26 22:00:59.000000000","message":"initial_ram_allocation_ratio - remove CONF and add the \"Related options\" part as above.","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":463,"context_line":"the allocation ratio will not change. Once set to a non-default value, it is"},{"line_number":464,"context_line":"not possible to \"unset\" the config to get back to the default behavior. If you"},{"line_number":465,"context_line":"want to reset back to the default, explicitly specify it to the value of"},{"line_number":466,"context_line":"``CONF.ram_allocation_ratio``."},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"NOTE: As of the 16.0.0 Pike release, this configuration option is ignored"},{"line_number":469,"context_line":"for the ironic.IronicDriver compute driver and is hardcoded to 1.0."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_25fd6706","line":466,"range":{"start_line":466,"start_character":7,"end_line":466,"end_character":27},"in_reply_to":"3f79a3b5_e9e99a17","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":497,"context_line":"the allocation ratio will not change. Once set to a non-default value, it is"},{"line_number":498,"context_line":"not possible to \"unset\" the config to get back to the default behavior. If you"},{"line_number":499,"context_line":"want to reset back to the default, explicitly specify it to the value of"},{"line_number":500,"context_line":"``CONF.disk_allocation_ratio``."},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"NOTE: As of the 16.0.0 Pike release, this configuration option is ignored"},{"line_number":503,"context_line":"for the ironic.IronicDriver compute driver and is hardcoded to 1.0."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_09edf621","line":500,"range":{"start_line":500,"start_character":7,"end_line":500,"end_character":28},"updated":"2018-11-26 22:00:59.000000000","message":"same","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":497,"context_line":"the allocation ratio will not change. Once set to a non-default value, it is"},{"line_number":498,"context_line":"not possible to \"unset\" the config to get back to the default behavior. If you"},{"line_number":499,"context_line":"want to reset back to the default, explicitly specify it to the value of"},{"line_number":500,"context_line":"``CONF.disk_allocation_ratio``."},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"NOTE: As of the 16.0.0 Pike release, this configuration option is ignored"},{"line_number":503,"context_line":"for the ironic.IronicDriver compute driver and is hardcoded to 1.0."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_e5020f07","line":500,"range":{"start_line":500,"start_character":7,"end_line":500,"end_character":28},"in_reply_to":"3f79a3b5_09edf621","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"767569fe3adbed025cc5d4923ee31a6b9c45a073","unresolved":false,"context_lines":[{"line_number":395,"context_line":"per compute node. For AggregateCoreFilter, it will fall back to this"},{"line_number":396,"context_line":"configuration value if no per-aggregate setting is found."},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"NOTE: If this option is set to something *other than* ``None`` or ``0.0``, the"},{"line_number":399,"context_line":"allocation ratio will be overwritten to the value of this option, otherwise,"},{"line_number":400,"context_line":"the allocation ratio will not change. Once set to a non-default value, it is"},{"line_number":401,"context_line":"not possible to \"unset\" the config to get back to the default behavior. If you"},{"line_number":402,"context_line":"want to reset back to the default, explicitly specify it to the value of"},{"line_number":403,"context_line":"``initial_cpu_allocation_ratio``."},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"Possible values:"},{"line_number":406,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_7aca0a18","line":403,"range":{"start_line":398,"start_character":0,"end_line":403,"end_character":33},"updated":"2018-11-28 03:26:57.000000000","message":"I think this might be misleading as user might be confused about \"default(hardcoded default)\" and \"the value of initial_cpu_allocation_ratio(system default that admin can set)\", maybe it could be better to show here that the init_ratio will override the default value of this cofig and is set by admin?","commit_id":"ae4ec11510b4d4036e597cfe82e176fce4486571"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"a6cf933387a8c384887ce45281d386c4771ec5ca","unresolved":false,"context_lines":[{"line_number":395,"context_line":"per compute node. For AggregateCoreFilter, it will fall back to this"},{"line_number":396,"context_line":"configuration value if no per-aggregate setting is found."},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"NOTE: If this option is set to something *other than* ``None`` or ``0.0``, the"},{"line_number":399,"context_line":"allocation ratio will be overwritten to the value of this option, otherwise,"},{"line_number":400,"context_line":"the allocation ratio will not change. Once set to a non-default value, it is"},{"line_number":401,"context_line":"not possible to \"unset\" the config to get back to the default behavior. If you"},{"line_number":402,"context_line":"want to reset back to the default, explicitly specify it to the value of"},{"line_number":403,"context_line":"``initial_cpu_allocation_ratio``."},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"Possible values:"},{"line_number":406,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_4b6c2204","line":403,"range":{"start_line":398,"start_character":0,"end_line":403,"end_character":33},"in_reply_to":"3f79a3b5_7aca0a18","updated":"2018-11-28 08:39:23.000000000","message":"Done","commit_id":"ae4ec11510b4d4036e597cfe82e176fce4486571"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":431,"context_line":"the allocation ratio will not change. Once set to a non-default value, it is"},{"line_number":432,"context_line":"not possible to \"unset\" the config to get back to the default behavior. If you"},{"line_number":433,"context_line":"want to reset back to the initial value, explicitly specify it to the value of"},{"line_number":434,"context_line":"``initial_allocation_ratio``."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"Possible values:"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_291e6bbd","line":434,"range":{"start_line":434,"start_character":2,"end_line":434,"end_character":26},"updated":"2018-11-29 18:15:15.000000000","message":"initial_ram_allocation_ratio","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":431,"context_line":"the allocation ratio will not change. Once set to a non-default value, it is"},{"line_number":432,"context_line":"not possible to \"unset\" the config to get back to the default behavior. If you"},{"line_number":433,"context_line":"want to reset back to the initial value, explicitly specify it to the value of"},{"line_number":434,"context_line":"``initial_allocation_ratio``."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"Possible values:"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_7c5094d2","line":434,"range":{"start_line":434,"start_character":2,"end_line":434,"end_character":26},"in_reply_to":"3f79a3b5_291e6bbd","updated":"2018-11-30 10:03:58.000000000","message":"Done","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":478,"context_line":"\"\"\"),"},{"line_number":479,"context_line":"    cfg.FloatOpt(\u0027initial_cpu_allocation_ratio\u0027,"},{"line_number":480,"context_line":"                 default\u003d16.0,"},{"line_number":481,"context_line":"                 min\u003d0.0,"},{"line_number":482,"context_line":"                 help\u003d\"\"\""},{"line_number":483,"context_line":"This option helps you specify initial virtual CPU to physical CPU allocation"},{"line_number":484,"context_line":"ratio."}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_897e9fe0","line":481,"range":{"start_line":481,"start_character":17,"end_line":481,"end_character":24},"updated":"2018-11-29 18:15:15.000000000","message":"Again, we should determine if this is a valid minimum, or if this change (or one before it) should include a PositiveFloatOpt option type which requires min\u003e0. I\u0027ll confirm with Dan/Jay.\n\nUltimately I\u0027m not sure how much it really matters because if someone sets the allocation ratio below 1.0 they are probably doing it for very odd reasons.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eec9209e0f34168691ad8159c19b0fa2f9d2249c","unresolved":false,"context_lines":[{"line_number":478,"context_line":"\"\"\"),"},{"line_number":479,"context_line":"    cfg.FloatOpt(\u0027initial_cpu_allocation_ratio\u0027,"},{"line_number":480,"context_line":"                 default\u003d16.0,"},{"line_number":481,"context_line":"                 min\u003d0.0,"},{"line_number":482,"context_line":"                 help\u003d\"\"\""},{"line_number":483,"context_line":"This option helps you specify initial virtual CPU to physical CPU allocation"},{"line_number":484,"context_line":"ratio."}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_acfb69c3","line":481,"range":{"start_line":481,"start_character":17,"end_line":481,"end_character":24},"in_reply_to":"3f79a3b5_897e9fe0","updated":"2018-11-29 18:21:25.000000000","message":"I really think it\u0027s not a big enough deal to implement a new config type, either in nova or oslo.\n\nSetting this to 0.1 would be completely reasonable. Setting it to 0 and just ignoring (with logging) it if it\u0027s zero (i.e. ignore and treat as 1.0) would be plenty to me.\n\nIf we really really have to have validation, then I\u0027d say do it in nova and not oslo as it seems like a super niche use case to me.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c10cb8e447c69b3c92936124d356fa6511b83d51","unresolved":false,"context_lines":[{"line_number":478,"context_line":"\"\"\"),"},{"line_number":479,"context_line":"    cfg.FloatOpt(\u0027initial_cpu_allocation_ratio\u0027,"},{"line_number":480,"context_line":"                 default\u003d16.0,"},{"line_number":481,"context_line":"                 min\u003d0.0,"},{"line_number":482,"context_line":"                 help\u003d\"\"\""},{"line_number":483,"context_line":"This option helps you specify initial virtual CPU to physical CPU allocation"},{"line_number":484,"context_line":"ratio."}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_cf7fb766","line":481,"range":{"start_line":481,"start_character":17,"end_line":481,"end_character":24},"in_reply_to":"3f79a3b5_acfb69c3","updated":"2018-11-29 19:01:30.000000000","message":"OK, then I\u0027d say let\u0027s just leave min\u003d0.0 and forget about doing a new option type, and I also probably wouldn\u0027t even check if 0.0 is used in the code. If someone does that, they\u0027ll find out quick if they caused some issue. We could always change the min validation later if it\u0027s a problem.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":482,"context_line":"                 help\u003d\"\"\""},{"line_number":483,"context_line":"This option helps you specify initial virtual CPU to physical CPU allocation"},{"line_number":484,"context_line":"ratio."},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"This is only used when initially creating the ``computes_nodes`` table record"},{"line_number":487,"context_line":"for a given nova-compute service."},{"line_number":488,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_a9e6fbb1","line":485,"updated":"2018-11-29 18:15:15.000000000","message":"I would think we probably want to work in some wording about why this exists separately from the cpu_allocation_ratio option and how they are used logically.\n\nMeaning, it\u0027s really here for two use cases:\n\n1. I want to control allocation ratios per compute via config. To do that, I will always control that via the cpu_allocation_ratio option as an override to the initial value (defined in this option).\n\n2. I want to control allocation ratios per compute node resource provider in the placement service using that REST API rather than configuration and not have the nova-compute service overwrite those values, set via the placement API, based on the config values in nova.conf. In this case, the cpu_allocation_ratio and related options for ram/disk should not be used as they will overwrite anything set on the resource provider inventory record via the placement API.\n\n--\n\nIf this is too much detail for a config option help, then we should probably document this elsewhere in the docs and link to it from the config option help, since the scenarios are a bit confusing and should be clearly stated about how the system works (and that was also noted in the spec: https://specs.openstack.org/openstack/nova-specs/specs/stein/approved/initial-allocation-ratios.html#documentation-impact ) - if you\u0027re going to follow up with the docs change then that\u0027s fine, but I think we should refer to it from the help text here for more details.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":482,"context_line":"                 help\u003d\"\"\""},{"line_number":483,"context_line":"This option helps you specify initial virtual CPU to physical CPU allocation"},{"line_number":484,"context_line":"ratio."},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"This is only used when initially creating the ``computes_nodes`` table record"},{"line_number":487,"context_line":"for a given nova-compute service."},{"line_number":488,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_3c6a1c83","line":485,"in_reply_to":"3f79a3b5_a9e6fbb1","updated":"2018-11-30 10:03:58.000000000","message":"OK, I will add it in follow up","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":484,"context_line":"ratio."},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"This is only used when initially creating the ``computes_nodes`` table record"},{"line_number":487,"context_line":"for a given nova-compute service."},{"line_number":488,"context_line":"\"\"\"),"},{"line_number":489,"context_line":"    cfg.FloatOpt(\u0027initial_ram_allocation_ratio\u0027,"},{"line_number":490,"context_line":"                 default\u003d1.5,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_a96fdb2d","line":487,"updated":"2018-11-29 18:15:15.000000000","message":"Add:\n\nRelated options:\n\n* ``cpu_allocation_ratio``\n\n--\n\nsame for ram and disk below","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":484,"context_line":"ratio."},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"This is only used when initially creating the ``computes_nodes`` table record"},{"line_number":487,"context_line":"for a given nova-compute service."},{"line_number":488,"context_line":"\"\"\"),"},{"line_number":489,"context_line":"    cfg.FloatOpt(\u0027initial_ram_allocation_ratio\u0027,"},{"line_number":490,"context_line":"                 default\u003d1.5,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_3cef7cfc","line":487,"in_reply_to":"3f79a3b5_a96fdb2d","updated":"2018-11-30 10:03:58.000000000","message":"Done","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"}],"nova/tests/functional/compute/test_resource_tracker.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    compute_driver \u003d \u0027fake.FakeDriver\u0027"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def setUp(self):"},{"line_number":279,"context_line":"        super(TestUpdateComputeNodeReservedAndAllocationRatio, self).setUp()"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        driver \u003d mock.MagicMock(autospec\u003dvirt_driver.ComputeDriver)"},{"line_number":282,"context_line":"        driver.node_is_available.return_value \u003d True"},{"line_number":283,"context_line":"        driver.update_provider_tree.side_effect \u003d NotImplementedError"},{"line_number":284,"context_line":"        self.driver_mock \u003d driver"},{"line_number":285,"context_line":"        self.rt \u003d resource_tracker.ResourceTracker(COMPUTE_HOST, driver)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    @staticmethod"},{"line_number":288,"context_line":"    def _get_reserved_host_values_from_config():"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_c92c97b3","line":285,"range":{"start_line":278,"start_character":4,"end_line":285,"end_character":72},"updated":"2018-11-29 18:15:15.000000000","message":"Why is this needed? With this, the FakeDriver.update_provider_tree isn\u0027t used at all, and that was updated specifically for this functional test originally in change: I72c83a95dabd581998470edb9543079acb6536a5\n\nI assume this is because of something with the new tests? If that is the case, then can we make it work with the FakeDriver instead? Or simply stub something out in the tests that rely on the mock? The RT thing only needs to be in the last test as well, the other tests don\u0027t use that.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    compute_driver \u003d \u0027fake.FakeDriver\u0027"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def setUp(self):"},{"line_number":279,"context_line":"        super(TestUpdateComputeNodeReservedAndAllocationRatio, self).setUp()"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        driver \u003d mock.MagicMock(autospec\u003dvirt_driver.ComputeDriver)"},{"line_number":282,"context_line":"        driver.node_is_available.return_value \u003d True"},{"line_number":283,"context_line":"        driver.update_provider_tree.side_effect \u003d NotImplementedError"},{"line_number":284,"context_line":"        self.driver_mock \u003d driver"},{"line_number":285,"context_line":"        self.rt \u003d resource_tracker.ResourceTracker(COMPUTE_HOST, driver)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    @staticmethod"},{"line_number":288,"context_line":"    def _get_reserved_host_values_from_config():"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_dc29a839","line":285,"range":{"start_line":278,"start_character":4,"end_line":285,"end_character":72},"in_reply_to":"3f79a3b5_c92c97b3","updated":"2018-11-30 10:03:58.000000000","message":"oops, it\u0027s a bad copy paste.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":411,"context_line":"            self.assertEqual(ratio, inventories[rc][\u0027allocation_ratio\u0027],"},{"line_number":412,"context_line":"                             \u0027Unexpected allocation ratio for %s\u0027 % rc)"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"    def test_allocation_ratio_overwritten_from_config(self):"},{"line_number":415,"context_line":"        # NOTE(yikun): This test case includes below step:"},{"line_number":416,"context_line":"        # 1. Overwrite the allocation_ratio via the placement API directly -"},{"line_number":417,"context_line":"        #    run the RT.update_available_resource periodic and assert the"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_ccfa650f","line":414,"range":{"start_line":414,"start_character":8,"end_line":414,"end_character":53},"updated":"2018-11-29 18:15:15.000000000","message":"nice test","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"        rt \u003d compute_service.manager._get_resource_tracker()"},{"line_number":427,"context_line":"        rt.update_available_resource(ctxt, \u0027fake-host\u0027)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"        inv \u003d self.placement_api.get("},{"line_number":430,"context_line":"            \u0027/resource_providers/%s/inventories\u0027 % rp_uuid).body"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_291bcb85","line":427,"range":{"start_line":427,"start_character":8,"end_line":427,"end_character":55},"updated":"2018-11-29 18:15:15.000000000","message":"I\u0027m not sure you need this since it would be run on initial startup of the nova-compute service anyway:\n\nhttps://github.com/openstack/nova/blob/8c318d0fb20fdfe0ae8e203245e4d4d6668c8a44/nova/compute/manager.py#L1257","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"        rt \u003d compute_service.manager._get_resource_tracker()"},{"line_number":427,"context_line":"        rt.update_available_resource(ctxt, \u0027fake-host\u0027)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"        inv \u003d self.placement_api.get("},{"line_number":430,"context_line":"            \u0027/resource_providers/%s/inventories\u0027 % rp_uuid).body"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_1c0f20d5","line":427,"range":{"start_line":427,"start_character":8,"end_line":427,"end_character":55},"in_reply_to":"3f79a3b5_291bcb85","updated":"2018-11-30 10:03:58.000000000","message":"Yes, this is redundant.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"87323f5b439c3138d14bfc2edb87dd1b3a15cb6b","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        rt \u003d compute_service.manager._get_resource_tracker()"},{"line_number":427,"context_line":"        rt.update_available_resource(ctxt, \u0027fake-host\u0027)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"        inv \u003d self.placement_api.get("},{"line_number":430,"context_line":"            \u0027/resource_providers/%s/inventories\u0027 % rp_uuid).body"},{"line_number":431,"context_line":"        ratios \u003d {\u0027VCPU\u0027: 16.1, \u0027MEMORY_MB\u0027: 1.6, \u0027DISK_GB\u0027: 1.1}"},{"line_number":432,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_f7403d36","line":429,"updated":"2018-11-30 07:43:33.000000000","message":"probably add assertions about the value is equal to default initial_allocation_ratio before update from placement API could make it a more perfect test?","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"532aa828b86eb23b5bf9eb9e2d451f379c149950","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        # The reserved host values should also come from config."},{"line_number":364,"context_line":"        self._assert_reserved_inventory(inventories)"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def test_allocation_ratio_create_with_initial_allocation_ratio(self):"},{"line_number":367,"context_line":"        # The xxx_allocation_ratio is set to None by default, and we use"},{"line_number":368,"context_line":"        # 16.1/1.6/1.1 since disk_allocation_ratio defaults to 16.0/1.5/1.0."},{"line_number":369,"context_line":"        self.flags(initial_cpu_allocation_ratio\u003d16.1)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_d2c74810","line":366,"range":{"start_line":366,"start_character":8,"end_line":366,"end_character":66},"updated":"2018-11-30 19:24:05.000000000","message":"I still tend to think this is redundant but it\u0027s OK to leave it.","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"71bac6873ebc03468bd4ea9dc23711b0510aaf84","unresolved":false,"context_lines":[{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def test_allocation_ratio_create_with_initial_allocation_ratio(self):"},{"line_number":367,"context_line":"        # The xxx_allocation_ratio is set to None by default, and we use"},{"line_number":368,"context_line":"        # 16.1/1.6/1.1 since disk_allocation_ratio defaults to 16.0/1.5/1.0."},{"line_number":369,"context_line":"        self.flags(initial_cpu_allocation_ratio\u003d16.1)"},{"line_number":370,"context_line":"        self.flags(initial_ram_allocation_ratio\u003d1.6)"},{"line_number":371,"context_line":"        self.flags(initial_disk_allocation_ratio\u003d1.1)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_5ab0f1df","line":368,"range":{"start_line":368,"start_character":29,"end_line":368,"end_character":76},"updated":"2018-12-04 15:15:08.000000000","message":"this should read \"since initial_xxx_allocation_ratio values default to 16.0/1.5/1.0\".","commit_id":"08f3ae960623c94bdd997cacb3e81f04b4bbba69"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"71bac6873ebc03468bd4ea9dc23711b0510aaf84","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        # provider in the placement service."},{"line_number":374,"context_line":"        self._start_compute(\u0027fake-host\u0027)"},{"line_number":375,"context_line":"        # Assert the compute node resource provider exists in placement with"},{"line_number":376,"context_line":"        # the default reserved and allocation ratio values from config."},{"line_number":377,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(\u0027fake-host\u0027)"},{"line_number":378,"context_line":"        inventories \u003d self._get_provider_inventory(rp_uuid)"},{"line_number":379,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_fabe9dae","line":376,"range":{"start_line":376,"start_character":22,"end_line":376,"end_character":35},"updated":"2018-12-04 15:15:08.000000000","message":"technically, you\u0027re not testing anything about reserved amounts in this test case.","commit_id":"08f3ae960623c94bdd997cacb3e81f04b4bbba69"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d9a71943d02951e57da00b9ab61b79e8d11069e8","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        # provider in the placement service."},{"line_number":374,"context_line":"        self._start_compute(\u0027fake-host\u0027)"},{"line_number":375,"context_line":"        # Assert the compute node resource provider exists in placement with"},{"line_number":376,"context_line":"        # the default reserved and allocation ratio values from config."},{"line_number":377,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(\u0027fake-host\u0027)"},{"line_number":378,"context_line":"        inventories \u003d self._get_provider_inventory(rp_uuid)"},{"line_number":379,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_753db4b7","line":376,"range":{"start_line":376,"start_character":22,"end_line":376,"end_character":35},"in_reply_to":"3f79a3b5_fabe9dae","updated":"2018-12-04 21:00:50.000000000","message":"Yeah, copy/paste from existing tests above.","commit_id":"08f3ae960623c94bdd997cacb3e81f04b4bbba69"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"71bac6873ebc03468bd4ea9dc23711b0510aaf84","unresolved":false,"context_lines":[{"line_number":465,"context_line":"            self.assertIn(rc, inv)"},{"line_number":466,"context_line":"            self.assertIn(\u0027allocation_ratio\u0027, inv[rc])"},{"line_number":467,"context_line":"            self.assertEqual(ratio, inv[rc][\u0027allocation_ratio\u0027],"},{"line_number":468,"context_line":"                             \u0027Unexpected allocation ratio for %s\u0027 % rc)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_daf16199","line":468,"updated":"2018-12-04 15:15:08.000000000","message":"++ good test, Yikun.","commit_id":"08f3ae960623c94bdd997cacb3e81f04b4bbba69"}],"nova/tests/functional/integrated_helpers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            url\u003d\u0027/resource_providers\u0027,"},{"line_number":478,"context_line":"            version\u003d\u00271.20\u0027, body\u003d{\u0027name\u0027: rp_name}).body"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def _set_inventory(self, rp_uuid, inv_body):"},{"line_number":481,"context_line":"        \"\"\"This will set the inventory for a given resource provider."},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"        :param rp_uuid: UUID of the resource provider to update"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_8c046d15","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":22},"updated":"2018-11-29 18:15:15.000000000","message":"Why not just use this?","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            url\u003d\u0027/resource_providers\u0027,"},{"line_number":478,"context_line":"            version\u003d\u00271.20\u0027, body\u003d{\u0027name\u0027: rp_name}).body"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def _set_inventory(self, rp_uuid, inv_body):"},{"line_number":481,"context_line":"        \"\"\"This will set the inventory for a given resource provider."},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"        :param rp_uuid: UUID of the resource provider to update"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_bcc94c87","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":22},"in_reply_to":"3f79a3b5_8c046d15","updated":"2018-11-30 10:03:58.000000000","message":"This is a POST method to create inv, but the PUT method is to update inventory","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"37afdfa7e06ea6aac744ae8f074500c611cf7552","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            url\u003d\u0027/resource_providers\u0027,"},{"line_number":478,"context_line":"            version\u003d\u00271.20\u0027, body\u003d{\u0027name\u0027: rp_name}).body"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def _set_inventory(self, rp_uuid, inv_body):"},{"line_number":481,"context_line":"        \"\"\"This will set the inventory for a given resource provider."},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"        :param rp_uuid: UUID of the resource provider to update"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_1270600f","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":22},"in_reply_to":"3f79a3b5_bcc94c87","updated":"2018-11-30 16:07:02.000000000","message":"Sure, but I think the POST can also be used to overwrite what\u0027s already there, right? I think they are similar operations except POST is a full overwrite whereas PUT might just update parts of the inventory based on resource class? But for how you\u0027re using it, I think they are functionally equivalent.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":1238,"context_line":"            # NOTE(sbauza): ResourceTracker adds host field"},{"line_number":1239,"context_line":"            host\u003d_HOSTNAME,"},{"line_number":1240,"context_line":"            # NOTE(sbauza): ResourceTracker adds CONF allocation ratios"},{"line_number":1241,"context_line":"            ram_allocation_ratio\u003dCONF.initial_ram_allocation_ratio,"},{"line_number":1242,"context_line":"            cpu_allocation_ratio\u003dCONF.initial_cpu_allocation_ratio,"},{"line_number":1243,"context_line":"            disk_allocation_ratio\u003dCONF.initial_disk_allocation_ratio,"},{"line_number":1244,"context_line":"            stats\u003d{\u0027failed_builds\u0027: 0},"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_ac436946","line":1241,"updated":"2018-11-29 18:15:15.000000000","message":"Hmm, isn\u0027t whatever test is using this then redundant with the new test_allocation_ratio_create_with_initial_allocation_ratio in the functional tests? In other words, do we need test_allocation_ratio_create_with_initial_allocation_ratio when we already have this unit test?","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":1238,"context_line":"            # NOTE(sbauza): ResourceTracker adds host field"},{"line_number":1239,"context_line":"            host\u003d_HOSTNAME,"},{"line_number":1240,"context_line":"            # NOTE(sbauza): ResourceTracker adds CONF allocation ratios"},{"line_number":1241,"context_line":"            ram_allocation_ratio\u003dCONF.initial_ram_allocation_ratio,"},{"line_number":1242,"context_line":"            cpu_allocation_ratio\u003dCONF.initial_cpu_allocation_ratio,"},{"line_number":1243,"context_line":"            disk_allocation_ratio\u003dCONF.initial_disk_allocation_ratio,"},{"line_number":1244,"context_line":"            stats\u003d{\u0027failed_builds\u0027: 0},"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_dc9c4871","line":1241,"in_reply_to":"3f79a3b5_ac436946","updated":"2018-11-30 10:03:58.000000000","message":"emm, my understand is that this is a test to make sure the compute node record is our expected, but I added initial case is to make sure both inv record and compute node are expected.\n\n[1] https://review.openstack.org/#/c/602804/12/nova/tests/functional/compute/test_resource_tracker.py@411","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"37afdfa7e06ea6aac744ae8f074500c611cf7552","unresolved":false,"context_lines":[{"line_number":1238,"context_line":"            # NOTE(sbauza): ResourceTracker adds host field"},{"line_number":1239,"context_line":"            host\u003d_HOSTNAME,"},{"line_number":1240,"context_line":"            # NOTE(sbauza): ResourceTracker adds CONF allocation ratios"},{"line_number":1241,"context_line":"            ram_allocation_ratio\u003dCONF.initial_ram_allocation_ratio,"},{"line_number":1242,"context_line":"            cpu_allocation_ratio\u003dCONF.initial_cpu_allocation_ratio,"},{"line_number":1243,"context_line":"            disk_allocation_ratio\u003dCONF.initial_disk_allocation_ratio,"},{"line_number":1244,"context_line":"            stats\u003d{\u0027failed_builds\u0027: 0},"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_526d782e","line":1241,"in_reply_to":"3f79a3b5_dc9c4871","updated":"2018-11-30 16:07:02.000000000","message":"Sure, but I think we can assume that the inventory record is going to be whatever is in the compute node record during the initial create, and we already have functional tests for that. It just seems very redundant to me.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":1267,"context_line":"        else:"},{"line_number":1268,"context_line":"            get_by_hypervisor_mock.assert_not_called()"},{"line_number":1269,"context_line":"        create_mock.assert_called_once_with()"},{"line_number":1270,"context_line":"        self.assertTrue(obj_base.obj_equal_prims(expected_compute, cn))"},{"line_number":1271,"context_line":"        pci_tracker_mock.assert_called_once_with(mock.sentinel.ctx,"},{"line_number":1272,"context_line":"                                                 42)"},{"line_number":1273,"context_line":"        self.assertFalse(update_mock.called)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_ac6cc9d2","line":1270,"range":{"start_line":1270,"start_character":8,"end_line":1270,"end_character":71},"updated":"2018-11-29 18:15:15.000000000","message":"This is what asserts the initial allocation ratio config values are used, so yeah I don\u0027t think we probably need that new functional test for this do we?","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":1267,"context_line":"        else:"},{"line_number":1268,"context_line":"            get_by_hypervisor_mock.assert_not_called()"},{"line_number":1269,"context_line":"        create_mock.assert_called_once_with()"},{"line_number":1270,"context_line":"        self.assertTrue(obj_base.obj_equal_prims(expected_compute, cn))"},{"line_number":1271,"context_line":"        pci_tracker_mock.assert_called_once_with(mock.sentinel.ctx,"},{"line_number":1272,"context_line":"                                                 42)"},{"line_number":1273,"context_line":"        self.assertFalse(update_mock.called)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_1c92c056","line":1270,"range":{"start_line":1270,"start_character":8,"end_line":1270,"end_character":71},"in_reply_to":"3f79a3b5_ac6cc9d2","updated":"2018-11-30 10:03:58.000000000","message":"see above","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":21037,"context_line":"\u003c/cpu\u003e"},{"line_number":21038,"context_line":"\u0027\u0027\u0027], 1)"},{"line_number":21039,"context_line":""},{"line_number":21040,"context_line":"    def test_get_ratio(self):"},{"line_number":21041,"context_line":"        conf \u003d 16.1"},{"line_number":21042,"context_line":"        init_conf \u003d 15.9"},{"line_number":21043,"context_line":"        inv \u003d {\u0027VCPU\u0027: {\u0027allocation_ratio\u0027: 16.0}}"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_0c57fdf7","line":21040,"updated":"2018-11-29 18:15:15.000000000","message":"This will move to nova.tests.unit.virt.test_driver when you move it up into the base class.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"}],"nova/tests/unit/virt/powervm/test_driver.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"71bac6873ebc03468bd4ea9dc23711b0510aaf84","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        # and aggregates/traits alone."},{"line_number":220,"context_line":"        with self._update_provider_tree() as (ptree, exp_inv):"},{"line_number":221,"context_line":"            ptree.update_inventory(\u0027compute_host\u0027, {"},{"line_number":222,"context_line":"                # these should get blown away"},{"line_number":223,"context_line":"                \u0027VCPU\u0027: {"},{"line_number":224,"context_line":"                    \u0027total\u0027: 16,"},{"line_number":225,"context_line":"                    \u0027max_unit\u0027: 2,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_1a7b59f3","line":222,"range":{"start_line":222,"start_character":16,"end_line":222,"end_character":45},"updated":"2018-12-04 15:15:08.000000000","message":"this isn\u0027t accurate any more is it?","commit_id":"08f3ae960623c94bdd997cacb3e81f04b4bbba69"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d9a71943d02951e57da00b9ab61b79e8d11069e8","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        # and aggregates/traits alone."},{"line_number":220,"context_line":"        with self._update_provider_tree() as (ptree, exp_inv):"},{"line_number":221,"context_line":"            ptree.update_inventory(\u0027compute_host\u0027, {"},{"line_number":222,"context_line":"                # these should get blown away"},{"line_number":223,"context_line":"                \u0027VCPU\u0027: {"},{"line_number":224,"context_line":"                    \u0027total\u0027: 16,"},{"line_number":225,"context_line":"                    \u0027max_unit\u0027: 2,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_f56a24b2","line":222,"range":{"start_line":222,"start_character":16,"end_line":222,"end_character":45},"in_reply_to":"3f79a3b5_1a7b59f3","updated":"2018-12-04 21:00:50.000000000","message":"Yeah I think that\u0027s correct.","commit_id":"08f3ae960623c94bdd997cacb3e81f04b4bbba69"}],"nova/tests/unit/virt/test_virt_drivers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"532aa828b86eb23b5bf9eb9e2d451f379c149950","unresolved":false,"context_lines":[{"line_number":826,"context_line":"        self.assertEqual(expeced_ratios,"},{"line_number":827,"context_line":"                         self.connection._get_allocation_ratios(inv))"},{"line_number":828,"context_line":""},{"line_number":829,"context_line":"        self.connection._get_allocation_ratios(inv)"},{"line_number":830,"context_line":"        self.flags(cpu_allocation_ratio\u003dNone)"},{"line_number":831,"context_line":"        self.flags(ram_allocation_ratio\u003dNone)"},{"line_number":832,"context_line":"        self.flags(disk_allocation_ratio\u003dNone)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_756adbea","line":829,"range":{"start_line":829,"start_character":8,"end_line":829,"end_character":51},"updated":"2018-11-30 19:24:05.000000000","message":"copy/paste error?","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":826,"context_line":"        self.assertEqual(expeced_ratios,"},{"line_number":827,"context_line":"                         self.connection._get_allocation_ratios(inv))"},{"line_number":828,"context_line":""},{"line_number":829,"context_line":"        self.connection._get_allocation_ratios(inv)"},{"line_number":830,"context_line":"        self.flags(cpu_allocation_ratio\u003dNone)"},{"line_number":831,"context_line":"        self.flags(ram_allocation_ratio\u003dNone)"},{"line_number":832,"context_line":"        self.flags(disk_allocation_ratio\u003dNone)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_f3fcc375","line":829,"range":{"start_line":829,"start_character":8,"end_line":829,"end_character":51},"in_reply_to":"3f79a3b5_756adbea","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"}],"nova/virt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"532aa828b86eb23b5bf9eb9e2d451f379c149950","unresolved":false,"context_lines":[{"line_number":859,"context_line":"        raise NotImplementedError()"},{"line_number":860,"context_line":""},{"line_number":861,"context_line":"    @staticmethod"},{"line_number":862,"context_line":"    def _get_reserved_host_disk_gb_from_config():"},{"line_number":863,"context_line":"        import nova.compute.utils as compute_utils  # avoid circular import"},{"line_number":864,"context_line":"        return compute_utils.convert_mb_to_ceil_gb(CONF.reserved_host_disk_mb)"},{"line_number":865,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_959537e5","line":862,"range":{"start_line":862,"start_character":8,"end_line":862,"end_character":46},"updated":"2018-11-30 19:24:05.000000000","message":"nit: move the new helper method closer to this since they are somewhat related.","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":859,"context_line":"        raise NotImplementedError()"},{"line_number":860,"context_line":""},{"line_number":861,"context_line":"    @staticmethod"},{"line_number":862,"context_line":"    def _get_reserved_host_disk_gb_from_config():"},{"line_number":863,"context_line":"        import nova.compute.utils as compute_utils  # avoid circular import"},{"line_number":864,"context_line":"        return compute_utils.convert_mb_to_ceil_gb(CONF.reserved_host_disk_mb)"},{"line_number":865,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_b32babe7","line":862,"range":{"start_line":862,"start_character":8,"end_line":862,"end_character":46},"in_reply_to":"3f79a3b5_959537e5","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"532aa828b86eb23b5bf9eb9e2d451f379c149950","unresolved":false,"context_lines":[{"line_number":1746,"context_line":"        \"\"\""},{"line_number":1747,"context_line":"        return instance.get(\u0027host\u0027)"},{"line_number":1748,"context_line":""},{"line_number":1749,"context_line":"    def _get_allocation_ratios(self, inventory):"},{"line_number":1750,"context_line":"        \"\"\"Get the allocation ratios."},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"        :param inventory: dict, keyed by resource class, of inventory"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_3586a3b9","line":1749,"range":{"start_line":1749,"start_character":8,"end_line":1749,"end_character":30},"updated":"2018-11-30 19:24:05.000000000","message":"nit: This could be a staticmethod.","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":1746,"context_line":"        \"\"\""},{"line_number":1747,"context_line":"        return instance.get(\u0027host\u0027)"},{"line_number":1748,"context_line":""},{"line_number":1749,"context_line":"    def _get_allocation_ratios(self, inventory):"},{"line_number":1750,"context_line":"        \"\"\"Get the allocation ratios."},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"        :param inventory: dict, keyed by resource class, of inventory"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_d330a757","line":1749,"range":{"start_line":1749,"start_character":8,"end_line":1749,"end_character":30},"in_reply_to":"3f79a3b5_3586a3b9","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"532aa828b86eb23b5bf9eb9e2d451f379c149950","unresolved":false,"context_lines":[{"line_number":1748,"context_line":""},{"line_number":1749,"context_line":"    def _get_allocation_ratios(self, inventory):"},{"line_number":1750,"context_line":"        \"\"\"Get the allocation ratios."},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"        :param inventory: dict, keyed by resource class, of inventory"},{"line_number":1753,"context_line":"                          information."},{"line_number":1754,"context_line":"        :returns: Return a dict, keyed by resource class, of allocation ratio"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_55a8ff20","line":1751,"updated":"2018-11-30 19:24:05.000000000","message":"nit: this could explain how the allocation ratio is calculated.","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":1748,"context_line":""},{"line_number":1749,"context_line":"    def _get_allocation_ratios(self, inventory):"},{"line_number":1750,"context_line":"        \"\"\"Get the allocation ratios."},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"        :param inventory: dict, keyed by resource class, of inventory"},{"line_number":1753,"context_line":"                          information."},{"line_number":1754,"context_line":"        :returns: Return a dict, keyed by resource class, of allocation ratio"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_73351344","line":1751,"in_reply_to":"3f79a3b5_55a8ff20","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"532aa828b86eb23b5bf9eb9e2d451f379c149950","unresolved":false,"context_lines":[{"line_number":1760,"context_line":"        for res, rc in keys.items():"},{"line_number":1761,"context_line":"            attr \u003d \u0027%s_allocation_ratio\u0027 % res"},{"line_number":1762,"context_line":"            conf_ratio \u003d getattr(CONF, attr)"},{"line_number":1763,"context_line":"            if conf_ratio:"},{"line_number":1764,"context_line":"                result[rc] \u003d conf_ratio"},{"line_number":1765,"context_line":"            elif rc not in inventory:"},{"line_number":1766,"context_line":"                result[rc] \u003d getattr(CONF, \u0027initial_%s\u0027 % attr)"},{"line_number":1767,"context_line":"            else:"},{"line_number":1768,"context_line":"                result[rc] \u003d inventory[rc][\u0027allocation_ratio\u0027]"},{"line_number":1769,"context_line":"        return result"},{"line_number":1770,"context_line":""},{"line_number":1771,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_d5596f68","line":1768,"range":{"start_line":1763,"start_character":12,"end_line":1768,"end_character":62},"updated":"2018-11-30 19:24:05.000000000","message":"Again, either comments here or in the docstring would be good about the logic and why it is in a given order.","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":1760,"context_line":"        for res, rc in keys.items():"},{"line_number":1761,"context_line":"            attr \u003d \u0027%s_allocation_ratio\u0027 % res"},{"line_number":1762,"context_line":"            conf_ratio \u003d getattr(CONF, attr)"},{"line_number":1763,"context_line":"            if conf_ratio:"},{"line_number":1764,"context_line":"                result[rc] \u003d conf_ratio"},{"line_number":1765,"context_line":"            elif rc not in inventory:"},{"line_number":1766,"context_line":"                result[rc] \u003d getattr(CONF, \u0027initial_%s\u0027 % attr)"},{"line_number":1767,"context_line":"            else:"},{"line_number":1768,"context_line":"                result[rc] \u003d inventory[rc][\u0027allocation_ratio\u0027]"},{"line_number":1769,"context_line":"        return result"},{"line_number":1770,"context_line":""},{"line_number":1771,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_93322f5b","line":1768,"range":{"start_line":1763,"start_character":12,"end_line":1768,"end_character":62},"in_reply_to":"3f79a3b5_d5596f68","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"71bac6873ebc03468bd4ea9dc23711b0510aaf84","unresolved":false,"context_lines":[{"line_number":863,"context_line":"        import nova.compute.utils as compute_utils  # avoid circular import"},{"line_number":864,"context_line":"        return compute_utils.convert_mb_to_ceil_gb(CONF.reserved_host_disk_mb)"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"    @staticmethod"},{"line_number":867,"context_line":"    def _get_allocation_ratios(inventory):"},{"line_number":868,"context_line":"        \"\"\"Get the cpu/ram/disk allocation ratios for the given inventory."},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_5ae8f17c","line":866,"range":{"start_line":866,"start_character":4,"end_line":866,"end_character":17},"updated":"2018-12-04 15:15:08.000000000","message":"Generally, I\u0027m not a fan of placing @staticmethods on base classes in this way. Better to put a method into nova/compute/utils.py module IMHO. Just a nit, though...","commit_id":"08f3ae960623c94bdd997cacb3e81f04b4bbba69"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d9a71943d02951e57da00b9ab61b79e8d11069e8","unresolved":false,"context_lines":[{"line_number":863,"context_line":"        import nova.compute.utils as compute_utils  # avoid circular import"},{"line_number":864,"context_line":"        return compute_utils.convert_mb_to_ceil_gb(CONF.reserved_host_disk_mb)"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"    @staticmethod"},{"line_number":867,"context_line":"    def _get_allocation_ratios(inventory):"},{"line_number":868,"context_line":"        \"\"\"Get the cpu/ram/disk allocation ratios for the given inventory."},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_755614fc","line":866,"range":{"start_line":866,"start_character":4,"end_line":866,"end_character":17},"in_reply_to":"3f79a3b5_5ae8f17c","updated":"2018-12-04 21:00:50.000000000","message":"I\u0027d prefer to keep it a non-public interface within the driver class than a public utility.","commit_id":"08f3ae960623c94bdd997cacb3e81f04b4bbba69"}],"nova/virt/fake.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        host_status[\u0027cpu_info\u0027] \u003d jsonutils.dumps(cpu_info)"},{"line_number":501,"context_line":"        return host_status"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def _get_ratio(self, inv, rc, conf_ratio, init_conf_ratio):"},{"line_number":504,"context_line":"        if conf_ratio:"},{"line_number":505,"context_line":"            return conf_ratio"},{"line_number":506,"context_line":"        elif rc not in inv:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_69a8e373","line":503,"range":{"start_line":503,"start_character":25,"end_line":503,"end_character":61},"updated":"2018-11-29 18:15:15.000000000","message":"Let\u0027s document these parameters in a docstring.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        host_status[\u0027cpu_info\u0027] \u003d jsonutils.dumps(cpu_info)"},{"line_number":501,"context_line":"        return host_status"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def _get_ratio(self, inv, rc, conf_ratio, init_conf_ratio):"},{"line_number":504,"context_line":"        if conf_ratio:"},{"line_number":505,"context_line":"            return conf_ratio"},{"line_number":506,"context_line":"        elif rc not in inv:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_a9fcbb74","line":503,"range":{"start_line":503,"start_character":8,"end_line":503,"end_character":18},"updated":"2018-11-29 18:15:15.000000000","message":"Let\u0027s rename the method to \"_get_allocation_ratios\" and incorporate all three resource classes as noted below.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        host_status[\u0027cpu_info\u0027] \u003d jsonutils.dumps(cpu_info)"},{"line_number":501,"context_line":"        return host_status"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def _get_ratio(self, inv, rc, conf_ratio, init_conf_ratio):"},{"line_number":504,"context_line":"        if conf_ratio:"},{"line_number":505,"context_line":"            return conf_ratio"},{"line_number":506,"context_line":"        elif rc not in inv:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_fc4fc48a","line":503,"range":{"start_line":503,"start_character":25,"end_line":503,"end_character":61},"in_reply_to":"3f79a3b5_69a8e373","updated":"2018-11-30 10:03:58.000000000","message":"Done","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        host_status[\u0027cpu_info\u0027] \u003d jsonutils.dumps(cpu_info)"},{"line_number":501,"context_line":"        return host_status"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def _get_ratio(self, inv, rc, conf_ratio, init_conf_ratio):"},{"line_number":504,"context_line":"        if conf_ratio:"},{"line_number":505,"context_line":"            return conf_ratio"},{"line_number":506,"context_line":"        elif rc not in inv:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_5c53583c","line":503,"range":{"start_line":503,"start_character":8,"end_line":503,"end_character":18},"in_reply_to":"3f79a3b5_a9fcbb74","updated":"2018-11-30 10:03:58.000000000","message":"Done","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        host_status[\u0027cpu_info\u0027] \u003d jsonutils.dumps(cpu_info)"},{"line_number":501,"context_line":"        return host_status"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def _get_ratio(self, inv, rc, conf_ratio, init_conf_ratio):"},{"line_number":504,"context_line":"        if conf_ratio:"},{"line_number":505,"context_line":"            return conf_ratio"},{"line_number":506,"context_line":"        elif rc not in inv:"},{"line_number":507,"context_line":"            return init_conf_ratio"},{"line_number":508,"context_line":"        else:"},{"line_number":509,"context_line":"            return inv[rc][\u0027allocation_ratio\u0027]"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def update_provider_tree(self, provider_tree, nodename, allocations\u003dNone):"},{"line_number":512,"context_line":"        # NOTE(yikun): If the inv record does not exists, the allocation_ratio"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_29998b6b","line":509,"range":{"start_line":503,"start_character":3,"end_line":509,"end_character":46},"updated":"2018-11-29 18:15:15.000000000","message":"This is common code across three drivers (you missed powervm: https://github.com/openstack/nova/blob/8c318d0fb20fdfe0ae8e203245e4d4d6668c8a44/nova/virt/powervm/driver.py#L198), so let\u0027s pull it up into the ComputeDriver (parent class) interface.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        host_status[\u0027cpu_info\u0027] \u003d jsonutils.dumps(cpu_info)"},{"line_number":501,"context_line":"        return host_status"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"    def _get_ratio(self, inv, rc, conf_ratio, init_conf_ratio):"},{"line_number":504,"context_line":"        if conf_ratio:"},{"line_number":505,"context_line":"            return conf_ratio"},{"line_number":506,"context_line":"        elif rc not in inv:"},{"line_number":507,"context_line":"            return init_conf_ratio"},{"line_number":508,"context_line":"        else:"},{"line_number":509,"context_line":"            return inv[rc][\u0027allocation_ratio\u0027]"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def update_provider_tree(self, provider_tree, nodename, allocations\u003dNone):"},{"line_number":512,"context_line":"        # NOTE(yikun): If the inv record does not exists, the allocation_ratio"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_3c569c2e","line":509,"range":{"start_line":503,"start_character":3,"end_line":509,"end_character":46},"in_reply_to":"3f79a3b5_29998b6b","updated":"2018-11-30 10:03:58.000000000","message":"Yes, done","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":511,"context_line":"    def update_provider_tree(self, provider_tree, nodename, allocations\u003dNone):"},{"line_number":512,"context_line":"        # NOTE(yikun): If the inv record does not exists, the allocation_ratio"},{"line_number":513,"context_line":"        # will use the CONF.xxx_allocation_ratio value if xxx_allocation_ratio"},{"line_number":514,"context_line":"        # is non-None or non-0.0, and fallback to use the"},{"line_number":515,"context_line":"        # initial_xxx_allocation_ratio otherwise."},{"line_number":516,"context_line":"        inv \u003d provider_tree.data(nodename).inventory"},{"line_number":517,"context_line":"        cpu_ratio \u003d self._get_ratio(inv, rc_fields.ResourceClass.VCPU,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_09b92fc4","line":514,"range":{"start_line":514,"start_character":13,"end_line":514,"end_character":32},"updated":"2018-11-29 18:15:15.000000000","message":"let\u0027s just simplify this and say \"is set\".","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":511,"context_line":"    def update_provider_tree(self, provider_tree, nodename, allocations\u003dNone):"},{"line_number":512,"context_line":"        # NOTE(yikun): If the inv record does not exists, the allocation_ratio"},{"line_number":513,"context_line":"        # will use the CONF.xxx_allocation_ratio value if xxx_allocation_ratio"},{"line_number":514,"context_line":"        # is non-None or non-0.0, and fallback to use the"},{"line_number":515,"context_line":"        # initial_xxx_allocation_ratio otherwise."},{"line_number":516,"context_line":"        inv \u003d provider_tree.data(nodename).inventory"},{"line_number":517,"context_line":"        cpu_ratio \u003d self._get_ratio(inv, rc_fields.ResourceClass.VCPU,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_9c41f065","line":514,"range":{"start_line":514,"start_character":13,"end_line":514,"end_character":32},"in_reply_to":"3f79a3b5_09b92fc4","updated":"2018-11-30 10:03:58.000000000","message":"Done","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        # is non-None or non-0.0, and fallback to use the"},{"line_number":515,"context_line":"        # initial_xxx_allocation_ratio otherwise."},{"line_number":516,"context_line":"        inv \u003d provider_tree.data(nodename).inventory"},{"line_number":517,"context_line":"        cpu_ratio \u003d self._get_ratio(inv, rc_fields.ResourceClass.VCPU,"},{"line_number":518,"context_line":"                                    CONF.cpu_allocation_ratio,"},{"line_number":519,"context_line":"                                    CONF.initial_cpu_allocation_ratio)"},{"line_number":520,"context_line":"        ram_ratio \u003d self._get_ratio(inv, rc_fields.ResourceClass.MEMORY_MB,"},{"line_number":521,"context_line":"                                    CONF.ram_allocation_ratio,"},{"line_number":522,"context_line":"                                    CONF.initial_ram_allocation_ratio)"},{"line_number":523,"context_line":"        disk_ratio \u003d self._get_ratio(inv, rc_fields.ResourceClass.DISK_GB,"},{"line_number":524,"context_line":"                                     CONF.disk_allocation_ratio,"},{"line_number":525,"context_line":"                                     CONF.initial_disk_allocation_ratio)"},{"line_number":526,"context_line":"        inventory \u003d {"},{"line_number":527,"context_line":"            \u0027VCPU\u0027: {"},{"line_number":528,"context_line":"                \u0027total\u0027: self.vcpus,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_09ce0f58","line":525,"range":{"start_line":517,"start_character":8,"end_line":525,"end_character":72},"updated":"2018-11-29 18:15:15.000000000","message":"I wonder if we should also put this into the helper method since it\u0027s going to be the same across the drivers, then you just need to pass the inv dict and the _get_ratio method can return a dict in response, where the keys are the resource class keys.","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"84c7a4235a94380e97eb93c935587265149b3d6c","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        # is non-None or non-0.0, and fallback to use the"},{"line_number":515,"context_line":"        # initial_xxx_allocation_ratio otherwise."},{"line_number":516,"context_line":"        inv \u003d provider_tree.data(nodename).inventory"},{"line_number":517,"context_line":"        cpu_ratio \u003d self._get_ratio(inv, rc_fields.ResourceClass.VCPU,"},{"line_number":518,"context_line":"                                    CONF.cpu_allocation_ratio,"},{"line_number":519,"context_line":"                                    CONF.initial_cpu_allocation_ratio)"},{"line_number":520,"context_line":"        ram_ratio \u003d self._get_ratio(inv, rc_fields.ResourceClass.MEMORY_MB,"},{"line_number":521,"context_line":"                                    CONF.ram_allocation_ratio,"},{"line_number":522,"context_line":"                                    CONF.initial_ram_allocation_ratio)"},{"line_number":523,"context_line":"        disk_ratio \u003d self._get_ratio(inv, rc_fields.ResourceClass.DISK_GB,"},{"line_number":524,"context_line":"                                     CONF.disk_allocation_ratio,"},{"line_number":525,"context_line":"                                     CONF.initial_disk_allocation_ratio)"},{"line_number":526,"context_line":"        inventory \u003d {"},{"line_number":527,"context_line":"            \u0027VCPU\u0027: {"},{"line_number":528,"context_line":"                \u0027total\u0027: self.vcpus,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_bcb4ec85","line":525,"range":{"start_line":517,"start_character":8,"end_line":525,"end_character":72},"in_reply_to":"3f79a3b5_09ce0f58","updated":"2018-11-30 10:03:58.000000000","message":"Done","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"532aa828b86eb23b5bf9eb9e2d451f379c149950","unresolved":false,"context_lines":[{"line_number":6457,"context_line":"        # TODO(sbauza): Use traits to make a better world."},{"line_number":6458,"context_line":"        vgpus \u003d self._get_vgpu_total()"},{"line_number":6459,"context_line":""},{"line_number":6460,"context_line":"        # NOTE(yikun): If the inv record does not exists, the allocation_ratio"},{"line_number":6461,"context_line":"        # will use the CONF.xxx_allocation_ratio value if xxx_allocation_ratio"},{"line_number":6462,"context_line":"        # is non-None or non-0.0, and fallback to use the"},{"line_number":6463,"context_line":"        # initial_xxx_allocation_ratio otherwise."}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_950a1727","line":6460,"updated":"2018-11-30 19:24:05.000000000","message":"You forgot powervm again :(\n\nhttps://github.com/openstack/nova/blob/8446a1e58d595e18da450f52db224d56b6466e91/nova/virt/powervm/driver.py#L194","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":6457,"context_line":"        # TODO(sbauza): Use traits to make a better world."},{"line_number":6458,"context_line":"        vgpus \u003d self._get_vgpu_total()"},{"line_number":6459,"context_line":""},{"line_number":6460,"context_line":"        # NOTE(yikun): If the inv record does not exists, the allocation_ratio"},{"line_number":6461,"context_line":"        # will use the CONF.xxx_allocation_ratio value if xxx_allocation_ratio"},{"line_number":6462,"context_line":"        # is non-None or non-0.0, and fallback to use the"},{"line_number":6463,"context_line":"        # initial_xxx_allocation_ratio otherwise."}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_b352cb69","line":6460,"in_reply_to":"3f79a3b5_950a1727","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"532aa828b86eb23b5bf9eb9e2d451f379c149950","unresolved":false,"context_lines":[{"line_number":6459,"context_line":""},{"line_number":6460,"context_line":"        # NOTE(yikun): If the inv record does not exists, the allocation_ratio"},{"line_number":6461,"context_line":"        # will use the CONF.xxx_allocation_ratio value if xxx_allocation_ratio"},{"line_number":6462,"context_line":"        # is non-None or non-0.0, and fallback to use the"},{"line_number":6463,"context_line":"        # initial_xxx_allocation_ratio otherwise."},{"line_number":6464,"context_line":"        inv \u003d provider_tree.data(nodename).inventory"},{"line_number":6465,"context_line":"        ratios \u003d self._get_allocation_ratios(inv)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_f52cabb2","line":6462,"range":{"start_line":6462,"start_character":10,"end_line":6462,"end_character":32},"updated":"2018-11-30 19:24:05.000000000","message":"is set","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":6459,"context_line":""},{"line_number":6460,"context_line":"        # NOTE(yikun): If the inv record does not exists, the allocation_ratio"},{"line_number":6461,"context_line":"        # will use the CONF.xxx_allocation_ratio value if xxx_allocation_ratio"},{"line_number":6462,"context_line":"        # is non-None or non-0.0, and fallback to use the"},{"line_number":6463,"context_line":"        # initial_xxx_allocation_ratio otherwise."},{"line_number":6464,"context_line":"        inv \u003d provider_tree.data(nodename).inventory"},{"line_number":6465,"context_line":"        ratios \u003d self._get_allocation_ratios(inv)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_d3574759","line":6462,"range":{"start_line":6462,"start_character":10,"end_line":6462,"end_character":32},"in_reply_to":"3f79a3b5_f52cabb2","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"}],"releasenotes/notes/add_initial_allocation_ratio-2d2666d62426a4bf.yaml":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"fdcb6f9b3dd2867019553308b344484b1473dec3","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.0."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    These options help user specify initial virtual CPU/ram/disk to physical"},{"line_number":13,"context_line":"    CPU/ram/disk allocation ratio. These options are **ONLY** used if the "},{"line_number":14,"context_line":"    resource tracker detects no existing record in the ``compute_nodes`` nova"},{"line_number":15,"context_line":"    cell DB for that hypervisor."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3f79a3b5_58fe0107","line":13,"range":{"start_line":13,"start_character":73,"end_line":13,"end_character":74},"updated":"2018-10-18 09:52:35.000000000","message":"typo","commit_id":"9305ea627c1b28d6adfd34d71512388d9af3c2c8"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"3ebae21df0c688f915e507e67a5e885aafb8d121","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.0."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    These options help user specify initial virtual CPU/ram/disk to physical"},{"line_number":13,"context_line":"    CPU/ram/disk allocation ratio. These options are **ONLY** used if the "},{"line_number":14,"context_line":"    resource tracker detects no existing record in the ``compute_nodes`` nova"},{"line_number":15,"context_line":"    cell DB for that hypervisor."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3f79a3b5_018070f5","line":13,"range":{"start_line":13,"start_character":73,"end_line":13,"end_character":74},"in_reply_to":"3f79a3b5_58fe0107","updated":"2018-10-26 07:08:40.000000000","message":"Done","commit_id":"9305ea627c1b28d6adfd34d71512388d9af3c2c8"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"fdcb6f9b3dd2867019553308b344484b1473dec3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The \"initial_cpu_allocation_ratio\", \"initial_ram_allocation_ratio\" and"},{"line_number":5,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":6,"context_line":"    ``DEFAULT`` group:"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"    - initial_cpu_allocation_ratio with min value 0.0 and default value 16.0."},{"line_number":9,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.5."},{"line_number":10,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.0."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    These options help user specify initial virtual CPU/ram/disk to physical"},{"line_number":13,"context_line":"    CPU/ram/disk allocation ratio. These options are **ONLY** used if the "},{"line_number":14,"context_line":"    resource tracker detects no existing record in the ``compute_nodes`` nova"},{"line_number":15,"context_line":"    cell DB for that hypervisor."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3f79a3b5_1be88313","line":15,"range":{"start_line":2,"start_character":0,"end_line":15,"end_character":32},"updated":"2018-10-18 09:52:35.000000000","message":"do you also have to mention that the default value for CONF.xxx_allocation_ratio ? I\u0027m not sure, maybe the config help message itself can express this?","commit_id":"9305ea627c1b28d6adfd34d71512388d9af3c2c8"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"3ebae21df0c688f915e507e67a5e885aafb8d121","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The \"initial_cpu_allocation_ratio\", \"initial_ram_allocation_ratio\" and"},{"line_number":5,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":6,"context_line":"    ``DEFAULT`` group:"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"    - initial_cpu_allocation_ratio with min value 0.0 and default value 16.0."},{"line_number":9,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.5."},{"line_number":10,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.0."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    These options help user specify initial virtual CPU/ram/disk to physical"},{"line_number":13,"context_line":"    CPU/ram/disk allocation ratio. These options are **ONLY** used if the "},{"line_number":14,"context_line":"    resource tracker detects no existing record in the ``compute_nodes`` nova"},{"line_number":15,"context_line":"    cell DB for that hypervisor."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3f79a3b5_a17adc21","line":15,"range":{"start_line":2,"start_character":0,"end_line":15,"end_character":32},"in_reply_to":"3f79a3b5_1be88313","updated":"2018-10-26 07:08:40.000000000","message":"Done","commit_id":"9305ea627c1b28d6adfd34d71512388d9af3c2c8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The default value for the \"initial_cpu_allocation_ratio\","},{"line_number":5,"context_line":"    \"initial_ram_allocation_ratio\" and \"initial_disk_allocation_ratio\""},{"line_number":6,"context_line":"    configurations have been changed to ``None``."},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"    The \"initial_cpu_allocation_ratio\", \"initial_ram_allocation_ratio\" and"},{"line_number":9,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"3f79a3b5_89d8267d","line":6,"range":{"start_line":4,"start_character":4,"end_line":6,"end_character":49},"updated":"2018-11-26 22:00:59.000000000","message":"This is incorrect. You mean the *_allocation_ratio options, which is the change before this in the series. This patch adds the initial_*_allocation_ratio options which do not default to None.","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"4689745f9316e1f30c664686f90027ed08a40774","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The default value for the \"initial_cpu_allocation_ratio\","},{"line_number":5,"context_line":"    \"initial_ram_allocation_ratio\" and \"initial_disk_allocation_ratio\""},{"line_number":6,"context_line":"    configurations have been changed to ``None``."},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"    The \"initial_cpu_allocation_ratio\", \"initial_ram_allocation_ratio\" and"},{"line_number":9,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"3f79a3b5_a10ad225","line":6,"range":{"start_line":4,"start_character":4,"end_line":6,"end_character":49},"in_reply_to":"3f79a3b5_89d8267d","updated":"2018-11-27 07:34:29.000000000","message":"Ah, yes, I missed this part","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The default value for the \"initial_cpu_allocation_ratio\","},{"line_number":5,"context_line":"    \"initial_ram_allocation_ratio\" and \"initial_disk_allocation_ratio\""},{"line_number":6,"context_line":"    configurations have been changed to ``None``."},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"    The \"initial_cpu_allocation_ratio\", \"initial_ram_allocation_ratio\" and"},{"line_number":9,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"}],"source_content_type":"text/x-yaml","patch_set":9,"id":"3f79a3b5_65aa7fd0","line":6,"range":{"start_line":4,"start_character":4,"end_line":6,"end_character":49},"in_reply_to":"3f79a3b5_89d8267d","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":10,"context_line":"    ``DEFAULT`` group:"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    - initial_cpu_allocation_ratio with min value 0.0 and default value 16.0."},{"line_number":13,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.5."},{"line_number":14,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.0."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"3f79a3b5_a9c0827e","line":12,"range":{"start_line":12,"start_character":40,"end_line":12,"end_character":53},"updated":"2018-11-26 22:00:59.000000000","message":"As noted in the option code, I don\u0027t think we want to support setting 0.0 as a minimum initial value (even if the ComputeNode._from_db_object would \"fix\" it anyway) but let\u0027s surely not mention it here in the release note.","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":10,"context_line":"    ``DEFAULT`` group:"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    - initial_cpu_allocation_ratio with min value 0.0 and default value 16.0."},{"line_number":13,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.5."},{"line_number":14,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.0."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"3f79a3b5_057f0b69","line":12,"range":{"start_line":12,"start_character":40,"end_line":12,"end_character":53},"in_reply_to":"3f79a3b5_a9c0827e","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.5."},{"line_number":14,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.0."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"    These options help user specify initial virtual CPU/ram/disk to physical"},{"line_number":17,"context_line":"    CPU/ram/disk allocation ratio. These options are **ONLY** used if the"},{"line_number":18,"context_line":"    resource tracker detects no existing record in the ``compute_nodes`` nova"},{"line_number":19,"context_line":"    cell DB for that hypervisor."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"3f79a3b5_c9bb7e0d","line":16,"range":{"start_line":16,"start_character":23,"end_line":16,"end_character":27},"updated":"2018-11-26 22:00:59.000000000","message":"operators","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.5."},{"line_number":14,"context_line":"    - initial_ram_allocation_ratio with min value 0.0 and default value 1.0."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"    These options help user specify initial virtual CPU/ram/disk to physical"},{"line_number":17,"context_line":"    CPU/ram/disk allocation ratio. These options are **ONLY** used if the"},{"line_number":18,"context_line":"    resource tracker detects no existing record in the ``compute_nodes`` nova"},{"line_number":19,"context_line":"    cell DB for that hypervisor."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"3f79a3b5_25824752","line":16,"range":{"start_line":16,"start_character":23,"end_line":16,"end_character":27},"in_reply_to":"3f79a3b5_c9bb7e0d","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d62b91e8486b52c5a1a9f598e18cdaf9441faf8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"3f79a3b5_69b6ea28","line":20,"updated":"2018-11-26 22:00:59.000000000","message":"I would link to the spec for more details, e.g.:\n\nFor more details, refer to the `spec`__.\n\n.. __: https://specs.openstack.org/openstack/nova-specs/specs/stein/approved/initial-allocation-ratios.html","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"b6145d4d7902ccfc403b110d2b89d47875d0886d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"3f79a3b5_e5776f8c","line":20,"in_reply_to":"3f79a3b5_69b6ea28","updated":"2018-11-27 12:27:21.000000000","message":"Done","commit_id":"ef48684bd238f189d422fd4cc441f6dfd4268fe2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    The default value for the \"cpu_allocation_ratio\", \"ram_allocation_ratio\""},{"line_number":5,"context_line":"    and \"disk_allocation_ratio\" configurations have been changed to ``None``."},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    The \"initial_cpu_allocation_ratio\", \"initial_ram_allocation_ratio\" and"},{"line_number":8,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":9,"context_line":"    ``DEFAULT`` group:"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_69f6a395","line":7,"range":{"start_line":7,"start_character":8,"end_line":7,"end_character":9},"updated":"2018-11-29 18:15:15.000000000","message":"nit: use double back ticks rather than quotes:\n\n``initial_cpu_allocation_ratio``","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    The default value for the \"cpu_allocation_ratio\", \"ram_allocation_ratio\""},{"line_number":5,"context_line":"    and \"disk_allocation_ratio\" configurations have been changed to ``None``."},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    The \"initial_cpu_allocation_ratio\", \"initial_ram_allocation_ratio\" and"},{"line_number":8,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":9,"context_line":"    ``DEFAULT`` group:"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_93ceaf28","line":7,"range":{"start_line":7,"start_character":8,"end_line":7,"end_character":9},"in_reply_to":"3f79a3b5_69f6a395","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    and \"disk_allocation_ratio\" configurations have been changed to ``None``."},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    The \"initial_cpu_allocation_ratio\", \"initial_ram_allocation_ratio\" and"},{"line_number":8,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":9,"context_line":"    ``DEFAULT`` group:"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    - initial_cpu_allocation_ratio with default value 16.0."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_c901f76e","line":8,"range":{"start_line":8,"start_character":36,"end_line":8,"end_character":50},"updated":"2018-11-29 18:15:15.000000000","message":"nit: configuration options","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    and \"disk_allocation_ratio\" configurations have been changed to ``None``."},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    The \"initial_cpu_allocation_ratio\", \"initial_ram_allocation_ratio\" and"},{"line_number":8,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":9,"context_line":"    ``DEFAULT`` group:"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    - initial_cpu_allocation_ratio with default value 16.0."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_53d817ec","line":8,"range":{"start_line":8,"start_character":36,"end_line":8,"end_character":50},"in_reply_to":"3f79a3b5_c901f76e","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":9,"context_line":"    ``DEFAULT`` group:"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    - initial_cpu_allocation_ratio with default value 16.0."},{"line_number":12,"context_line":"    - initial_ram_allocation_ratio with default value 1.5."},{"line_number":13,"context_line":"    - initial_ram_allocation_ratio with default value 1.0."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_29350b45","line":11,"range":{"start_line":11,"start_character":58,"end_line":11,"end_character":59},"updated":"2018-11-29 18:15:15.000000000","message":"nit: remove the period in a bullet list since it\u0027s not a sentence","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":9,"context_line":"    ``DEFAULT`` group:"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    - initial_cpu_allocation_ratio with default value 16.0."},{"line_number":12,"context_line":"    - initial_ram_allocation_ratio with default value 1.5."},{"line_number":13,"context_line":"    - initial_ram_allocation_ratio with default value 1.0."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_13ecdf8f","line":11,"range":{"start_line":11,"start_character":58,"end_line":11,"end_character":59},"in_reply_to":"3f79a3b5_29350b45","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"436c469a5da14e3581d25c0124ec8e1762193773","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    - initial_ram_allocation_ratio with default value 1.0."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"    These options help operators specify initial virtual CPU/ram/disk to"},{"line_number":16,"context_line":"    physical CPU/ram/disk allocation ratio. These options are only used when"},{"line_number":17,"context_line":"    initially creating the ``computes_nodes`` table record for a given"},{"line_number":18,"context_line":"    nova-compute service."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_4932c75d","line":16,"range":{"start_line":16,"start_character":37,"end_line":16,"end_character":42},"updated":"2018-11-29 18:15:15.000000000","message":"ratios","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    - initial_ram_allocation_ratio with default value 1.0."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"    These options help operators specify initial virtual CPU/ram/disk to"},{"line_number":16,"context_line":"    physical CPU/ram/disk allocation ratio. These options are only used when"},{"line_number":17,"context_line":"    initially creating the ``computes_nodes`` table record for a given"},{"line_number":18,"context_line":"    nova-compute service."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f79a3b5_b3e08b95","line":16,"range":{"start_line":16,"start_character":37,"end_line":16,"end_character":42},"in_reply_to":"3f79a3b5_4932c75d","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"8fca09df47ce26d577e8d410b18bb6e614efe772"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"532aa828b86eb23b5bf9eb9e2d451f379c149950","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    The default value for the \"cpu_allocation_ratio\", \"ram_allocation_ratio\""},{"line_number":5,"context_line":"    and \"disk_allocation_ratio\" configurations have been changed to ``None``."},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    The \"initial_cpu_allocation_ratio\", \"initial_ram_allocation_ratio\" and"},{"line_number":8,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":9,"context_line":"    ``DEFAULT`` group:"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3f79a3b5_984d6e72","line":7,"updated":"2018-11-30 19:24:05.000000000","message":"You missed my comments from PS12:\n\nhttps://review.openstack.org/#/c/602804/12/releasenotes/notes/add_initial_allocation_ratio-2d2666d62426a4bf.yaml","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7f3148fe1000dbf74fd51ba35e7037c70589932","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    The default value for the \"cpu_allocation_ratio\", \"ram_allocation_ratio\""},{"line_number":5,"context_line":"    and \"disk_allocation_ratio\" configurations have been changed to ``None``."},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    The \"initial_cpu_allocation_ratio\", \"initial_ram_allocation_ratio\" and"},{"line_number":8,"context_line":"    \"initial_disk_allocation_ratio\" configurations have been added to the"},{"line_number":9,"context_line":"    ``DEFAULT`` group:"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3f79a3b5_d3e507a5","line":7,"in_reply_to":"3f79a3b5_984d6e72","updated":"2018-11-30 20:25:21.000000000","message":"Done","commit_id":"0e5b9b800d90ee6f3eea876349f14130c56f8be5"}]}
