)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"f0b85834fb7cd63871458c933a7ba71af2b80d47","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Check \u0027thin_provisioning\u0027 in extra specs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently in the capacity filter and weigher of the scheduler,"},{"line_number":10,"context_line":"we use the the logic to evaluate whether there is enough capacity"},{"line_number":11,"context_line":"to thin provision a share on a backend if the driver reports"},{"line_number":12,"context_line":"thin_provisioning to be True. However, a driver may be able to"},{"line_number":13,"context_line":"support both thin and non-thin provisioning. The logic does not"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dab17558_09163455","line":10,"range":{"start_line":10,"start_character":7,"end_line":10,"end_character":14},"updated":"2016-05-12 10:54:02.000000000","message":"Double the, double the.","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b548716cabcd4cf1146e01864ffcaca19a6238de","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Check \u0027thin_provisioning\u0027 in extra specs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently in the capacity filter and weigher of the scheduler,"},{"line_number":10,"context_line":"we use the the logic to evaluate whether there is enough capacity"},{"line_number":11,"context_line":"to thin provision a share on a backend if the driver reports"},{"line_number":12,"context_line":"thin_provisioning to be True. However, a driver may be able to"},{"line_number":13,"context_line":"support both thin and non-thin provisioning. The logic does not"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3aaa91ec_28e47f39","line":10,"range":{"start_line":10,"start_character":7,"end_line":10,"end_character":14},"in_reply_to":"dab17558_09163455","updated":"2016-06-23 04:53:41.000000000","message":"Done","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"608f841a469d2ccceaa8e8ddb4cd76f2d129957f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"   provide backward compatibility."},{"line_number":22,"context_line":"2) \u0027thin_provisioning\u0027 is set in extra specs and it is"},{"line_number":23,"context_line":"   \u0027\u003cis\u003e True\u0027 or \u0027True\u0027."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: I238a7962425ea35c356c5ed2e31b8f68462b3769"},{"line_number":26,"context_line":"Closes-Bug: #1578718"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1aa78d24_5b172145","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":0},"updated":"2016-07-15 03:57:58.000000000","message":"DocImpact please\n\nWe need to document how the max oversubscription ratio for thin provisioning works... I wasn\u0027t able to find any upstream (or admin) documentation regarding this..","commit_id":"80c305b2baa7719b5fa94c31154ed1734e1519e0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"9fcd1d1b9e4acb5e1bec37d03bc1d7ec7860d3ce","unresolved":false,"context_lines":[{"line_number":21,"context_line":"   provide backward compatibility."},{"line_number":22,"context_line":"2) \u0027thin_provisioning\u0027 is set in extra specs and it is"},{"line_number":23,"context_line":"   \u0027\u003cis\u003e True\u0027 or \u0027True\u0027."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: I238a7962425ea35c356c5ed2e31b8f68462b3769"},{"line_number":26,"context_line":"Closes-Bug: #1578718"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fad55976_93cb861e","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":0},"in_reply_to":"1aa78d24_5b172145","updated":"2016-07-15 15:11:14.000000000","message":"Done\n\nYes, we should document this.","commit_id":"80c305b2baa7719b5fa94c31154ed1734e1519e0"}],"manila/scheduler/filters/capacity.py":[{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"6b53f1a94cd2280fa3b58905e80943a3c270b4a7","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # NOTE(xyang): To preserve the existing behavior, we use thin logic"},{"line_number":81,"context_line":"        # to evaluate in two case:"},{"line_number":82,"context_line":"        # 1) \u0027thin_provisioning\u0027 is not set in extra specs."},{"line_number":83,"context_line":"        # 2) \u0027thin_provisioning\u0027 is set in extra specs and it is \u0027\u003cis\u003e True\u0027."},{"line_number":84,"context_line":"        # Otherwise we use the thick logic to evaluate."},{"line_number":85,"context_line":"        use_thin_logic \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_929268f4","line":82,"range":{"start_line":82,"start_character":58,"end_line":82,"end_character":59},"updated":"2016-05-11 23:52:30.000000000","message":"This makes thin_provisioning the default. Makes sense, but we need to document that in our devref common capabilities doc.","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b548716cabcd4cf1146e01864ffcaca19a6238de","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # NOTE(xyang): To preserve the existing behavior, we use thin logic"},{"line_number":81,"context_line":"        # to evaluate in two case:"},{"line_number":82,"context_line":"        # 1) \u0027thin_provisioning\u0027 is not set in extra specs."},{"line_number":83,"context_line":"        # 2) \u0027thin_provisioning\u0027 is set in extra specs and it is \u0027\u003cis\u003e True\u0027."},{"line_number":84,"context_line":"        # Otherwise we use the thick logic to evaluate."},{"line_number":85,"context_line":"        use_thin_logic \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_08742366","line":82,"range":{"start_line":82,"start_character":58,"end_line":82,"end_character":59},"in_reply_to":"bab6814e_5f8b701e","updated":"2016-06-23 04:53:41.000000000","message":"Yes, thin_provisioning is False by default, I\u0027m not changing that here.  This is for backward compatibility.  If \u0027thin_provisioning\u0027 not set in extra specs, we still use the original logic in the scheduler (meaning the scheduler behaves the same way as before this bug fix)\n\nYes, we need to document it clearly.","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"9d793c9243e2128b442175e82b6f3545914d7bd8","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # NOTE(xyang): To preserve the existing behavior, we use thin logic"},{"line_number":81,"context_line":"        # to evaluate in two case:"},{"line_number":82,"context_line":"        # 1) \u0027thin_provisioning\u0027 is not set in extra specs."},{"line_number":83,"context_line":"        # 2) \u0027thin_provisioning\u0027 is set in extra specs and it is \u0027\u003cis\u003e True\u0027."},{"line_number":84,"context_line":"        # Otherwise we use the thick logic to evaluate."},{"line_number":85,"context_line":"        use_thin_logic \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_5f8b701e","line":82,"range":{"start_line":82,"start_character":58,"end_line":82,"end_character":59},"in_reply_to":"dab17558_929268f4","updated":"2016-05-25 13:59:57.000000000","message":"I believe thin_provisioning false used to be the default, are we changing the default?","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"223e05fcd101fbc386dc10849b78746d2389b8cf","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        # 2) \u0027thin_provisioning\u0027 is set in extra specs and it is \u0027\u003cis\u003e True\u0027."},{"line_number":84,"context_line":"        # Otherwise we use the thick logic to evaluate."},{"line_number":85,"context_line":"        use_thin_logic \u003d True"},{"line_number":86,"context_line":"        thin_spec \u003d filter_properties.get(\u0027share_type\u0027).get("},{"line_number":87,"context_line":"            \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":88,"context_line":"        if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":89,"context_line":"            use_thin_logic \u003d False"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_0c6db8cb","line":87,"range":{"start_line":86,"start_character":20,"end_line":87,"end_character":26},"updated":"2016-05-12 01:15:36.000000000","message":"The \"filter_properties.get(\u0027share_type\u0027).get(\u0027extra_specs\u0027)\" could be None. so \"None.get(\u0027thin_provisioning\u0027)\" it will return error. How about change to :\n\"\"\"\"\"\"\"\"\"\"\nextra_specs \u003d filter_properties.get(\u0027share_type\u0027).get(\u0027extra_specs\u0027, [])\nif not extra_specs:\n    use_thin_logic \u003d False\n\"\"\"\"\"\"\"\"\"\"\"","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"223e05fcd101fbc386dc10849b78746d2389b8cf","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # Otherwise we use the thick logic to evaluate."},{"line_number":85,"context_line":"        use_thin_logic \u003d True"},{"line_number":86,"context_line":"        thin_spec \u003d filter_properties.get(\u0027share_type\u0027).get("},{"line_number":87,"context_line":"            \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":88,"context_line":"        if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":89,"context_line":"            use_thin_logic \u003d False"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_4cfce0b7","line":87,"range":{"start_line":87,"start_character":31,"end_line":87,"end_character":50},"updated":"2016-05-12 01:15:36.000000000","message":"We support both \"capabilities:thin_provisioning\" and \"thin_provisioning\".\n\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nextra_specs \u003d filter_properties.get(\u0027share_type\u0027).get(\u0027extra_specs\u0027, [])\nif not extra_specs:\n    use_thin_logic \u003d False\nelif extra_specs.get(\u0027thin_provisioning\u0027) or extra_specs.get(\u0027capabilities:thin_provisioning\u0027):\n    use_thin_logic \u003d True\n\"\"\"\"\"\"\"\"\"\"\"\"\"","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b548716cabcd4cf1146e01864ffcaca19a6238de","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # Otherwise we use the thick logic to evaluate."},{"line_number":85,"context_line":"        use_thin_logic \u003d True"},{"line_number":86,"context_line":"        thin_spec \u003d filter_properties.get(\u0027share_type\u0027).get("},{"line_number":87,"context_line":"            \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":88,"context_line":"        if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":89,"context_line":"            use_thin_logic \u003d False"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_6830479f","line":87,"range":{"start_line":87,"start_character":31,"end_line":87,"end_character":50},"in_reply_to":"bab6814e_9aa846dd","updated":"2016-06-23 04:53:41.000000000","message":"Done.  Default needs to be None though as I need to determine whether it exists.","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"9d793c9243e2128b442175e82b6f3545914d7bd8","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # Otherwise we use the thick logic to evaluate."},{"line_number":85,"context_line":"        use_thin_logic \u003d True"},{"line_number":86,"context_line":"        thin_spec \u003d filter_properties.get(\u0027share_type\u0027).get("},{"line_number":87,"context_line":"            \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":88,"context_line":"        if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":89,"context_line":"            use_thin_logic \u003d False"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_9aa846dd","line":87,"range":{"start_line":87,"start_character":31,"end_line":87,"end_character":50},"in_reply_to":"dab17558_4cfce0b7","updated":"2016-05-25 13:59:57.000000000","message":"how about:\n\nthin_spec \u003d filter_properties.get(\u0027share_type\u0027,{}).get(\n            \u0027extra_specs\u0027,{}).get(\u0027thin_provisioning\u0027, False)","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"6b53f1a94cd2280fa3b58905e80943a3c270b4a7","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        use_thin_logic \u003d True"},{"line_number":86,"context_line":"        thin_spec \u003d filter_properties.get(\u0027share_type\u0027).get("},{"line_number":87,"context_line":"            \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":88,"context_line":"        if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":89,"context_line":"            use_thin_logic \u003d False"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        # NOTE(xyang): Only evaluate using max_over_subscription_ratio"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_52576057","line":88,"range":{"start_line":88,"start_character":48,"end_line":88,"end_character":50},"updated":"2016-05-11 23:52:30.000000000","message":"We support boolean matching now (in addition to the \u0027\u003cis\u003e True\u0027 style) so this needs to do that also.  See extra_specs_ops.py use of strutils.bool_from_string(). You could leverage extra_specs_ops.match().","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b548716cabcd4cf1146e01864ffcaca19a6238de","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        use_thin_logic \u003d True"},{"line_number":86,"context_line":"        thin_spec \u003d filter_properties.get(\u0027share_type\u0027).get("},{"line_number":87,"context_line":"            \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":88,"context_line":"        if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":89,"context_line":"            use_thin_logic \u003d False"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        # NOTE(xyang): Only evaluate using max_over_subscription_ratio"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_e81c3715","line":88,"range":{"start_line":88,"start_character":48,"end_line":88,"end_character":50},"in_reply_to":"dab17558_4cb2204d","updated":"2016-06-23 04:53:41.000000000","message":"Done","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"223e05fcd101fbc386dc10849b78746d2389b8cf","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        use_thin_logic \u003d True"},{"line_number":86,"context_line":"        thin_spec \u003d filter_properties.get(\u0027share_type\u0027).get("},{"line_number":87,"context_line":"            \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":88,"context_line":"        if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":89,"context_line":"            use_thin_logic \u003d False"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        # NOTE(xyang): Only evaluate using max_over_subscription_ratio"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_4cb2204d","line":88,"range":{"start_line":88,"start_character":48,"end_line":88,"end_character":50},"in_reply_to":"dab17558_52576057","updated":"2016-05-12 01:15:36.000000000","message":"+1  We support \u0027\u003cis\u003e True\u0027, \u0027\u003cis\u003e true\u0027, \u0027True\u0027, and \u0027true\u0027. so I agree with Mark Sturdevant about use of strutils.bool_from_string().","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"52f6036b27c4409ced5852178fe7af90578c2548","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        # If max_over_subscription_ratio \u003d 1, the provisioned_ratio"},{"line_number":96,"context_line":"        # should still be limited by the max_over_subscription_ratio;"},{"line_number":97,"context_line":"        # otherwise, it could result in infinite provisioning."},{"line_number":98,"context_line":"        if (use_thin_logic and host_state.thin_provisioning and"},{"line_number":99,"context_line":"                host_state.max_over_subscription_ratio \u003e\u003d 1):"},{"line_number":100,"context_line":"            provisioned_ratio \u003d ((host_state.provisioned_capacity_gb +"},{"line_number":101,"context_line":"                                  share_size) / total)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_7da4f549","line":98,"range":{"start_line":98,"start_character":31,"end_line":98,"end_character":59},"updated":"2016-05-12 00:06:48.000000000","message":"Would host_state_thin_provisioning now accept a tuple/list (True,False) here? Code is currently assuming it is a boolean.  (False,) breaks this.","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b548716cabcd4cf1146e01864ffcaca19a6238de","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        # If max_over_subscription_ratio \u003d 1, the provisioned_ratio"},{"line_number":96,"context_line":"        # should still be limited by the max_over_subscription_ratio;"},{"line_number":97,"context_line":"        # otherwise, it could result in infinite provisioning."},{"line_number":98,"context_line":"        if (use_thin_logic and host_state.thin_provisioning and"},{"line_number":99,"context_line":"                host_state.max_over_subscription_ratio \u003e\u003d 1):"},{"line_number":100,"context_line":"            provisioned_ratio \u003d ((host_state.provisioned_capacity_gb +"},{"line_number":101,"context_line":"                                  share_size) / total)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_28ee3fec","line":98,"range":{"start_line":98,"start_character":31,"end_line":98,"end_character":59},"in_reply_to":"dab17558_7da4f549","updated":"2016-06-23 04:53:41.000000000","message":"So this is a new.  When I implemented this, I was assuming thin_provisioning\u003dTrue or False as in Cinder.  In the bug report, [True, False] is reported by the NetApp driver.  So I need to change this code here to handle that.  This could be either Boolean or [True, False].","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"6b53f1a94cd2280fa3b58905e80943a3c270b4a7","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                adjusted_free_virtual \u003d ("},{"line_number":117,"context_line":"                    free * host_state.max_over_subscription_ratio)"},{"line_number":118,"context_line":"                return adjusted_free_virtual \u003e\u003d share_size"},{"line_number":119,"context_line":"        elif host_state.thin_provisioning:"},{"line_number":120,"context_line":"            LOG.error(_LE(\"Invalid max_over_subscription_ratio: %(ratio)s. \""},{"line_number":121,"context_line":"                          \"Valid value should be \u003e\u003d 1.\"),"},{"line_number":122,"context_line":"                      {\"ratio\": host_state.max_over_subscription_ratio})"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_9dac398d","line":119,"range":{"start_line":119,"start_character":8,"end_line":119,"end_character":42},"updated":"2016-05-11 23:52:30.000000000","message":"I\u0027d put the if and this elif inside an \"if use_thin_logic\" block. The elif only applies to thin.","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"9d793c9243e2128b442175e82b6f3545914d7bd8","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                adjusted_free_virtual \u003d ("},{"line_number":117,"context_line":"                    free * host_state.max_over_subscription_ratio)"},{"line_number":118,"context_line":"                return adjusted_free_virtual \u003e\u003d share_size"},{"line_number":119,"context_line":"        elif host_state.thin_provisioning:"},{"line_number":120,"context_line":"            LOG.error(_LE(\"Invalid max_over_subscription_ratio: %(ratio)s. \""},{"line_number":121,"context_line":"                          \"Valid value should be \u003e\u003d 1.\"),"},{"line_number":122,"context_line":"                      {\"ratio\": host_state.max_over_subscription_ratio})"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_df07601b","line":119,"range":{"start_line":119,"start_character":8,"end_line":119,"end_character":42},"in_reply_to":"dab17558_9dac398d","updated":"2016-05-25 13:59:57.000000000","message":"The way I understood it, no, if thin provisioning is not specified then we still could have it by default (which I don\u0027t agree), so we would need to check it here.","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"984a443ea2c345d5f3b498cb49e00c664c8ec0f1","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                adjusted_free_virtual \u003d ("},{"line_number":111,"context_line":"                    free * host_state.max_over_subscription_ratio)"},{"line_number":112,"context_line":"                return adjusted_free_virtual \u003e\u003d share_size"},{"line_number":113,"context_line":"        elif thin_provisioning:"},{"line_number":114,"context_line":"            LOG.error(_LE(\"Invalid max_over_subscription_ratio: %(ratio)s. \""},{"line_number":115,"context_line":"                          \"Valid value should be \u003e\u003d 1.\"),"},{"line_number":116,"context_line":"                      {\"ratio\": host_state.max_over_subscription_ratio})"},{"line_number":117,"context_line":"            return False"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        if free \u003c share_size:"},{"line_number":120,"context_line":"            LOG.warning(_LW(\"Insufficient free space for share creation \""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_a6569e27","line":117,"range":{"start_line":113,"start_character":8,"end_line":117,"end_character":24},"updated":"2016-06-24 03:47:02.000000000","message":"If the host_state.max_over_subscription_ratio value \u003e\u003d 1 ,thin_provisioning is true, and use_thin_logic is False. \nWe will enter this branch, then return False and log error:\"Invalid max_over_subscription_ratio\". \nThis is not we expected.\n\nHow about change to this:\n\"\"\"\"\"\nelif thin_provisioning and\n    host_state.max_over_subscription_ratio \u003c 1):\n\"\"\"\"","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"6f6b621a8f7adeaa3475651cfa9d927c29901143","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                adjusted_free_virtual \u003d ("},{"line_number":111,"context_line":"                    free * host_state.max_over_subscription_ratio)"},{"line_number":112,"context_line":"                return adjusted_free_virtual \u003e\u003d share_size"},{"line_number":113,"context_line":"        elif thin_provisioning:"},{"line_number":114,"context_line":"            LOG.error(_LE(\"Invalid max_over_subscription_ratio: %(ratio)s. \""},{"line_number":115,"context_line":"                          \"Valid value should be \u003e\u003d 1.\"),"},{"line_number":116,"context_line":"                      {\"ratio\": host_state.max_over_subscription_ratio})"},{"line_number":117,"context_line":"            return False"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        if free \u003c share_size:"},{"line_number":120,"context_line":"            LOG.warning(_LW(\"Insufficient free space for share creation \""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_eae680e6","line":117,"range":{"start_line":113,"start_character":8,"end_line":117,"end_character":24},"in_reply_to":"3aaa91ec_a6569e27","updated":"2016-06-25 02:14:42.000000000","message":"Done","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"608f841a469d2ccceaa8e8ddb4cd76f2d129957f","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                  \"on host %(host)s (requested / avail): \""},{"line_number":79,"context_line":"                  \"%(requested)s/%(available)s\", msg_args)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        use_thin_logic \u003d utils.use_thin_logic(filter_properties)"},{"line_number":82,"context_line":"        thin_provisioning \u003d utils.thin_provisioning("},{"line_number":83,"context_line":"            host_state.thin_provisioning)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_5848c7b3","line":81,"range":{"start_line":81,"start_character":46,"end_line":81,"end_character":63},"updated":"2016-07-15 03:57:58.000000000","message":"Can you just pass the share_type? It makes it more readable that you\u0027re passing the requested share type alone; as opposed to all the inherent share/instance information in filter_properties","commit_id":"80c305b2baa7719b5fa94c31154ed1734e1519e0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"9fcd1d1b9e4acb5e1bec37d03bc1d7ec7860d3ce","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                  \"on host %(host)s (requested / avail): \""},{"line_number":79,"context_line":"                  \"%(requested)s/%(available)s\", msg_args)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        use_thin_logic \u003d utils.use_thin_logic(filter_properties)"},{"line_number":82,"context_line":"        thin_provisioning \u003d utils.thin_provisioning("},{"line_number":83,"context_line":"            host_state.thin_provisioning)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fad55976_cd2a7d2c","line":81,"range":{"start_line":81,"start_character":46,"end_line":81,"end_character":63},"in_reply_to":"1aa78d24_5848c7b3","updated":"2016-07-15 15:11:14.000000000","message":"Done","commit_id":"80c305b2baa7719b5fa94c31154ed1734e1519e0"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"07676276c3f024052af47086501f5627e4b615db","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                  \"on host %(host)s (requested / avail): \""},{"line_number":79,"context_line":"                  \"%(requested)s/%(available)s\", msg_args)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        share_type \u003d filter_properties.get(\u0027share_type\u0027, {})"},{"line_number":82,"context_line":"        use_thin_logic \u003d utils.use_thin_logic(share_type)"},{"line_number":83,"context_line":"        thin_provisioning \u003d utils.thin_provisioning("},{"line_number":84,"context_line":"            host_state.thin_provisioning)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dada55a8_c7664dec","line":82,"range":{"start_line":81,"start_character":7,"end_line":82,"end_character":57},"updated":"2016-07-26 09:22:41.000000000","message":"If the \u0027thin_provisioning\u0027 or \u0027capabilities:thin_provisioning\u0027 is not set in extra specs, it will use the capacity will use the thin logic. \n\nWhen user create a share with share type(the \u0027thin_provisioning\u0027 or \u0027capabilities:thin_provisioning\u0027 is not set in extra specs), it means user will create a thin share?  If the default is to create a thick share in driver, it will be fail.\nSo the driver default share type must be thin when we create a share with share type(the \u0027thin_provisioning\u0027 or \u0027capabilities:thin_provisioning\u0027 is not set in extra specs)?","commit_id":"3645bb0dec43df29edb7a248502be23bb52e212e"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"665131753226c72f24081a722229714f1ea7f523","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                  \"on host %(host)s (requested / avail): \""},{"line_number":79,"context_line":"                  \"%(requested)s/%(available)s\", msg_args)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        share_type \u003d filter_properties.get(\u0027share_type\u0027, {})"},{"line_number":82,"context_line":"        use_thin_logic \u003d utils.use_thin_logic(share_type)"},{"line_number":83,"context_line":"        thin_provisioning \u003d utils.thin_provisioning("},{"line_number":84,"context_line":"            host_state.thin_provisioning)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dada55a8_5ea4d049","line":82,"range":{"start_line":81,"start_character":7,"end_line":82,"end_character":57},"in_reply_to":"dada55a8_c7664dec","updated":"2016-07-26 16:12:53.000000000","message":"This is how it works today. So this problem will only be fixed if user set extra specs to let scheduler know it is a thick lun.  Otherwise it works the same as today.  It will not fail.  It will allow user to create it just as today.  I can\u0027t force user to set extra specs in share types.","commit_id":"3645bb0dec43df29edb7a248502be23bb52e212e"}],"manila/scheduler/utils.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"efebcd964fddb08fc2dd0aaa4c525453b657de06","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    use_thin_logic \u003d True"},{"line_number":33,"context_line":"    thin_spec \u003d None"},{"line_number":34,"context_line":"    try:"},{"line_number":35,"context_line":"        share_type \u003d properties.get(\u0027share_type\u0027)"},{"line_number":36,"context_line":"        thin_spec \u003d share_type.get(\u0027extra_specs\u0027, {}).get("},{"line_number":37,"context_line":"            \u0027thin_provisioning\u0027) if share_type else None"},{"line_number":38,"context_line":"        if thin_spec is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_5ff062c9","line":35,"range":{"start_line":35,"start_character":8,"end_line":35,"end_character":49},"updated":"2016-06-24 00:52:52.000000000","message":"suggestion:\n\nshare_type \u003d properties.get(\u0027share_type\u0027, {})\nthin_spec \u003d (share_type.get(\u0027extra_specs\u0027, {}).get(\u0027thin_provisioning\u0027) or share_type.get(\u0027extra_specs\u0027, {}).get(\u0027capabilities:thin_provisioning\u0027))\n\ncould avoid two if statements..","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"6f6b621a8f7adeaa3475651cfa9d927c29901143","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    use_thin_logic \u003d True"},{"line_number":33,"context_line":"    thin_spec \u003d None"},{"line_number":34,"context_line":"    try:"},{"line_number":35,"context_line":"        share_type \u003d properties.get(\u0027share_type\u0027)"},{"line_number":36,"context_line":"        thin_spec \u003d share_type.get(\u0027extra_specs\u0027, {}).get("},{"line_number":37,"context_line":"            \u0027thin_provisioning\u0027) if share_type else None"},{"line_number":38,"context_line":"        if thin_spec is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_9aa3f8b1","line":35,"range":{"start_line":35,"start_character":8,"end_line":35,"end_character":49},"in_reply_to":"3aaa91ec_5ff062c9","updated":"2016-06-25 02:14:42.000000000","message":"I tried but unfortunately I cannot combine them together.\n\n(Pdb) share_type\n{\u0027extra_specs\u0027: {\u0027thin_provisioning\u0027: False}}\n(Pdb) share_type.get(\u0027extra_specs\u0027, {}).get(\u0027thin_provisioning\u0027)\nFalse\n\nBecause this evaluates to False, it goes to share_type.get(\u0027extra_specs\u0027, {}).get(\u0027capabilities:thin_provisioning\u0027)) and the result is None which is wrong.  I should get \"False\" in this case.  None and False are not equal.  False means \u0027thin_provisioning\u0027 is set in extra_specs.  None means \u0027thin_provisioning\u0027 is not set in extra_specs.","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"984a443ea2c345d5f3b498cb49e00c664c8ec0f1","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            thin_spec \u003d share_type.get(\u0027extra_specs\u0027, {}).get("},{"line_number":40,"context_line":"                \u0027capabilities:thin_provisioning\u0027) if share_type else None"},{"line_number":41,"context_line":"        use_thin_logic \u003d strutils.bool_from_string("},{"line_number":42,"context_line":"            thin_spec, strict\u003dTrue) if thin_spec is not None else True"},{"line_number":43,"context_line":"    except ValueError:"},{"line_number":44,"context_line":"        if thin_spec is not None and not extra_specs_ops.match("},{"line_number":45,"context_line":"                True, thin_spec):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_6915a93e","line":42,"range":{"start_line":42,"start_character":66,"end_line":42,"end_character":70},"updated":"2016-06-24 03:47:02.000000000","message":"As far as I know, the thin_provisioning capability defaults to False in manila doc:\n\nlink: https://github.com/openstack/manila/blob/master/doc/source/devref/capabilities_and_extra_specs.rst","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"984a443ea2c345d5f3b498cb49e00c664c8ec0f1","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            thin_spec \u003d share_type.get(\u0027extra_specs\u0027, {}).get("},{"line_number":40,"context_line":"                \u0027capabilities:thin_provisioning\u0027) if share_type else None"},{"line_number":41,"context_line":"        use_thin_logic \u003d strutils.bool_from_string("},{"line_number":42,"context_line":"            thin_spec, strict\u003dTrue) if thin_spec is not None else True"},{"line_number":43,"context_line":"    except ValueError:"},{"line_number":44,"context_line":"        if thin_spec is not None and not extra_specs_ops.match("},{"line_number":45,"context_line":"                True, thin_spec):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_46f7fa8a","line":42,"range":{"start_line":42,"start_character":12,"end_line":42,"end_character":21},"updated":"2016-06-24 03:47:02.000000000","message":"The thin_spec could include \u0027\u003cis\u003e True\u0027. This method can not check the \u0027\u003cis\u003e True\u0027 value?","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"6f6b621a8f7adeaa3475651cfa9d927c29901143","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            thin_spec \u003d share_type.get(\u0027extra_specs\u0027, {}).get("},{"line_number":40,"context_line":"                \u0027capabilities:thin_provisioning\u0027) if share_type else None"},{"line_number":41,"context_line":"        use_thin_logic \u003d strutils.bool_from_string("},{"line_number":42,"context_line":"            thin_spec, strict\u003dTrue) if thin_spec is not None else True"},{"line_number":43,"context_line":"    except ValueError:"},{"line_number":44,"context_line":"        if thin_spec is not None and not extra_specs_ops.match("},{"line_number":45,"context_line":"                True, thin_spec):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_8acd3c33","line":42,"range":{"start_line":42,"start_character":12,"end_line":42,"end_character":21},"in_reply_to":"3aaa91ec_46f7fa8a","updated":"2016-06-25 02:14:42.000000000","message":"This method raises ValueError if thin_spec is \u0027\u003cis\u003e True\u0027.","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"6f6b621a8f7adeaa3475651cfa9d927c29901143","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            thin_spec \u003d share_type.get(\u0027extra_specs\u0027, {}).get("},{"line_number":40,"context_line":"                \u0027capabilities:thin_provisioning\u0027) if share_type else None"},{"line_number":41,"context_line":"        use_thin_logic \u003d strutils.bool_from_string("},{"line_number":42,"context_line":"            thin_spec, strict\u003dTrue) if thin_spec is not None else True"},{"line_number":43,"context_line":"    except ValueError:"},{"line_number":44,"context_line":"        if thin_spec is not None and not extra_specs_ops.match("},{"line_number":45,"context_line":"                True, thin_spec):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_6a93b0fa","line":42,"range":{"start_line":42,"start_character":66,"end_line":42,"end_character":70},"in_reply_to":"3aaa91ec_6915a93e","updated":"2016-06-25 02:14:42.000000000","message":"I set \"use_thin_logic\" to True.  I\u0027m not setting thin_provisioning to True.  They have different meanings.  \"use_thin_logic\" is used to preserve the existing scheduler behavior if \"thin_provisioning\" is not in extra_specs.  It is also used to honor \"thin_provisioning\" if it is in extra_specs.","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"efebcd964fddb08fc2dd0aaa4c525453b657de06","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                \u0027capabilities:thin_provisioning\u0027) if share_type else None"},{"line_number":41,"context_line":"        use_thin_logic \u003d strutils.bool_from_string("},{"line_number":42,"context_line":"            thin_spec, strict\u003dTrue) if thin_spec is not None else True"},{"line_number":43,"context_line":"    except ValueError:"},{"line_number":44,"context_line":"        if thin_spec is not None and not extra_specs_ops.match("},{"line_number":45,"context_line":"                True, thin_spec):"},{"line_number":46,"context_line":"            use_thin_logic \u003d False"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_3f5116d9","line":43,"range":{"start_line":43,"start_character":4,"end_line":43,"end_character":22},"updated":"2016-06-24 00:52:52.000000000","message":"You should not get value error with any of the statements in this block..","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"6f6b621a8f7adeaa3475651cfa9d927c29901143","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                \u0027capabilities:thin_provisioning\u0027) if share_type else None"},{"line_number":41,"context_line":"        use_thin_logic \u003d strutils.bool_from_string("},{"line_number":42,"context_line":"            thin_spec, strict\u003dTrue) if thin_spec is not None else True"},{"line_number":43,"context_line":"    except ValueError:"},{"line_number":44,"context_line":"        if thin_spec is not None and not extra_specs_ops.match("},{"line_number":45,"context_line":"                True, thin_spec):"},{"line_number":46,"context_line":"            use_thin_logic \u003d False"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_5ac7d063","line":43,"range":{"start_line":43,"start_character":4,"end_line":43,"end_character":22},"in_reply_to":"3aaa91ec_3f5116d9","updated":"2016-06-25 02:14:42.000000000","message":"Actually it does.  If thin_spec is \u0027\u003cis\u003e True\u0027, it throws ValueError and will go to line 44.","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"efebcd964fddb08fc2dd0aaa4c525453b657de06","unresolved":false,"context_lines":[{"line_number":50,"context_line":"def thin_provisioning(host_state_thin_provisioning):"},{"line_number":51,"context_line":"    thin_provisioning \u003d False"},{"line_number":52,"context_line":"    # NOTE(xyang): host_state_thin_provisioning is reported by driver."},{"line_number":53,"context_line":"    # It can be either bool (True of False) or"},{"line_number":54,"context_line":"    # list ([True, False], [True], [False])."},{"line_number":55,"context_line":"    if isinstance(host_state_thin_provisioning, bool):"},{"line_number":56,"context_line":"        thin_provisioning \u003d host_state_thin_provisioning"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_5fc7c263","line":53,"range":{"start_line":53,"start_character":34,"end_line":53,"end_character":36},"updated":"2016-06-24 00:52:52.000000000","message":"or","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"6f6b621a8f7adeaa3475651cfa9d927c29901143","unresolved":false,"context_lines":[{"line_number":50,"context_line":"def thin_provisioning(host_state_thin_provisioning):"},{"line_number":51,"context_line":"    thin_provisioning \u003d False"},{"line_number":52,"context_line":"    # NOTE(xyang): host_state_thin_provisioning is reported by driver."},{"line_number":53,"context_line":"    # It can be either bool (True of False) or"},{"line_number":54,"context_line":"    # list ([True, False], [True], [False])."},{"line_number":55,"context_line":"    if isinstance(host_state_thin_provisioning, bool):"},{"line_number":56,"context_line":"        thin_provisioning \u003d host_state_thin_provisioning"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_0a766cd6","line":53,"range":{"start_line":53,"start_character":34,"end_line":53,"end_character":36},"in_reply_to":"3aaa91ec_5fc7c263","updated":"2016-06-25 02:14:42.000000000","message":"Done","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"efebcd964fddb08fc2dd0aaa4c525453b657de06","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    # NOTE(xyang): host_state_thin_provisioning is reported by driver."},{"line_number":53,"context_line":"    # It can be either bool (True of False) or"},{"line_number":54,"context_line":"    # list ([True, False], [True], [False])."},{"line_number":55,"context_line":"    if isinstance(host_state_thin_provisioning, bool):"},{"line_number":56,"context_line":"        thin_provisioning \u003d host_state_thin_provisioning"},{"line_number":57,"context_line":"    elif isinstance(host_state_thin_provisioning, list):"},{"line_number":58,"context_line":"        if True in host_state_thin_provisioning:"},{"line_number":59,"context_line":"            thin_provisioning \u003d True"},{"line_number":60,"context_line":"    return thin_provisioning"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_3fa9167c","line":59,"range":{"start_line":55,"start_character":0,"end_line":59,"end_character":36},"updated":"2016-06-24 00:52:52.000000000","message":"Why not convert anything that\u0027s not a list to a list and do a check like this:\n\n    thin_capability \u003d [thin_capability] if not isinstance(thin_capability, list)\n                     else thin_capability\n\n    return any(thin_capability)","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"6f6b621a8f7adeaa3475651cfa9d927c29901143","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    # NOTE(xyang): host_state_thin_provisioning is reported by driver."},{"line_number":53,"context_line":"    # It can be either bool (True of False) or"},{"line_number":54,"context_line":"    # list ([True, False], [True], [False])."},{"line_number":55,"context_line":"    if isinstance(host_state_thin_provisioning, bool):"},{"line_number":56,"context_line":"        thin_provisioning \u003d host_state_thin_provisioning"},{"line_number":57,"context_line":"    elif isinstance(host_state_thin_provisioning, list):"},{"line_number":58,"context_line":"        if True in host_state_thin_provisioning:"},{"line_number":59,"context_line":"            thin_provisioning \u003d True"},{"line_number":60,"context_line":"    return thin_provisioning"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_baaeb495","line":59,"range":{"start_line":55,"start_character":0,"end_line":59,"end_character":36},"in_reply_to":"3aaa91ec_3fa9167c","updated":"2016-06-25 02:14:42.000000000","message":"Done.\n\nI can\u0027t use any() because any([\u0027whatever\u0027]) returns True.  We should enforce what is the correct way of reporting.","commit_id":"e6b2fb244873954be5e911c739cf96795926fa74"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"608f841a469d2ccceaa8e8ddb4cd76f2d129957f","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        use_thin_logic \u003d strutils.bool_from_string("},{"line_number":50,"context_line":"            thin_spec, strict\u003dTrue) if thin_spec is not None else True"},{"line_number":51,"context_line":"    except ValueError:"},{"line_number":52,"context_line":"        if thin_spec is not None and not extra_specs_ops.match("},{"line_number":53,"context_line":"                True, thin_spec):"},{"line_number":54,"context_line":"            use_thin_logic \u003d False"},{"line_number":55,"context_line":"    return use_thin_logic"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_d8e95781","line":52,"range":{"start_line":52,"start_character":0,"end_line":52,"end_character":8},"updated":"2016-07-15 03:57:58.000000000","message":"nit: I would add a comment above for the benefit of future developers: \"checking if the value of thin_spec is \u0027\u003cis\u003e True\u0027\"","commit_id":"80c305b2baa7719b5fa94c31154ed1734e1519e0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"9fcd1d1b9e4acb5e1bec37d03bc1d7ec7860d3ce","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        use_thin_logic \u003d strutils.bool_from_string("},{"line_number":50,"context_line":"            thin_spec, strict\u003dTrue) if thin_spec is not None else True"},{"line_number":51,"context_line":"    except ValueError:"},{"line_number":52,"context_line":"        if thin_spec is not None and not extra_specs_ops.match("},{"line_number":53,"context_line":"                True, thin_spec):"},{"line_number":54,"context_line":"            use_thin_logic \u003d False"},{"line_number":55,"context_line":"    return use_thin_logic"}],"source_content_type":"text/x-python","patch_set":6,"id":"fad55976_ed8141fd","line":52,"range":{"start_line":52,"start_character":0,"end_line":52,"end_character":8},"in_reply_to":"1aa78d24_d8e95781","updated":"2016-07-15 15:11:14.000000000","message":"Done","commit_id":"80c305b2baa7719b5fa94c31154ed1734e1519e0"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"e7f292b857dad1603ed766d9d60bf4ef9cd3b2d3","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"def thin_provisioning(host_state_thin_provisioning):"},{"line_number":108,"context_line":"    thin_provisioning \u003d False"},{"line_number":109,"context_line":"    # NOTE(xyang): host_state_thin_provisioning is reported by driver."},{"line_number":110,"context_line":"    # It can be either bool (True or False) or"},{"line_number":111,"context_line":"    # list ([True, False], [True], [False])."}],"source_content_type":"text/x-python","patch_set":10,"id":"fa7ab95a_bf775007","line":108,"range":{"start_line":108,"start_character":2,"end_line":108,"end_character":29},"updated":"2016-08-31 05:38:29.000000000","message":"Not really a problem, but if you want to eliminate some code, you don\u0027t need this line and see below...","commit_id":"3645bb0dec43df29edb7a248502be23bb52e212e"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"f8457549f39a6e3b03c668da809b5ec6469c7e83","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"def thin_provisioning(host_state_thin_provisioning):"},{"line_number":108,"context_line":"    thin_provisioning \u003d False"},{"line_number":109,"context_line":"    # NOTE(xyang): host_state_thin_provisioning is reported by driver."},{"line_number":110,"context_line":"    # It can be either bool (True or False) or"},{"line_number":111,"context_line":"    # list ([True, False], [True], [False])."}],"source_content_type":"text/x-python","patch_set":10,"id":"9a89bdaa_b12ebf89","line":108,"range":{"start_line":108,"start_character":2,"end_line":108,"end_character":29},"in_reply_to":"fa7ab95a_bf775007","updated":"2016-09-08 15:07:13.000000000","message":"Done","commit_id":"3645bb0dec43df29edb7a248502be23bb52e212e"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"e7f292b857dad1603ed766d9d60bf4ef9cd3b2d3","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    # list ([True, False], [True], [False])."},{"line_number":112,"context_line":"    thin_capability \u003d [host_state_thin_provisioning] if not isinstance("},{"line_number":113,"context_line":"        host_state_thin_provisioning, list) else host_state_thin_provisioning"},{"line_number":114,"context_line":"    if True in thin_capability:"},{"line_number":115,"context_line":"        thin_provisioning \u003d True"},{"line_number":116,"context_line":"    return thin_provisioning"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa7ab95a_7f76a807","line":116,"range":{"start_line":114,"start_character":1,"end_line":116,"end_character":28},"updated":"2016-08-31 05:38:29.000000000","message":"replace these 3 lines with 1 line\n \"return True in thin_capability\"","commit_id":"3645bb0dec43df29edb7a248502be23bb52e212e"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"f8457549f39a6e3b03c668da809b5ec6469c7e83","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    # list ([True, False], [True], [False])."},{"line_number":112,"context_line":"    thin_capability \u003d [host_state_thin_provisioning] if not isinstance("},{"line_number":113,"context_line":"        host_state_thin_provisioning, list) else host_state_thin_provisioning"},{"line_number":114,"context_line":"    if True in thin_capability:"},{"line_number":115,"context_line":"        thin_provisioning \u003d True"},{"line_number":116,"context_line":"    return thin_provisioning"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a89bdaa_71119751","line":116,"range":{"start_line":114,"start_character":1,"end_line":116,"end_character":28},"in_reply_to":"fa7ab95a_7f76a807","updated":"2016-09-08 15:07:13.000000000","message":"Done","commit_id":"3645bb0dec43df29edb7a248502be23bb52e212e"}],"manila/scheduler/weighers/capacity.py":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"223e05fcd101fbc386dc10849b78746d2389b8cf","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            #    \u0027\u003cis\u003e True\u0027."},{"line_number":72,"context_line":"            # Otherwise we use the thick logic to evaluate."},{"line_number":73,"context_line":"            use_thin_logic \u003d True"},{"line_number":74,"context_line":"            thin_spec \u003d weight_properties.get(\u0027share_type\u0027).get("},{"line_number":75,"context_line":"                \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":76,"context_line":"            if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":77,"context_line":"                use_thin_logic \u003d False"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_4cea20dc","line":75,"range":{"start_line":74,"start_character":24,"end_line":75,"end_character":30},"updated":"2016-05-12 01:15:36.000000000","message":"The \"filter_properties.get(\u0027share_type\u0027).get(\u0027extra_specs\u0027)\" could be None. so \"None.get(\u0027thin_provisioning\u0027)\" it will return error.","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"223e05fcd101fbc386dc10849b78746d2389b8cf","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            # Otherwise we use the thick logic to evaluate."},{"line_number":73,"context_line":"            use_thin_logic \u003d True"},{"line_number":74,"context_line":"            thin_spec \u003d weight_properties.get(\u0027share_type\u0027).get("},{"line_number":75,"context_line":"                \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":76,"context_line":"            if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":77,"context_line":"                use_thin_logic \u003d False"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_8c0248b2","line":75,"range":{"start_line":75,"start_character":35,"end_line":75,"end_character":54},"updated":"2016-05-12 01:15:36.000000000","message":"We support both \"capabilities:thin_provisioning\" and \"thin_provisioning\".","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b548716cabcd4cf1146e01864ffcaca19a6238de","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            # Otherwise we use the thick logic to evaluate."},{"line_number":73,"context_line":"            use_thin_logic \u003d True"},{"line_number":74,"context_line":"            thin_spec \u003d weight_properties.get(\u0027share_type\u0027).get("},{"line_number":75,"context_line":"                \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":76,"context_line":"            if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":77,"context_line":"                use_thin_logic \u003d False"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_88a2d3ac","line":75,"range":{"start_line":75,"start_character":35,"end_line":75,"end_character":54},"in_reply_to":"bab6814e_7a3762b0","updated":"2016-06-23 04:53:41.000000000","message":"Done","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"9d793c9243e2128b442175e82b6f3545914d7bd8","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            # Otherwise we use the thick logic to evaluate."},{"line_number":73,"context_line":"            use_thin_logic \u003d True"},{"line_number":74,"context_line":"            thin_spec \u003d weight_properties.get(\u0027share_type\u0027).get("},{"line_number":75,"context_line":"                \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":76,"context_line":"            if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":77,"context_line":"                use_thin_logic \u003d False"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_7a3762b0","line":75,"range":{"start_line":75,"start_character":35,"end_line":75,"end_character":54},"in_reply_to":"dab17558_8c0248b2","updated":"2016-05-25 13:59:57.000000000","message":"how about:\n\nthin_spec \u003d weight_properties.get(\u0027share_type\u0027, {}).get(\n                \u0027extra_specs\u0027, {}).get(\u0027thin_provisioning\u0027, False)","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"6b53f1a94cd2280fa3b58905e80943a3c270b4a7","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            use_thin_logic \u003d True"},{"line_number":74,"context_line":"            thin_spec \u003d weight_properties.get(\u0027share_type\u0027).get("},{"line_number":75,"context_line":"                \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":76,"context_line":"            if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":77,"context_line":"                use_thin_logic \u003d False"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"            if use_thin_logic and host_state.thin_provisioning:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_ddb881ca","line":76,"range":{"start_line":76,"start_character":42,"end_line":76,"end_character":53},"updated":"2016-05-11 23:52:30.000000000","message":"same here. Support for boolean matching.","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b548716cabcd4cf1146e01864ffcaca19a6238de","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            use_thin_logic \u003d True"},{"line_number":74,"context_line":"            thin_spec \u003d weight_properties.get(\u0027share_type\u0027).get("},{"line_number":75,"context_line":"                \u0027extra_specs\u0027).get(\u0027thin_provisioning\u0027)"},{"line_number":76,"context_line":"            if thin_spec and thin_spec !\u003d \u0027\u003cis\u003e True\u0027:"},{"line_number":77,"context_line":"                use_thin_logic \u003d False"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"            if use_thin_logic and host_state.thin_provisioning:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_2bc1192f","line":76,"range":{"start_line":76,"start_character":42,"end_line":76,"end_character":53},"in_reply_to":"dab17558_ddb881ca","updated":"2016-06-23 04:53:41.000000000","message":"Done","commit_id":"4f350b89327762ff6701f993291a87e01bc8b503"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"608f841a469d2ccceaa8e8ddb4cd76f2d129957f","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        else:"},{"line_number":65,"context_line":"            total \u003d float(total_space)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"            use_thin_logic \u003d utils.use_thin_logic(weight_properties)"},{"line_number":68,"context_line":"            thin_provisioning \u003d utils.thin_provisioning("},{"line_number":69,"context_line":"                host_state.thin_provisioning)"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_d845d76f","line":67,"range":{"start_line":67,"start_character":50,"end_line":67,"end_character":67},"updated":"2016-07-15 03:57:58.000000000","message":"same comment regarding using share_type","commit_id":"80c305b2baa7719b5fa94c31154ed1734e1519e0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"9fcd1d1b9e4acb5e1bec37d03bc1d7ec7860d3ce","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        else:"},{"line_number":65,"context_line":"            total \u003d float(total_space)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"            use_thin_logic \u003d utils.use_thin_logic(weight_properties)"},{"line_number":68,"context_line":"            thin_provisioning \u003d utils.thin_provisioning("},{"line_number":69,"context_line":"                host_state.thin_provisioning)"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fad55976_4d732d4e","line":67,"range":{"start_line":67,"start_character":50,"end_line":67,"end_character":67},"in_reply_to":"1aa78d24_d845d76f","updated":"2016-07-15 15:11:14.000000000","message":"Done","commit_id":"80c305b2baa7719b5fa94c31154ed1734e1519e0"}],"releasenotes/notes/check-thin-provisioning-4bb702535f6b10b6.yaml":[{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"e7f292b857dad1603ed766d9d60bf4ef9cd3b2d3","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    or not."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    The fix is to check \u0027thin_provisioning\u0027 in extra specs of the"},{"line_number":12,"context_line":"    share type and decide whether to use the logic for thin or non-thin."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"fa7ab95a_7f80688c","line":12,"range":{"start_line":12,"start_character":63,"end_line":12,"end_character":71},"updated":"2016-08-31 05:38:29.000000000","message":"I struggle with whether to say \"thick\" or \"full\". Now I have a 3rd-option.  :)","commit_id":"3645bb0dec43df29edb7a248502be23bb52e212e"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"8c575beacd9d0381169cc4bd8ba3fee3b3fc8efa","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    check whether the user wants the share to be provisioned as thin"},{"line_number":9,"context_line":"    or not."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    The fix is to check \u0027thin_provisioning\u0027 in extra specs of the"},{"line_number":12,"context_line":"    share type and decide whether to use the logic for thin or non-thin."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"9a89bdaa_9874e968","line":12,"range":{"start_line":11,"start_character":4,"end_line":12,"end_character":72},"updated":"2016-09-06 22:54:30.000000000","message":"The release note is read after the fact that the fix was committed/released. \n\nSo, suggest rewording this reno to:\n\n \"Capacity filter/weigher scheduler logic was modified to account for\n  back ends that can support thin and non-thin provisioning for shares. \n  Oversubscription calculation is triggered with the presence of the \n  ``thin_provisioning`` extra-spec in the share type of the share being\n  created.\"","commit_id":"3645bb0dec43df29edb7a248502be23bb52e212e"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"f8457549f39a6e3b03c668da809b5ec6469c7e83","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    check whether the user wants the share to be provisioned as thin"},{"line_number":9,"context_line":"    or not."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    The fix is to check \u0027thin_provisioning\u0027 in extra specs of the"},{"line_number":12,"context_line":"    share type and decide whether to use the logic for thin or non-thin."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"9a89bdaa_d1bc23de","line":12,"range":{"start_line":11,"start_character":4,"end_line":12,"end_character":72},"in_reply_to":"9a89bdaa_9874e968","updated":"2016-09-08 15:07:13.000000000","message":"Done","commit_id":"3645bb0dec43df29edb7a248502be23bb52e212e"}]}
