)]}'
{"nova/compute/resource_tracker.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"0e7984f196bcc577d54f54c7dd670d6a72862f06","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    Note that if the supplied inv_data contains allocation_ratio, reserved or"},{"line_number":91,"context_line":"    other fields, we DO NOT override the value with that of the compute node."},{"line_number":92,"context_line":"    This is to ensure that the virt driver is the single source of truth"},{"line_number":93,"context_line":"    regarding inventory information. For instance, the Ironic virt driver will"},{"line_number":94,"context_line":"    always return a very specific inventory with allocation_ratios pinned to"},{"line_number":95,"context_line":"    1.0..."}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_0a324cf2","line":92,"updated":"2017-04-24 11:48:29.000000000","message":"+1","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"71791c53b5c3057f710ee5a89d80b32b38001276","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    Note that if the supplied inv_data contains allocation_ratio, reserved or"},{"line_number":91,"context_line":"    other fields, we DO NOT override the value with that of the compute node."},{"line_number":92,"context_line":"    This is to ensure that the virt driver is the single source of truth"},{"line_number":93,"context_line":"    regarding inventory information. For instance, the Ironic virt driver will"},{"line_number":94,"context_line":"    always return a very specific inventory with allocation_ratios pinned to"},{"line_number":95,"context_line":"    1.0..."}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_8a3725e4","line":92,"in_reply_to":"5ff73747_0a324cf2","updated":"2017-04-26 13:58:43.000000000","message":"Agree with this for the reserved, etc. For allocation_ratio I\u0027m not so sure. That\u0027s really a \"compute manager\" setting and I\u0027m not sure why the driver would/should override it. What\u0027s the thinking there?","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6df6340c3c1e4eb70b857542744ced34533382e1","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    Note that if the supplied inv_data contains allocation_ratio, reserved or"},{"line_number":91,"context_line":"    other fields, we DO NOT override the value with that of the compute node."},{"line_number":92,"context_line":"    This is to ensure that the virt driver is the single source of truth"},{"line_number":93,"context_line":"    regarding inventory information. For instance, the Ironic virt driver will"},{"line_number":94,"context_line":"    always return a very specific inventory with allocation_ratios pinned to"},{"line_number":95,"context_line":"    1.0..."}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_e6f0f093","line":92,"in_reply_to":"5ff73747_10c0e84f","updated":"2017-04-27 19:59:39.000000000","message":"Yeah it\u0027s a bit weird and confusing. It made me think that we should be more clear about this in the config option help text though:\n\nhttps://review.openstack.org/#/c/460722/","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bbc75fd3b8de7e69316790ad3bfab9bc33aae2ad","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    Note that if the supplied inv_data contains allocation_ratio, reserved or"},{"line_number":91,"context_line":"    other fields, we DO NOT override the value with that of the compute node."},{"line_number":92,"context_line":"    This is to ensure that the virt driver is the single source of truth"},{"line_number":93,"context_line":"    regarding inventory information. For instance, the Ironic virt driver will"},{"line_number":94,"context_line":"    always return a very specific inventory with allocation_ratios pinned to"},{"line_number":95,"context_line":"    1.0..."}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_10c0e84f","line":92,"in_reply_to":"5ff73747_8a3725e4","updated":"2017-04-26 14:56:54.000000000","message":"@dansmith: See reference below on line 93-95. For the ironic virt driver, we always want to use an allocation_ratio of 1.0 for the custom resource class. That\u0027s an example of the virt driver overriding allocation_ratio.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6df6340c3c1e4eb70b857542744ced34533382e1","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    This is to ensure that the virt driver is the single source of truth"},{"line_number":93,"context_line":"    regarding inventory information. For instance, the Ironic virt driver will"},{"line_number":94,"context_line":"    always return a very specific inventory with allocation_ratios pinned to"},{"line_number":95,"context_line":"    1.0..."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    :param inv_data: Dict, keyed by resource class, of inventory information"},{"line_number":98,"context_line":"                     returned from virt driver\u0027s get_inventory() method"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_06f75cd5","line":95,"range":{"start_line":95,"start_character":7,"end_line":95,"end_character":10},"updated":"2017-04-27 19:59:39.000000000","message":"Ooo this ... is...intriguing...","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"0e7984f196bcc577d54f54c7dd670d6a72862f06","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    if fields.ResourceClass.VCPU in inv_data:"},{"line_number":102,"context_line":"        cpu_inv \u003d inv_data[fields.ResourceClass.VCPU]"},{"line_number":103,"context_line":"        if \u0027allocation_ratio\u0027 not in cpu_inv:"},{"line_number":104,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":105,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"},{"line_number":106,"context_line":"        mem_inv \u003d inv_data[fields.ResourceClass.MEMORY_MB]"},{"line_number":107,"context_line":"        if \u0027allocation_ratio\u0027 not in mem_inv:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_8a82dc4e","line":104,"updated":"2017-04-24 11:48:29.000000000","message":"Is there never a chance that something (virt driver or compute node) might have declared a cpu reservation? Where do things like isolated cpus get tracked?","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6df6340c3c1e4eb70b857542744ced34533382e1","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    if fields.ResourceClass.VCPU in inv_data:"},{"line_number":102,"context_line":"        cpu_inv \u003d inv_data[fields.ResourceClass.VCPU]"},{"line_number":103,"context_line":"        if \u0027allocation_ratio\u0027 not in cpu_inv:"},{"line_number":104,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":105,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"},{"line_number":106,"context_line":"        mem_inv \u003d inv_data[fields.ResourceClass.MEMORY_MB]"},{"line_number":107,"context_line":"        if \u0027allocation_ratio\u0027 not in mem_inv:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_c64294ab","line":104,"in_reply_to":"5ff73747_6ddbd31a","updated":"2017-04-27 19:59:39.000000000","message":"We\u0027re going to get their with claims in the scheduler, see:\n\nhttps://review.openstack.org/#/c/460113/\n\nInitially I thought we could just leave this until that change, but now that I see you have to set this in the libvirt driver:\n\nhttps://review.openstack.org/#/c/457782/2/nova/virt/libvirt/driver.py@5602\n\nI don\u0027t really like that, can we just hard-code reserved to 0 here if it\u0027s not in the inv_data? I guess the Ironic driver is also doing that, but eventually we\u0027re going to have to set reserved here based on config for claims in the scheduler anyway.\n\nI don\u0027t have too strong of an opinion here either way, it\u0027s just kind of the tight coupling that bothers me, since get_inventory() implementation shouldn\u0027t have to know about what this method does for it, but if that\u0027s true, then why isn\u0027t the libvirt driver setting reserved\u003d0 for memory and disk? Because if it did, you wouldn\u0027t use the config like you do here. Again, the tight coupling sadness of it all.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e1e63bab98b1144676c924527fdfed13abaf0dde","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    if fields.ResourceClass.VCPU in inv_data:"},{"line_number":102,"context_line":"        cpu_inv \u003d inv_data[fields.ResourceClass.VCPU]"},{"line_number":103,"context_line":"        if \u0027allocation_ratio\u0027 not in cpu_inv:"},{"line_number":104,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":105,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"},{"line_number":106,"context_line":"        mem_inv \u003d inv_data[fields.ResourceClass.MEMORY_MB]"},{"line_number":107,"context_line":"        if \u0027allocation_ratio\u0027 not in mem_inv:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_ef2ed2a3","line":104,"in_reply_to":"5ff73747_8a82dc4e","updated":"2017-04-25 22:38:17.000000000","message":"no, not currently. isolated CPUs are tracked differently. We do not yet have the ability to track reserved CPUs, but may in the future. This patch doesn\u0027t change anything about the status quo, though.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0f53553acde1200a53c5fe31c446e9882544074e","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    if fields.ResourceClass.VCPU in inv_data:"},{"line_number":102,"context_line":"        cpu_inv \u003d inv_data[fields.ResourceClass.VCPU]"},{"line_number":103,"context_line":"        if \u0027allocation_ratio\u0027 not in cpu_inv:"},{"line_number":104,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":105,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"},{"line_number":106,"context_line":"        mem_inv \u003d inv_data[fields.ResourceClass.MEMORY_MB]"},{"line_number":107,"context_line":"        if \u0027allocation_ratio\u0027 not in mem_inv:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_aec863a5","line":104,"in_reply_to":"5ff73747_c64294ab","updated":"2017-04-28 13:55:27.000000000","message":"added reserved for vcpus.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"3230db05da8d76eac97d3b6695a23b16b9cf6f77","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    if fields.ResourceClass.VCPU in inv_data:"},{"line_number":102,"context_line":"        cpu_inv \u003d inv_data[fields.ResourceClass.VCPU]"},{"line_number":103,"context_line":"        if \u0027allocation_ratio\u0027 not in cpu_inv:"},{"line_number":104,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":105,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"},{"line_number":106,"context_line":"        mem_inv \u003d inv_data[fields.ResourceClass.MEMORY_MB]"},{"line_number":107,"context_line":"        if \u0027allocation_ratio\u0027 not in mem_inv:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_6ddbd31a","line":104,"in_reply_to":"5ff73747_ef2ed2a3","updated":"2017-04-26 15:23:41.000000000","message":"I know, I know, YAGNI...\n\nBut it would make for a cleaner design to have these three follow the same pattern. It won\u0027t hurt anything to do that, right?","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6df6340c3c1e4eb70b857542744ced34533382e1","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        cpu_inv \u003d inv_data[fields.ResourceClass.VCPU]"},{"line_number":103,"context_line":"        if \u0027allocation_ratio\u0027 not in cpu_inv:"},{"line_number":104,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":105,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"},{"line_number":106,"context_line":"        mem_inv \u003d inv_data[fields.ResourceClass.MEMORY_MB]"},{"line_number":107,"context_line":"        if \u0027allocation_ratio\u0027 not in mem_inv:"},{"line_number":108,"context_line":"            mem_inv[\u0027allocation_ratio\u0027] \u003d cn.ram_allocation_ratio"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_e6735015","line":105,"updated":"2017-04-27 19:59:39.000000000","message":"supernit: I\u0027d like a line break between each resource class block, just to ease my weary eyes, but that\u0027s just me being a wimp.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0f53553acde1200a53c5fe31c446e9882544074e","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        cpu_inv \u003d inv_data[fields.ResourceClass.VCPU]"},{"line_number":103,"context_line":"        if \u0027allocation_ratio\u0027 not in cpu_inv:"},{"line_number":104,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":105,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"},{"line_number":106,"context_line":"        mem_inv \u003d inv_data[fields.ResourceClass.MEMORY_MB]"},{"line_number":107,"context_line":"        if \u0027allocation_ratio\u0027 not in mem_inv:"},{"line_number":108,"context_line":"            mem_inv[\u0027allocation_ratio\u0027] \u003d cn.ram_allocation_ratio"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_8ec36789","line":105,"in_reply_to":"5ff73747_e6735015","updated":"2017-04-28 13:55:27.000000000","message":"Done","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"3230db05da8d76eac97d3b6695a23b16b9cf6f77","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            disk_inv[\u0027allocation_ratio\u0027] \u003d cn.disk_allocation_ratio"},{"line_number":115,"context_line":"        if \u0027reserved\u0027 not in disk_inv:"},{"line_number":116,"context_line":"            # TODO(johngarbutt) We should either move to reserved_host_disk_gb"},{"line_number":117,"context_line":"            # or start tracking DISK_MB."},{"line_number":118,"context_line":"            reserved_mb \u003d CONF.reserved_host_disk_mb"},{"line_number":119,"context_line":"            reserved_gb \u003d report.convert_mb_to_ceil_gb(reserved_mb)"},{"line_number":120,"context_line":"            disk_inv[\u0027reserved\u0027] \u003d reserved_gb"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_8d84dfb2","line":117,"updated":"2017-04-26 15:23:41.000000000","message":"Why did we make reserved in MB? Seems a little too fine-grained for this day and age.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6df6340c3c1e4eb70b857542744ced34533382e1","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            disk_inv[\u0027allocation_ratio\u0027] \u003d cn.disk_allocation_ratio"},{"line_number":115,"context_line":"        if \u0027reserved\u0027 not in disk_inv:"},{"line_number":116,"context_line":"            # TODO(johngarbutt) We should either move to reserved_host_disk_gb"},{"line_number":117,"context_line":"            # or start tracking DISK_MB."},{"line_number":118,"context_line":"            reserved_mb \u003d CONF.reserved_host_disk_mb"},{"line_number":119,"context_line":"            reserved_gb \u003d report.convert_mb_to_ceil_gb(reserved_mb)"},{"line_number":120,"context_line":"            disk_inv[\u0027reserved\u0027] \u003d reserved_gb"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_c6de14d9","line":117,"in_reply_to":"5ff73747_273f0388","updated":"2017-04-27 19:59:39.000000000","message":"Let\u0027s not worry about fixing this in this change though. Personally I\u0027d vote for converting it to be GB since that\u0027s the unit we deal with in the API for flavors and hypervisors (compute nodes). And yes the conversion routines suck.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"34c1c9719724c4f6604dfa63a1df3f6448eeab82","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            disk_inv[\u0027allocation_ratio\u0027] \u003d cn.disk_allocation_ratio"},{"line_number":115,"context_line":"        if \u0027reserved\u0027 not in disk_inv:"},{"line_number":116,"context_line":"            # TODO(johngarbutt) We should either move to reserved_host_disk_gb"},{"line_number":117,"context_line":"            # or start tracking DISK_MB."},{"line_number":118,"context_line":"            reserved_mb \u003d CONF.reserved_host_disk_mb"},{"line_number":119,"context_line":"            reserved_gb \u003d report.convert_mb_to_ceil_gb(reserved_mb)"},{"line_number":120,"context_line":"            disk_inv[\u0027reserved\u0027] \u003d reserved_gb"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_e1836ccb","line":117,"in_reply_to":"5ff73747_8d84dfb2","updated":"2017-04-26 16:04:16.000000000","message":"I\u0027m pretty sure there are bugs reported around this (or rather, a miscalculation due to GB/MB differences) but I can\u0027t find any links.\n\nI\u0027d be happy to deprecate the MB version, personally, and default the GB version to \u003cwhatever the MB version is\u003e * 1024 or whatever. Sounds like a cleanup item though, per the todo above","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"87723a5c2c4a4af598f133ee9c252dbbee809541","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            disk_inv[\u0027allocation_ratio\u0027] \u003d cn.disk_allocation_ratio"},{"line_number":115,"context_line":"        if \u0027reserved\u0027 not in disk_inv:"},{"line_number":116,"context_line":"            # TODO(johngarbutt) We should either move to reserved_host_disk_gb"},{"line_number":117,"context_line":"            # or start tracking DISK_MB."},{"line_number":118,"context_line":"            reserved_mb \u003d CONF.reserved_host_disk_mb"},{"line_number":119,"context_line":"            reserved_gb \u003d report.convert_mb_to_ceil_gb(reserved_mb)"},{"line_number":120,"context_line":"            disk_inv[\u0027reserved\u0027] \u003d reserved_gb"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_273f0388","line":117,"in_reply_to":"5ff73747_9c22cf51","updated":"2017-04-27 13:45:08.000000000","message":"It\u0027s not really a matter of optimizing storage. Since this is a config option that operators will need to be setting, it should match the way that they would think of the resource when setting it. AFAIK, no one thinks of disk storage in bytes. And the fact that we need to sprinkle a conversion routine like \u0027convert_mb_to_ceil_gb\u0027 throughout the code base is also problematic.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5f29024de02ecc8df0421af10036df4693690854","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            disk_inv[\u0027allocation_ratio\u0027] \u003d cn.disk_allocation_ratio"},{"line_number":115,"context_line":"        if \u0027reserved\u0027 not in disk_inv:"},{"line_number":116,"context_line":"            # TODO(johngarbutt) We should either move to reserved_host_disk_gb"},{"line_number":117,"context_line":"            # or start tracking DISK_MB."},{"line_number":118,"context_line":"            reserved_mb \u003d CONF.reserved_host_disk_mb"},{"line_number":119,"context_line":"            reserved_gb \u003d report.convert_mb_to_ceil_gb(reserved_mb)"},{"line_number":120,"context_line":"            disk_inv[\u0027reserved\u0027] \u003d reserved_gb"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_9c22cf51","line":117,"in_reply_to":"5ff73747_e1836ccb","updated":"2017-04-26 16:10:31.000000000","message":"Given that we\u0027re not short of bits, I would actually prefer that all values for everything everywhere were in bytes. Not doing this causes confusion when different interfaces require different units.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"05c8094f646fc8123f722e08fb41f82844e62528","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        if \u0027allocation_ratio\u0027 not in cpu_inv:"},{"line_number":104,"context_line":"            cpu_inv[\u0027allocation_ratio\u0027] \u003d cn.cpu_allocation_ratio"},{"line_number":105,"context_line":"        if \u0027reserved\u0027 not in cpu_inv:"},{"line_number":106,"context_line":"            # TODO(jaypipes): Replace hard-coded 0 with upcoming"},{"line_number":107,"context_line":"            # reserved_host_vcpus CONF option value"},{"line_number":108,"context_line":"            cpu_inv[\u0027reserved\u0027] \u003d 0"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    if fields.ResourceClass.MEMORY_MB in inv_data:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_b9c8afa5","line":107,"range":{"start_line":106,"start_character":12,"end_line":107,"end_character":51},"updated":"2017-04-28 14:15:33.000000000","message":"You could rebase on top of https://review.openstack.org/#/c/460113/ now if you want.","commit_id":"3eca626adc031d4f380ec100c1653e79b6bdb14a"}],"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":"6df6340c3c1e4eb70b857542744ced34533382e1","unresolved":false,"context_lines":[{"line_number":1270,"context_line":"        disk_gb \u003d 200"},{"line_number":1271,"context_line":"        # We will make sure that these field values do NOT override what the"},{"line_number":1272,"context_line":"        # Ironic virt driver sets (which is, for example, that allocation"},{"line_number":1273,"context_line":"        # ratios are all 1.0 for Ironic baremetal nodes"},{"line_number":1274,"context_line":"        cn \u003d objects.ComputeNode("},{"line_number":1275,"context_line":"            mock.sentinel.ctx,"},{"line_number":1276,"context_line":"            ram_allocation_ratio\u003d1.5,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_daaca8ee","line":1273,"range":{"start_line":1273,"start_character":50,"end_line":1273,"end_character":55},"updated":"2017-04-27 19:59:39.000000000","message":"nit: missing closing )","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0f53553acde1200a53c5fe31c446e9882544074e","unresolved":false,"context_lines":[{"line_number":1270,"context_line":"        disk_gb \u003d 200"},{"line_number":1271,"context_line":"        # We will make sure that these field values do NOT override what the"},{"line_number":1272,"context_line":"        # Ironic virt driver sets (which is, for example, that allocation"},{"line_number":1273,"context_line":"        # ratios are all 1.0 for Ironic baremetal nodes"},{"line_number":1274,"context_line":"        cn \u003d objects.ComputeNode("},{"line_number":1275,"context_line":"            mock.sentinel.ctx,"},{"line_number":1276,"context_line":"            ram_allocation_ratio\u003d1.5,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_4eb9df12","line":1273,"range":{"start_line":1273,"start_character":50,"end_line":1273,"end_character":55},"in_reply_to":"5ff73747_daaca8ee","updated":"2017-04-28 13:55:27.000000000","message":"Done","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6df6340c3c1e4eb70b857542744ced34533382e1","unresolved":false,"context_lines":[{"line_number":1278,"context_line":"            disk_allocation_ratio\u003d1.0,"},{"line_number":1279,"context_line":"        )"},{"line_number":1280,"context_line":"        # What we get back from Ironic driver contains fully-filled-out info"},{"line_number":1281,"context_line":"        # blocks for VCPU, MEMORY_MB, DISK_GB and the custom resource class"},{"line_number":1282,"context_line":"        inv \u003d {"},{"line_number":1283,"context_line":"            obj_fields.ResourceClass.VCPU: {"},{"line_number":1284,"context_line":"                \u0027total\u0027: vcpus,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_1a80d045","line":1281,"range":{"start_line":1281,"start_character":46,"end_line":1281,"end_character":75},"updated":"2017-04-27 19:59:39.000000000","message":"Did you mean to put custom resource class inventory in here?","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0f53553acde1200a53c5fe31c446e9882544074e","unresolved":false,"context_lines":[{"line_number":1278,"context_line":"            disk_allocation_ratio\u003d1.0,"},{"line_number":1279,"context_line":"        )"},{"line_number":1280,"context_line":"        # What we get back from Ironic driver contains fully-filled-out info"},{"line_number":1281,"context_line":"        # blocks for VCPU, MEMORY_MB, DISK_GB and the custom resource class"},{"line_number":1282,"context_line":"        inv \u003d {"},{"line_number":1283,"context_line":"            obj_fields.ResourceClass.VCPU: {"},{"line_number":1284,"context_line":"                \u0027total\u0027: vcpus,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_2e6333b4","line":1281,"range":{"start_line":1281,"start_character":46,"end_line":1281,"end_character":75},"in_reply_to":"5ff73747_1a80d045","updated":"2017-04-28 13:55:27.000000000","message":"Done","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"}],"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":"c4fa1525afff672504d7a9f32e29d34306b4f958","unresolved":false,"context_lines":[{"line_number":15536,"context_line":"        expected_inv \u003d {"},{"line_number":15537,"context_line":"            fields.ResourceClass.VCPU: {"},{"line_number":15538,"context_line":"                \u0027total\u0027: 24,"},{"line_number":15539,"context_line":"                \u0027reserved\u0027: 0,"},{"line_number":15540,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":15541,"context_line":"                \u0027max_unit\u0027: 24,"},{"line_number":15542,"context_line":"                \u0027step_size\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_39025f0b","line":15539,"range":{"start_line":15539,"start_character":16,"end_line":15539,"end_character":30},"updated":"2017-04-28 14:10:37.000000000","message":"This will fail now.","commit_id":"3eca626adc031d4f380ec100c1653e79b6bdb14a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"52b38d4677071f2b7b753bc9743758533dd59923","unresolved":false,"context_lines":[{"line_number":15536,"context_line":"        expected_inv \u003d {"},{"line_number":15537,"context_line":"            fields.ResourceClass.VCPU: {"},{"line_number":15538,"context_line":"                \u0027total\u0027: 24,"},{"line_number":15539,"context_line":"                \u0027reserved\u0027: 0,"},{"line_number":15540,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":15541,"context_line":"                \u0027max_unit\u0027: 24,"},{"line_number":15542,"context_line":"                \u0027step_size\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_142e4a91","line":15539,"range":{"start_line":15539,"start_character":16,"end_line":15539,"end_character":30},"in_reply_to":"5ff73747_39025f0b","updated":"2017-04-28 14:38:54.000000000","message":"Done","commit_id":"3eca626adc031d4f380ec100c1653e79b6bdb14a"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6df6340c3c1e4eb70b857542744ced34533382e1","unresolved":false,"context_lines":[{"line_number":5131,"context_line":"        except libvirt.libvirtError:"},{"line_number":5132,"context_line":"            LOG.warning(_LW(\"Cannot get the number of cpu, because this \""},{"line_number":5133,"context_line":"                         \"function is not implemented for this platform. \"))"},{"line_number":5134,"context_line":"            return 0"},{"line_number":5135,"context_line":""},{"line_number":5136,"context_line":"        if not CONF.vcpu_pin_set:"},{"line_number":5137,"context_line":"            return total_pcpus"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_1adfb03a","line":5134,"updated":"2017-04-27 19:59:39.000000000","message":"Ha, this would suck. Maybe we should make that an error at some point...","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"0e7984f196bcc577d54f54c7dd670d6a72862f06","unresolved":false,"context_lines":[{"line_number":5588,"context_line":"        \"\"\""},{"line_number":5589,"context_line":"        disk_gb \u003d int(self._get_local_gb_info()[\u0027total\u0027])"},{"line_number":5590,"context_line":"        memory_mb \u003d int(self._host.get_memory_mb_total())"},{"line_number":5591,"context_line":"        vcpus \u003d self._get_vcpu_total()"},{"line_number":5592,"context_line":"        # NOTE(jaypipes): We leave some fields like allocation_ratio and"},{"line_number":5593,"context_line":"        # reserved out of the returned dicts here because, for now at least,"},{"line_number":5594,"context_line":"        # the RT injects those values into the inventory dict based on the"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_0a748c34","line":5591,"updated":"2017-04-24 11:48:29.000000000","message":"Oh, I guess from looking at this that pinned cpus other fancy-pants cpu are done with and the total \u0027vcpus\u0027 is after anything has already removed or reserved, so at least in the libvirt sense, reserved is not visible?","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e1e63bab98b1144676c924527fdfed13abaf0dde","unresolved":false,"context_lines":[{"line_number":5588,"context_line":"        \"\"\""},{"line_number":5589,"context_line":"        disk_gb \u003d int(self._get_local_gb_info()[\u0027total\u0027])"},{"line_number":5590,"context_line":"        memory_mb \u003d int(self._host.get_memory_mb_total())"},{"line_number":5591,"context_line":"        vcpus \u003d self._get_vcpu_total()"},{"line_number":5592,"context_line":"        # NOTE(jaypipes): We leave some fields like allocation_ratio and"},{"line_number":5593,"context_line":"        # reserved out of the returned dicts here because, for now at least,"},{"line_number":5594,"context_line":"        # the RT injects those values into the inventory dict based on the"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_2f0efa3a","line":5591,"in_reply_to":"5ff73747_0a748c34","updated":"2017-04-25 22:38:17.000000000","message":"all pinning and emulator thread reservation is done in the NUMA topology, not on the basic resources like vCPU, RAM, etc.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bbc75fd3b8de7e69316790ad3bfab9bc33aae2ad","unresolved":false,"context_lines":[{"line_number":5588,"context_line":"        \"\"\""},{"line_number":5589,"context_line":"        disk_gb \u003d int(self._get_local_gb_info()[\u0027total\u0027])"},{"line_number":5590,"context_line":"        memory_mb \u003d int(self._host.get_memory_mb_total())"},{"line_number":5591,"context_line":"        vcpus \u003d self._get_vcpu_total()"},{"line_number":5592,"context_line":"        # NOTE(jaypipes): We leave some fields like allocation_ratio and"},{"line_number":5593,"context_line":"        # reserved out of the returned dicts here because, for now at least,"},{"line_number":5594,"context_line":"        # the RT injects those values into the inventory dict based on the"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_90f51886","line":5591,"in_reply_to":"5ff73747_0dbc4fb9","updated":"2017-04-26 14:56:54.000000000","message":"Yeah, I was referring to the pinning of specific pCPUs to vCPUs, which is always handled (for emulator threads and otherwise) in the NUMA topology objects/functions.\n\nFor overhead related to VCPU, see Sylvain\u0027s patch here:\n\nhttps://review.openstack.org/#/c/460113/\n\nThat CONF.reserved_host_cpus value would be injected into this inventory dict for the VCPU.reserved value.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"71791c53b5c3057f710ee5a89d80b32b38001276","unresolved":false,"context_lines":[{"line_number":5588,"context_line":"        \"\"\""},{"line_number":5589,"context_line":"        disk_gb \u003d int(self._get_local_gb_info()[\u0027total\u0027])"},{"line_number":5590,"context_line":"        memory_mb \u003d int(self._host.get_memory_mb_total())"},{"line_number":5591,"context_line":"        vcpus \u003d self._get_vcpu_total()"},{"line_number":5592,"context_line":"        # NOTE(jaypipes): We leave some fields like allocation_ratio and"},{"line_number":5593,"context_line":"        # reserved out of the returned dicts here because, for now at least,"},{"line_number":5594,"context_line":"        # the RT injects those values into the inventory dict based on the"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_8ad8457f","line":5591,"in_reply_to":"5ff73747_2f0efa3a","updated":"2017-04-26 13:58:43.000000000","message":"I\u0027m not sure about that. I think Chris is referring to this:\n\n https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L716\n\nwhich does affect what we report via RT right?","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"924e1b7bd83fba213d1e6d8365ca52c765d91d6b","unresolved":false,"context_lines":[{"line_number":5588,"context_line":"        \"\"\""},{"line_number":5589,"context_line":"        disk_gb \u003d int(self._get_local_gb_info()[\u0027total\u0027])"},{"line_number":5590,"context_line":"        memory_mb \u003d int(self._host.get_memory_mb_total())"},{"line_number":5591,"context_line":"        vcpus \u003d self._get_vcpu_total()"},{"line_number":5592,"context_line":"        # NOTE(jaypipes): We leave some fields like allocation_ratio and"},{"line_number":5593,"context_line":"        # reserved out of the returned dicts here because, for now at least,"},{"line_number":5594,"context_line":"        # the RT injects those values into the inventory dict based on the"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_0dbc4fb9","line":5591,"in_reply_to":"5ff73747_8ad8457f","updated":"2017-04-26 14:35:12.000000000","message":"Thank you dan, emultator_threads was a term I had a memory of related to this, but couldn\u0027t actually recall the term so couldn\u0027t grep for it.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"510451947346d15f8c6fd24b814fb24b7d9a82ed","unresolved":false,"context_lines":[{"line_number":5595,"context_line":"        # compute_nodes record values."},{"line_number":5596,"context_line":"        result \u003d {"},{"line_number":5597,"context_line":"            fields.ResourceClass.VCPU: {"},{"line_number":5598,"context_line":"                \u0027total\u0027: vcpus,"},{"line_number":5599,"context_line":"                \u0027reserved\u0027: 0,"},{"line_number":5600,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":5601,"context_line":"                \u0027max_unit\u0027: vcpus,"},{"line_number":5602,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":5603,"context_line":"            },"},{"line_number":5604,"context_line":"            fields.ResourceClass.MEMORY_MB: {"},{"line_number":5605,"context_line":"                \u0027total\u0027: memory_mb,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_db22a1a4","line":5602,"range":{"start_line":5598,"start_character":0,"end_line":5602,"end_character":31},"updated":"2017-04-26 15:48:12.000000000","message":"Guessing this might be out of scope for this change (I haven\u0027t gone looking for the context), but unstructured dicts have been a major source of maintenance pain in Nova whenever they have been used. Is there any chance we could not use a dict here?\n\nEven if we don\u0027t want to use ovo here, if we just defined a class with all these fields it would provide an obvious single place to document what all the fields are, provide a defence against key typos, and give maintainers and automated tooling a fighting chance when we inevitably come to change it.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7db7e5766ce298e6493d0a8ebfe582ce83a58551","unresolved":false,"context_lines":[{"line_number":5595,"context_line":"        # compute_nodes record values."},{"line_number":5596,"context_line":"        result \u003d {"},{"line_number":5597,"context_line":"            fields.ResourceClass.VCPU: {"},{"line_number":5598,"context_line":"                \u0027total\u0027: vcpus,"},{"line_number":5599,"context_line":"                \u0027reserved\u0027: 0,"},{"line_number":5600,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":5601,"context_line":"                \u0027max_unit\u0027: vcpus,"},{"line_number":5602,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":5603,"context_line":"            },"},{"line_number":5604,"context_line":"            fields.ResourceClass.MEMORY_MB: {"},{"line_number":5605,"context_line":"                \u0027total\u0027: memory_mb,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_842fdf3d","line":5602,"range":{"start_line":5598,"start_character":0,"end_line":5602,"end_character":31},"in_reply_to":"5ff73747_db22a1a4","updated":"2017-04-27 23:30:58.000000000","message":"@mdbooth: Yeah, in the nested resource providers series, you\u0027ll notice that I\u0027m heading towards a little more structured object-like way of handling inventory and resource provider information:\n\nhttps://review.openstack.org/#/c/415920/","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6df6340c3c1e4eb70b857542744ced34533382e1","unresolved":false,"context_lines":[{"line_number":5595,"context_line":"        # compute_nodes record values."},{"line_number":5596,"context_line":"        result \u003d {"},{"line_number":5597,"context_line":"            fields.ResourceClass.VCPU: {"},{"line_number":5598,"context_line":"                \u0027total\u0027: vcpus,"},{"line_number":5599,"context_line":"                \u0027reserved\u0027: 0,"},{"line_number":5600,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":5601,"context_line":"                \u0027max_unit\u0027: vcpus,"},{"line_number":5602,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":5603,"context_line":"            },"},{"line_number":5604,"context_line":"            fields.ResourceClass.MEMORY_MB: {"},{"line_number":5605,"context_line":"                \u0027total\u0027: memory_mb,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_86692cfa","line":5602,"range":{"start_line":5598,"start_character":0,"end_line":5602,"end_character":31},"in_reply_to":"5ff73747_db22a1a4","updated":"2017-04-27 19:59:39.000000000","message":"Unrelated to what mdbooth is commenting on, but now that I see this, I\u0027m not a fan of the virt driver need to report:\n\n\u0027reserved\u0027: 0,\n\nI\u0027d like to do that in your helper function in the RT.\n\n--\n\nre: mdbooth\u0027s comment, I do like the idea of using an object too, that\u0027s something I\u0027ve wanted before with the massive dict mess that\u0027s returned from the get_available_resource method in the virt drivers. And ffs we even have a method to validate that the driver returns the correct keys:\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L1034","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6df6340c3c1e4eb70b857542744ced34533382e1","unresolved":false,"context_lines":[{"line_number":5601,"context_line":"                \u0027max_unit\u0027: vcpus,"},{"line_number":5602,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":5603,"context_line":"            },"},{"line_number":5604,"context_line":"            fields.ResourceClass.MEMORY_MB: {"},{"line_number":5605,"context_line":"                \u0027total\u0027: memory_mb,"},{"line_number":5606,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":5607,"context_line":"                \u0027max_unit\u0027: memory_mb,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_ba32fcf0","line":5604,"updated":"2017-04-27 19:59:39.000000000","message":"As noted in the RT patch, this is assuming the RT is going to fill in the blanks wrt reserved and allocation_ratio, and that\u0027s why it doesn\u0027t provide those here, but this method knows that the RT doesn\u0027t do anything for reserved CPU - and that\u0027s tight coupling sadness.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0f53553acde1200a53c5fe31c446e9882544074e","unresolved":false,"context_lines":[{"line_number":5601,"context_line":"                \u0027max_unit\u0027: vcpus,"},{"line_number":5602,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":5603,"context_line":"            },"},{"line_number":5604,"context_line":"            fields.ResourceClass.MEMORY_MB: {"},{"line_number":5605,"context_line":"                \u0027total\u0027: memory_mb,"},{"line_number":5606,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":5607,"context_line":"                \u0027max_unit\u0027: memory_mb,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_ce5baff3","line":5604,"in_reply_to":"5ff73747_0b0bc9d5","updated":"2017-04-28 13:55:27.000000000","message":"Done","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7db7e5766ce298e6493d0a8ebfe582ce83a58551","unresolved":false,"context_lines":[{"line_number":5601,"context_line":"                \u0027max_unit\u0027: vcpus,"},{"line_number":5602,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":5603,"context_line":"            },"},{"line_number":5604,"context_line":"            fields.ResourceClass.MEMORY_MB: {"},{"line_number":5605,"context_line":"                \u0027total\u0027: memory_mb,"},{"line_number":5606,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":5607,"context_line":"                \u0027max_unit\u0027: memory_mb,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_e41fc305","line":5604,"in_reply_to":"5ff73747_ba32fcf0","updated":"2017-04-27 23:30:58.000000000","message":"Sure, it\u0027s kinda tight coupling in that sense. With the nested resource providers patch series (https://review.openstack.org/#/c/415920/) we will be moving to a model where a ProviderTree will be passed from the RT to the virt driver, essentially de-coupling this here tribal knowledge. But until we get to nested providers, this will be a little coupled.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f5150cc34551ad3d2e099082f0cc6bdd7e1e494d","unresolved":false,"context_lines":[{"line_number":5601,"context_line":"                \u0027max_unit\u0027: vcpus,"},{"line_number":5602,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":5603,"context_line":"            },"},{"line_number":5604,"context_line":"            fields.ResourceClass.MEMORY_MB: {"},{"line_number":5605,"context_line":"                \u0027total\u0027: memory_mb,"},{"line_number":5606,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":5607,"context_line":"                \u0027max_unit\u0027: memory_mb,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_0b0bc9d5","line":5604,"in_reply_to":"5ff73747_e41fc305","updated":"2017-04-28 13:28:47.000000000","message":"How about as a compromise, we don\u0027t set reserved\u003d0 for vcpu here and handle that as the default in the RT helper method just like we do for memory_mb and disk_gb. That\u0027s the main tight coupling I don\u0027t like here, is that this method doesn\u0027t provide reserved overrides for memory and disk because it knows the RT fills those in, but it sets reserved for vcpu b/c it knows the RT doesn\u0027t handle that case.\n\nI\u0027d like to get to the point that either the driver provides everything (which would be redundant between drivers), or the drivers only override what they need to, and the RT fills in all the blanks.","commit_id":"c68db4b9f8b8e56407fdce07b11e1cf0d700baae"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f597db1c894536dd117815941b35ef2bb54b530a","unresolved":false,"context_lines":[{"line_number":5576,"context_line":"        result \u003d {"},{"line_number":5577,"context_line":"            fields.ResourceClass.VCPU: {"},{"line_number":5578,"context_line":"                \u0027total\u0027: vcpus,"},{"line_number":5579,"context_line":"                \u0027reserved\u0027: 0,"},{"line_number":5580,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":5581,"context_line":"                \u0027max_unit\u0027: vcpus,"},{"line_number":5582,"context_line":"                \u0027step_size\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_aed3c303","line":5579,"range":{"start_line":5579,"start_character":16,"end_line":5579,"end_character":30},"updated":"2017-04-28 14:01:25.000000000","message":"You forgot to remove this.","commit_id":"6c806f645d492067d14d1b1791cdfbec481c6581"}]}
