)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"7795e0b332dd38ddcf6c3e3eb0e1a09e1d51a448","unresolved":false,"context_lines":[{"line_number":16,"context_line":"root_provider_id."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Note that when grouping inventory information for resource classes"},{"line_number":19,"context_line":"within a provider tree, I needed to do a MIN(min_unit), MIN(max_unit),"},{"line_number":20,"context_line":"MIN(step_size) and MIN(allocation_ratio) on the various providers within"},{"line_number":21,"context_line":"that tree. This means that if, for some odd reason, different providers"},{"line_number":22,"context_line":"of the same resource class within a single provider tree end up with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7f96bb07_ca0a821e","line":19,"range":{"start_line":19,"start_character":41,"end_line":19,"end_character":44},"updated":"2018-01-18 09:59:58.000000000","message":"MAX?","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"7795e0b332dd38ddcf6c3e3eb0e1a09e1d51a448","unresolved":false,"context_lines":[{"line_number":21,"context_line":"that tree. This means that if, for some odd reason, different providers"},{"line_number":22,"context_line":"of the same resource class within a single provider tree end up with"},{"line_number":23,"context_line":"different step_size or min_unit values, we make the filter calculation"},{"line_number":24,"context_line":"in the WHERE clause using the minimum value of those inventory fields."},{"line_number":25,"context_line":"This is the only safe way to perform this constraint."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I108f4ab8328fb3c35f30286a3511ac99266e0eeb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7f96bb07_ca584232","line":24,"range":{"start_line":24,"start_character":26,"end_line":24,"end_character":43},"updated":"2018-01-18 09:59:58.000000000","message":"The most strict value?","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"efb4552e24b9fe22c0f76d3397f1b78fe1340744","unresolved":false,"context_lines":[{"line_number":16,"context_line":"root_provider_id."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Note that when grouping inventory information for resource classes"},{"line_number":19,"context_line":"within a provider tree, I needed to do a MIN(min_unit), MIN(max_unit),"},{"line_number":20,"context_line":"MIN(step_size) and MIN(allocation_ratio) on the various providers within"},{"line_number":21,"context_line":"that tree. This means that if, for some odd reason, different providers"},{"line_number":22,"context_line":"of the same resource class within a single provider tree end up with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f96bb07_b1b34ae9","line":19,"range":{"start_line":19,"start_character":41,"end_line":19,"end_character":44},"updated":"2018-01-24 09:55:36.000000000","message":"MAX","commit_id":"e229a2712598e0c51a26c2e2b831a303055b98d7"}],"nova/objects/resource_provider.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dad379e183a51649b685499760fbd4e510b433ca","unresolved":false,"context_lines":[{"line_number":2932,"context_line":"    #     SUM(inventories.total) AS total,"},{"line_number":2933,"context_line":"    #     SUM(inventories.reserved) AS reserved,"},{"line_number":2934,"context_line":"    #     MIN(inventories.min_unit) AS min_unit,"},{"line_number":2935,"context_line":"    #     MAX(inventories.max_unit) AS max_unit,"},{"line_number":2936,"context_line":"    #     MIN(inventories.step_size) AS step_size,"},{"line_number":2937,"context_line":"    #     MIN(inventories.allocation_ratio) AS allocation_ratio"},{"line_number":2938,"context_line":"    #   FROM resource_providers"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_3534c292","line":2935,"range":{"start_line":2935,"start_character":11,"end_line":2935,"end_character":13},"updated":"2018-01-17 18:11:43.000000000","message":"this is actually MIN...","commit_id":"52892a911f0834e8415d9c204f8ce7d211b58466"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"7795e0b332dd38ddcf6c3e3eb0e1a09e1d51a448","unresolved":false,"context_lines":[{"line_number":2924,"context_line":"    #     inventories.resource_class_id,"},{"line_number":2925,"context_line":"    #     SUM(inventories.total) AS total,"},{"line_number":2926,"context_line":"    #     SUM(inventories.reserved) AS reserved,"},{"line_number":2927,"context_line":"    #     MIN(inventories.min_unit) AS min_unit,"},{"line_number":2928,"context_line":"    #     MIN(inventories.max_unit) AS max_unit,"},{"line_number":2929,"context_line":"    #     MIN(inventories.step_size) AS step_size,"},{"line_number":2930,"context_line":"    #     MIN(inventories.allocation_ratio) AS allocation_ratio"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_94cd8386","line":2927,"range":{"start_line":2927,"start_character":10,"end_line":2927,"end_character":13},"updated":"2018-01-18 09:59:58.000000000","message":"Because we want to adjust to the most strict condition, this should be MAX, no?","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4ba795b22e1fab3191763f96a676cb5d0e0dc91b","unresolved":false,"context_lines":[{"line_number":2924,"context_line":"    #     inventories.resource_class_id,"},{"line_number":2925,"context_line":"    #     SUM(inventories.total) AS total,"},{"line_number":2926,"context_line":"    #     SUM(inventories.reserved) AS reserved,"},{"line_number":2927,"context_line":"    #     MIN(inventories.min_unit) AS min_unit,"},{"line_number":2928,"context_line":"    #     MIN(inventories.max_unit) AS max_unit,"},{"line_number":2929,"context_line":"    #     MIN(inventories.step_size) AS step_size,"},{"line_number":2930,"context_line":"    #     MIN(inventories.allocation_ratio) AS allocation_ratio"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_be4f3569","line":2927,"range":{"start_line":2927,"start_character":10,"end_line":2927,"end_character":13},"in_reply_to":"7f96bb07_94cd8386","updated":"2018-01-18 13:14:45.000000000","message":"Yes, you are correct. Nice spot, Tetsuro!","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"674b68a947b63a818a291a5fefe2e61680f36ea6","unresolved":false,"context_lines":[{"line_number":2926,"context_line":"    #     SUM(inventories.reserved) AS reserved,"},{"line_number":2927,"context_line":"    #     MIN(inventories.min_unit) AS min_unit,"},{"line_number":2928,"context_line":"    #     MIN(inventories.max_unit) AS max_unit,"},{"line_number":2929,"context_line":"    #     MIN(inventories.step_size) AS step_size,"},{"line_number":2930,"context_line":"    #     MIN(inventories.allocation_ratio) AS allocation_ratio"},{"line_number":2931,"context_line":"    #   FROM resource_providers"},{"line_number":2932,"context_line":"    #   JOIN inventories"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_f90077ad","line":2929,"range":{"start_line":2929,"start_character":0,"end_line":2929,"end_character":50},"updated":"2018-01-18 14:18:09.000000000","message":"This is also problematic. Consider:\ninv1.step_size \u003d 3 (valid amounts \u003d\u003e 3, 6, 9)\ninv2.step_size \u003d 5 (valid amounts \u003d\u003e 5, 10, 15)\n\nMIN(inv1.step_size, inv2.step_size) \u003d 3 (valid amounts \u003d\u003e 3, 6, 9, 12, 15) But the only amounts that are safely consumable from both inventories are the multiples of 15. So it should be least_common_multiple(inventories.step_size) instead of MIN().","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"674b68a947b63a818a291a5fefe2e61680f36ea6","unresolved":false,"context_lines":[{"line_number":2955,"context_line":"    # WHERE"},{"line_number":2956,"context_line":"    # ("},{"line_number":2957,"context_line":"    #     inv.resource_class_id \u003d $VCPU"},{"line_number":2958,"context_line":"    #     AND (((inv.total - inv.reserved) * inv.allocation_ratio) \u003c"},{"line_number":2959,"context_line":"    #          (COALESCE(usage.used, 0) + $VCPU_REQUESTED))"},{"line_number":2960,"context_line":"    #     AND inv.min_unit \u003e\u003d $VCPU_REQUESTED"},{"line_number":2961,"context_line":"    #     AND inv.max_unit \u003c\u003d $VCPU_REQUESTED"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_996e13fe","line":2958,"range":{"start_line":2958,"start_character":43,"end_line":2958,"end_character":66},"updated":"2018-01-18 14:18:09.000000000","message":"I\u0027m definitely lost in this SQL but which allocation_ratio we are using here when we have multiple inventories with potentially different ratios? I guess this is the \u0027MIN(inventories.allocation_ratio) AS allocation_ratio\u0027 from L2930. \n\nSo here the code could potentially (and safely) underestimate the amount of consumable resource we have. E.g. in case inv1.allocation_ratio \u003d 1 and inv2.allocation_ration \u003d 16 then this code will use allocation_ratio 1 for the calculation. This is safe so this will never overconsume but it will not allow optimal consumption. \n\nI guess this is where Eric\u0027s idea about permutations could allow for more optimal consumption of resources. \n\nCan we simply forbid to have different allocation_ratio, step_size and min/max_unit for the same resource class in the same tree? At least initially while we figure out how to support every possible edge cases?","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"7795e0b332dd38ddcf6c3e3eb0e1a09e1d51a448","unresolved":false,"context_lines":[{"line_number":2989,"context_line":"            _INV_TBL.c.resource_class_id,"},{"line_number":2990,"context_line":"            sql.func.sum(_INV_TBL.c.total).label(\u0027total\u0027),"},{"line_number":2991,"context_line":"            sql.func.sum(_INV_TBL.c.reserved).label(\u0027reserved\u0027),"},{"line_number":2992,"context_line":"            sql.func.min(_INV_TBL.c.min_unit).label(\u0027min_unit\u0027),"},{"line_number":2993,"context_line":"            sql.func.min(_INV_TBL.c.max_unit).label(\u0027max_unit\u0027),"},{"line_number":2994,"context_line":"            sql.func.min(_INV_TBL.c.step_size).label(\u0027step_size\u0027),"},{"line_number":2995,"context_line":"            sql.func.min(_INV_TBL.c.allocation_ratio).label("}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_6fb10047","line":2992,"range":{"start_line":2992,"start_character":21,"end_line":2992,"end_character":24},"updated":"2018-01-18 09:59:58.000000000","message":"ditto","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"674b68a947b63a818a291a5fefe2e61680f36ea6","unresolved":false,"context_lines":[{"line_number":2991,"context_line":"            sql.func.sum(_INV_TBL.c.reserved).label(\u0027reserved\u0027),"},{"line_number":2992,"context_line":"            sql.func.min(_INV_TBL.c.min_unit).label(\u0027min_unit\u0027),"},{"line_number":2993,"context_line":"            sql.func.min(_INV_TBL.c.max_unit).label(\u0027max_unit\u0027),"},{"line_number":2994,"context_line":"            sql.func.min(_INV_TBL.c.step_size).label(\u0027step_size\u0027),"},{"line_number":2995,"context_line":"            sql.func.min(_INV_TBL.c.allocation_ratio).label("},{"line_number":2996,"context_line":"                \u0027allocation_ratio\u0027),"},{"line_number":2997,"context_line":"        ]).select_from(rp_to_inv).where("}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_f92cf7ac","line":2994,"range":{"start_line":2994,"start_character":21,"end_line":2994,"end_character":24},"updated":"2018-01-18 14:18:09.000000000","message":"I guess this needs an LCM function, see my comment at L2929","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3d3ec8b817af6315c07ecdaccd914027fc53b3b4","unresolved":false,"context_lines":[{"line_number":2991,"context_line":"            sql.func.sum(_INV_TBL.c.reserved).label(\u0027reserved\u0027),"},{"line_number":2992,"context_line":"            sql.func.min(_INV_TBL.c.min_unit).label(\u0027min_unit\u0027),"},{"line_number":2993,"context_line":"            sql.func.min(_INV_TBL.c.max_unit).label(\u0027max_unit\u0027),"},{"line_number":2994,"context_line":"            sql.func.min(_INV_TBL.c.step_size).label(\u0027step_size\u0027),"},{"line_number":2995,"context_line":"            sql.func.min(_INV_TBL.c.allocation_ratio).label("},{"line_number":2996,"context_line":"                \u0027allocation_ratio\u0027),"},{"line_number":2997,"context_line":"        ]).select_from(rp_to_inv).where("}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_f8a1aeaa","line":2994,"range":{"start_line":2994,"start_character":21,"end_line":2994,"end_character":24},"in_reply_to":"7f96bb07_b1b90a7a","updated":"2018-01-24 14:36:30.000000000","message":"How can be the LCM(A, B) nonexistent? In the worst case LCM(A, B) is A * B.","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"28cad302345b99f9182e05061e14ae9e338d58d9","unresolved":false,"context_lines":[{"line_number":2991,"context_line":"            sql.func.sum(_INV_TBL.c.reserved).label(\u0027reserved\u0027),"},{"line_number":2992,"context_line":"            sql.func.min(_INV_TBL.c.min_unit).label(\u0027min_unit\u0027),"},{"line_number":2993,"context_line":"            sql.func.min(_INV_TBL.c.max_unit).label(\u0027max_unit\u0027),"},{"line_number":2994,"context_line":"            sql.func.min(_INV_TBL.c.step_size).label(\u0027step_size\u0027),"},{"line_number":2995,"context_line":"            sql.func.min(_INV_TBL.c.allocation_ratio).label("},{"line_number":2996,"context_line":"                \u0027allocation_ratio\u0027),"},{"line_number":2997,"context_line":"        ]).select_from(rp_to_inv).where("}],"source_content_type":"text/x-python","patch_set":2,"id":"5f93b717_7f2659ba","line":2994,"range":{"start_line":2994,"start_character":21,"end_line":2994,"end_character":24},"in_reply_to":"7f96bb07_f8a1aeaa","updated":"2018-01-25 03:51:53.000000000","message":"Oh, right, my bad. pls ignore last comment.","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"efb4552e24b9fe22c0f76d3397f1b78fe1340744","unresolved":false,"context_lines":[{"line_number":2991,"context_line":"            sql.func.sum(_INV_TBL.c.reserved).label(\u0027reserved\u0027),"},{"line_number":2992,"context_line":"            sql.func.min(_INV_TBL.c.min_unit).label(\u0027min_unit\u0027),"},{"line_number":2993,"context_line":"            sql.func.min(_INV_TBL.c.max_unit).label(\u0027max_unit\u0027),"},{"line_number":2994,"context_line":"            sql.func.min(_INV_TBL.c.step_size).label(\u0027step_size\u0027),"},{"line_number":2995,"context_line":"            sql.func.min(_INV_TBL.c.allocation_ratio).label("},{"line_number":2996,"context_line":"                \u0027allocation_ratio\u0027),"},{"line_number":2997,"context_line":"        ]).select_from(rp_to_inv).where("}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_b1b90a7a","line":2994,"range":{"start_line":2994,"start_character":21,"end_line":2994,"end_character":24},"in_reply_to":"7f96bb07_f92cf7ac","updated":"2018-01-24 09:55:36.000000000","message":"++, and what happened if the LCM does NOT exist?\n\nI think maybe we can check whether there is a LCM of these step_sizes, no need to select the result if the LCM does NOT exists.","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"7795e0b332dd38ddcf6c3e3eb0e1a09e1d51a448","unresolved":false,"context_lines":[{"line_number":3050,"context_line":""},{"line_number":3051,"context_line":"    sel \u003d sel.select_from(rp_inv_usage_join)"},{"line_number":3052,"context_line":"    sel \u003d sel.where("},{"line_number":3053,"context_line":"        sa.and_(inv.c.resource_class_id.in_(resources),"},{"line_number":3054,"context_line":"                sa.or_(*usage_conds)))"},{"line_number":3055,"context_line":"    sel \u003d sel.group_by(rpt.c.root_provider_id)"},{"line_number":3056,"context_line":"    sel \u003d sel.having("}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_14cdf32f","line":3053,"range":{"start_line":3053,"start_character":16,"end_line":3053,"end_character":55},"updated":"2018-01-18 09:59:58.000000000","message":"This condition is dropped from the comment, but it is still here.","commit_id":"9801cf86ebf945173e6e5d2a5992e4d32b2cdb31"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"efb4552e24b9fe22c0f76d3397f1b78fe1340744","unresolved":false,"context_lines":[{"line_number":2915,"context_line":"    #     inventories.resource_class_id,"},{"line_number":2916,"context_line":"    #     SUM(inventories.total) AS total,"},{"line_number":2917,"context_line":"    #     SUM(inventories.reserved) AS reserved,"},{"line_number":2918,"context_line":"    #     MIN(inventories.min_unit) AS min_unit,"},{"line_number":2919,"context_line":"    #     MIN(inventories.max_unit) AS max_unit,"},{"line_number":2920,"context_line":"    #     MIN(inventories.step_size) AS step_size,"},{"line_number":2921,"context_line":"    #     MIN(inventories.allocation_ratio) AS allocation_ratio"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_11a9de7a","line":2918,"range":{"start_line":2918,"start_character":10,"end_line":2918,"end_character":13},"updated":"2018-01-24 09:55:36.000000000","message":"MAX","commit_id":"e229a2712598e0c51a26c2e2b831a303055b98d7"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"efb4552e24b9fe22c0f76d3397f1b78fe1340744","unresolved":false,"context_lines":[{"line_number":2980,"context_line":"            _INV_TBL.c.resource_class_id,"},{"line_number":2981,"context_line":"            sql.func.sum(_INV_TBL.c.total).label(\u0027total\u0027),"},{"line_number":2982,"context_line":"            sql.func.sum(_INV_TBL.c.reserved).label(\u0027reserved\u0027),"},{"line_number":2983,"context_line":"            sql.func.min(_INV_TBL.c.min_unit).label(\u0027min_unit\u0027),"},{"line_number":2984,"context_line":"            sql.func.min(_INV_TBL.c.max_unit).label(\u0027max_unit\u0027),"},{"line_number":2985,"context_line":"            sql.func.min(_INV_TBL.c.step_size).label(\u0027step_size\u0027),"},{"line_number":2986,"context_line":"            sql.func.min(_INV_TBL.c.allocation_ratio).label("}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_9195ee34","line":2983,"range":{"start_line":2983,"start_character":21,"end_line":2983,"end_character":24},"updated":"2018-01-24 09:55:36.000000000","message":"max","commit_id":"e229a2712598e0c51a26c2e2b831a303055b98d7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"247c34ccab6c51c3db0a685349e20f2a79892337","unresolved":false,"context_lines":[{"line_number":2980,"context_line":"            _INV_TBL.c.resource_class_id,"},{"line_number":2981,"context_line":"            sql.func.sum(_INV_TBL.c.total).label(\u0027total\u0027),"},{"line_number":2982,"context_line":"            sql.func.sum(_INV_TBL.c.reserved).label(\u0027reserved\u0027),"},{"line_number":2983,"context_line":"            sql.func.min(_INV_TBL.c.min_unit).label(\u0027min_unit\u0027),"},{"line_number":2984,"context_line":"            sql.func.min(_INV_TBL.c.max_unit).label(\u0027max_unit\u0027),"},{"line_number":2985,"context_line":"            sql.func.min(_INV_TBL.c.step_size).label(\u0027step_size\u0027),"},{"line_number":2986,"context_line":"            sql.func.min(_INV_TBL.c.allocation_ratio).label("}],"source_content_type":"text/x-python","patch_set":3,"id":"5f93b717_bb14954f","line":2983,"range":{"start_line":2983,"start_character":21,"end_line":2983,"end_character":24},"in_reply_to":"7f96bb07_9195ee34","updated":"2018-01-29 16:39:16.000000000","message":"Done","commit_id":"e229a2712598e0c51a26c2e2b831a303055b98d7"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"6324db9ce10a6966b3e2c1f1b29fd290b58e9599","unresolved":false,"context_lines":[{"line_number":2981,"context_line":"            sql.func.sum(_INV_TBL.c.total).label(\u0027total\u0027),"},{"line_number":2982,"context_line":"            sql.func.sum(_INV_TBL.c.reserved).label(\u0027reserved\u0027),"},{"line_number":2983,"context_line":"            sql.func.min(_INV_TBL.c.min_unit).label(\u0027min_unit\u0027),"},{"line_number":2984,"context_line":"            sql.func.min(_INV_TBL.c.max_unit).label(\u0027max_unit\u0027),"},{"line_number":2985,"context_line":"            sql.func.min(_INV_TBL.c.step_size).label(\u0027step_size\u0027),"},{"line_number":2986,"context_line":"            sql.func.min(_INV_TBL.c.allocation_ratio).label("},{"line_number":2987,"context_line":"                \u0027allocation_ratio\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f93b717_380ad489","line":2984,"range":{"start_line":2984,"start_character":12,"end_line":2984,"end_character":64},"updated":"2018-01-29 07:22:43.000000000","message":"Consider the situation as below:\n                  compute node (cn)\n                 /                 \\\n                /                   \\\n           numa cell 0         numa cell 1\n           (mem: 2048,         (mem: 512,\n            max_unit: 2048)     max_unit: 512)\n\nWhen we request 1024 MB memory, it seems we can\u0027t get the \"cn\" as a target host, since 1024 \u003c min(512, 2048).","commit_id":"e229a2712598e0c51a26c2e2b831a303055b98d7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"247c34ccab6c51c3db0a685349e20f2a79892337","unresolved":false,"context_lines":[{"line_number":2981,"context_line":"            sql.func.sum(_INV_TBL.c.total).label(\u0027total\u0027),"},{"line_number":2982,"context_line":"            sql.func.sum(_INV_TBL.c.reserved).label(\u0027reserved\u0027),"},{"line_number":2983,"context_line":"            sql.func.min(_INV_TBL.c.min_unit).label(\u0027min_unit\u0027),"},{"line_number":2984,"context_line":"            sql.func.min(_INV_TBL.c.max_unit).label(\u0027max_unit\u0027),"},{"line_number":2985,"context_line":"            sql.func.min(_INV_TBL.c.step_size).label(\u0027step_size\u0027),"},{"line_number":2986,"context_line":"            sql.func.min(_INV_TBL.c.allocation_ratio).label("},{"line_number":2987,"context_line":"                \u0027allocation_ratio\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f93b717_fb1a1d7b","line":2984,"range":{"start_line":2984,"start_character":12,"end_line":2984,"end_character":64},"in_reply_to":"5f93b717_380ad489","updated":"2018-01-29 16:39:16.000000000","message":"Done. Added test in previous patch...","commit_id":"e229a2712598e0c51a26c2e2b831a303055b98d7"}],"nova/tests/functional/db/test_allocation_candidates.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e959533fab70625d8b5951a052d6ec3546e2a9ee","unresolved":false,"context_lines":[{"line_number":1591,"context_line":""},{"line_number":1592,"context_line":"        # We should still get the tree returned"},{"line_number":1593,"context_line":"        trees \u003d rp_obj._get_trees_matching_all(self.ctx, resources, traits)"},{"line_number":1594,"context_line":"        self.assertEqual(1, len(trees))"},{"line_number":1595,"context_line":""},{"line_number":1596,"context_line":"        # And now consume one VF on the first PF provider and verify the tree"},{"line_number":1597,"context_line":"        # representing the compute node no longer is returned by"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_e3445d76","line":1594,"updated":"2018-01-17 22:25:06.000000000","message":"nice that this case is now fixed, but the approach taken begs a lot more, and more complex, scenarios.  In particular where disparate providers of the same resource have different adjusters (min/max units, allocation ratios, etc.)","commit_id":"52892a911f0834e8415d9c204f8ce7d211b58466"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2cb4df48690ef168b03a0d0e5c4603430f08a9c1","unresolved":false,"context_lines":[{"line_number":1591,"context_line":""},{"line_number":1592,"context_line":"        # We should still get the tree returned"},{"line_number":1593,"context_line":"        trees \u003d rp_obj._get_trees_matching_all(self.ctx, resources, traits)"},{"line_number":1594,"context_line":"        self.assertEqual(1, len(trees))"},{"line_number":1595,"context_line":""},{"line_number":1596,"context_line":"        # And now consume one VF on the first PF provider and verify the tree"},{"line_number":1597,"context_line":"        # representing the compute node no longer is returned by"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_a4ac029f","line":1594,"in_reply_to":"7f96bb07_e3445d76","updated":"2018-01-18 14:19:20.000000000","message":"+1 for mooore tests :)","commit_id":"52892a911f0834e8415d9c204f8ce7d211b58466"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"e5ea40256b1aee6aead21eeb6d297727c7077168","unresolved":false,"context_lines":[{"line_number":1840,"context_line":"        # amount that is less than the maximum min_unit (512)"},{"line_number":1841,"context_line":"        # TODO(jaypipes): This is currently broken and should really be:"},{"line_number":1842,"context_line":"        # self.assertEqual(0, len(trees))"},{"line_number":1843,"context_line":"        self.assertEqual(1, len(trees))"},{"line_number":1844,"context_line":""},{"line_number":1845,"context_line":"        # OK, now consume all the RAM on the first NUMA cell"},{"line_number":1846,"context_line":"        _allocate_from_provider(numa_cell0, fields.ResourceClass.MEMORY_MB,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f93b717_04f88f78","line":1843,"range":{"start_line":1843,"start_character":0,"end_line":1843,"end_character":39},"updated":"2018-01-31 12:15:14.000000000","message":"Rebasing error with the next following patch. I know this kind of rebasing work kills us...","commit_id":"2a99769560990c93180e51b0ffdb032ff18db9d0"}]}
