)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"f04bd651440464fd24134db8d22f57dcd5064b89","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add PoolFilter for Manila scheduler"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add PoolFilter depends on \u0027has_share_server\u0027 extra spec.It filters out"},{"line_number":10,"context_line":"hosts which pools have existing share servers if extra_specs param"},{"line_number":11,"context_line":"\u0027has_share_server\u0027 is set to True. Otherwise, filters out hosts with"},{"line_number":12,"context_line":"pool that don\u0027t have share servers."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3afb71cf_336ed901","line":9,"updated":"2015-06-09 06:49:16.000000000","message":"Blank missing \"spec.It\"","commit_id":"b9839cda5a11c744d4db56fe12727d9dada03753"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"4e2537e36a93ef7f07d6fde86a33b2174294f776","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add PoolFilter for Manila scheduler"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add PoolFilter depends on \u0027has_share_server\u0027 extra spec.It filters out"},{"line_number":10,"context_line":"hosts which pools have existing share servers if extra_specs param"},{"line_number":11,"context_line":"\u0027has_share_server\u0027 is set to True. Otherwise, filters out hosts with"},{"line_number":12,"context_line":"pool that don\u0027t have share servers."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3afb71cf_1d5be7f7","line":9,"in_reply_to":"3afb71cf_336ed901","updated":"2015-06-09 08:29:16.000000000","message":"Thank you!","commit_id":"b9839cda5a11c744d4db56fe12727d9dada03753"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"f04bd651440464fd24134db8d22f57dcd5064b89","unresolved":false,"context_lines":[{"line_number":11,"context_line":"\u0027has_share_server\u0027 is set to True. Otherwise, filters out hosts with"},{"line_number":12,"context_line":"pool that don\u0027t have share servers."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Add unit tests."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I7e462de47d50a971237672033e956ed92ce72896"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3afb71cf_6edeaa12","line":14,"updated":"2015-06-09 06:49:16.000000000","message":"I think this is obvious and you don\u0027t need to mention it.","commit_id":"b9839cda5a11c744d4db56fe12727d9dada03753"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"ca1aa8889157e424eb5340aeb263261e1bebd055","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Config option pool_weight_multiplier can be used to increase the"},{"line_number":14,"context_line":"priority of scheduling shares on pools with existing share_servers."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I7e462de47d50a971237672033e956ed92ce72896"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"fa32b979_803a40e6","line":15,"updated":"2015-06-21 19:20:52.000000000","message":"You are adding a new weigher.  This is a new feature.  Please register a blueprint and reference it here.","commit_id":"ba605375cfb262ca775354a84384df07533edf35"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"e1d6dee0cbe7df16376d95b1c27df37e9ede0c5b","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Config option pool_weight_multiplier can be used to increase the"},{"line_number":14,"context_line":"priority of scheduling shares on pools with existing share_servers."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I7e462de47d50a971237672033e956ed92ce72896"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"fa32b979_4c10ee4e","line":15,"in_reply_to":"fa32b979_7bb5717c","updated":"2015-06-22 08:20:42.000000000","message":"Done","commit_id":"ba605375cfb262ca775354a84384df07533edf35"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"ae9c8e3268ef9c002fba2863a7362bc0cecf8fea","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Config option pool_weight_multiplier can be used to increase the"},{"line_number":14,"context_line":"priority of scheduling shares on pools with existing share_servers."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I7e462de47d50a971237672033e956ed92ce72896"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"fa32b979_7bb5717c","line":15,"in_reply_to":"fa32b979_803a40e6","updated":"2015-06-22 00:34:44.000000000","message":"+1\n\nAnd please include more detail in the BP about how this will affect scheduling and why it\u0027s useful.","commit_id":"ba605375cfb262ca775354a84384df07533edf35"}],"manila/common/constants.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"2de3884b945b2e3a9dc1967dc294234bc1fbc534","unresolved":false,"context_lines":[{"line_number":80,"context_line":"class ExtraSpecs(object):"},{"line_number":81,"context_line":"    DRIVER_HANDLES_SHARE_SERVERS \u003d \"driver_handles_share_servers\""},{"line_number":82,"context_line":"    HAS_SHARE_SERVER \u003d \"has_share_server\""},{"line_number":83,"context_line":"    REQUIRED \u003d (DRIVER_HANDLES_SHARE_SERVERS, HAS_SHARE_SERVER)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_90dfbc0c","line":83,"updated":"2015-05-19 09:25:14.000000000","message":"Why \"HAS_SHARE_SERVER\" is made as required?","commit_id":"bef01d9aaf106d2e10a288193a80a07a288dbe6f"}],"manila/db/sqlalchemy/api.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"2de3884b945b2e3a9dc1967dc294234bc1fbc534","unresolved":false,"context_lines":[{"line_number":2028,"context_line":""},{"line_number":2029,"context_line":""},{"line_number":2030,"context_line":"@require_context"},{"line_number":2031,"context_line":"def share_server_get_all_by_host(context, host):"},{"line_number":2032,"context_line":"    return _server_get_query(context).filter_by(host\u003dhost).all()"},{"line_number":2033,"context_line":""},{"line_number":2034,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_30ea48ad","line":2031,"updated":"2015-05-19 09:25:14.000000000","message":"This should have been implemented in parent commit. See comments here:\n\nhttps://review.openstack.org/#/c/180450/8/manila/share/manager.py","commit_id":"bef01d9aaf106d2e10a288193a80a07a288dbe6f"}],"manila/scheduler/filters/pool_filter.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"2de3884b945b2e3a9dc1967dc294234bc1fbc534","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class PoolFilter(filters.BaseHostFilter):"},{"line_number":26,"context_line":"    \"\"\"Pool Filter filters based on are pools with existing share servers .\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def host_passes(self, host_state, filter_properties):"},{"line_number":29,"context_line":"        \"\"\"Return True if host has sufficient capacity.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_500a647a","line":26,"updated":"2015-05-19 09:25:14.000000000","message":"This docstring is unclear.","commit_id":"bef01d9aaf106d2e10a288193a80a07a288dbe6f"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"2de3884b945b2e3a9dc1967dc294234bc1fbc534","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    \"\"\"Pool Filter filters based on are pools with existing share servers .\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def host_passes(self, host_state, filter_properties):"},{"line_number":29,"context_line":"        \"\"\"Return True if host has sufficient capacity.\"\"\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":32,"context_line":"        has_ss \u003d strutils.bool_from_string("}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_d01e54ba","line":29,"updated":"2015-05-19 09:25:14.000000000","message":"Capacity? You verify \"presence\" of share servers, but not their capacity, something\u0027s else capacity.","commit_id":"bef01d9aaf106d2e10a288193a80a07a288dbe6f"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"2c67a15952240958d417cc5b739fb9c8d8b306e7","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        for pool in host_state.pools:"},{"line_number":40,"context_line":"            for server in servers:"},{"line_number":41,"context_line":"                if pool in driver.Scheduler.host_manager.\\"},{"line_number":42,"context_line":"                        service_states[\u0027server_pools_mapping\u0027][server[\u0027id\u0027]]:"},{"line_number":43,"context_line":"                    return has_ss"},{"line_number":44,"context_line":"        return not has_ss"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_4b97553a","line":42,"updated":"2015-05-19 10:01:19.000000000","message":"This will fail on hosts with disabled handling of share servers.\n\nSee: https://review.openstack.org/#/c/180450/8/manila/share/manager.py\n\nIt sets mapping only for one of two cases.","commit_id":"bef01d9aaf106d2e10a288193a80a07a288dbe6f"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"fc7b89459b99548551a6f384eae7557583c9b048","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":43,"context_line":"        has_ss \u003d strutils.bool_from_string("},{"line_number":44,"context_line":"            filter_properties[\u0027share_type\u0027][\u0027extra_specs\u0027][\u0027has_share_server\u0027])"},{"line_number":45,"context_line":"        servers \u003d db_api.share_server_get_all_by_host("},{"line_number":46,"context_line":"            ctx,"},{"line_number":47,"context_line":"            utils.extract_host(host_state.host, \u0027backend\u0027))"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a016987_b968c788","line":44,"updated":"2015-05-26 17:40:54.000000000","message":"Please, use \"get\" method to try to get \"has_share_server\", because we assume it is as optional.","commit_id":"b75046f66bde7cff58be389f566782d896fc3e92"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"f68aa757f3ab6cc627c21dcc689a7db838f12fd8","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class PoolFilter(filters.BaseHostFilter):"},{"line_number":25,"context_line":"    \"\"\"PoolFilter depends on \u0027has_share_server\u0027 extra spec."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"       Filters out hosts which pools have existing share servers"},{"line_number":28,"context_line":"       if extra_specs param \u0027has_share_server\u0027 is set to True."},{"line_number":29,"context_line":"       Otherwise, filters out hosts with pool that don\u0027t have share servers."},{"line_number":30,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_14884070","line":27,"updated":"2015-05-29 15:59:32.000000000","message":"Wrong indentation of description. See: http://docs.openstack.org/developer/hacking/#docstrings","commit_id":"6a24a1670d8e39401c558fbd56cb7f6310eb15b5"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"dfd0494509ecb15cba4b35085505555141cb7050","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class PoolFilter(filters.BaseHostFilter):"},{"line_number":25,"context_line":"    \"\"\"PoolFilter depends on \u0027has_share_server\u0027 extra spec."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"       Filters out hosts which pools have existing share servers"},{"line_number":28,"context_line":"       if extra_specs param \u0027has_share_server\u0027 is set to True."},{"line_number":29,"context_line":"       Otherwise, filters out hosts with pool that don\u0027t have share servers."},{"line_number":30,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_95c9a028","line":27,"in_reply_to":"7a016987_14884070","updated":"2015-06-01 09:29:41.000000000","message":"Done","commit_id":"6a24a1670d8e39401c558fbd56cb7f6310eb15b5"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"f68aa757f3ab6cc627c21dcc689a7db838f12fd8","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    def host_passes(self, host_state, filter_properties):"},{"line_number":33,"context_line":"        \"\"\"Filter hosts according to provided \u0027has_share_server\u0027 value."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"           Return True if host has pools that satisfy condition"},{"line_number":36,"context_line":"           \u0027has_share_server\u0027 \u003d True\\False."},{"line_number":37,"context_line":"        \"\"\""},{"line_number":38,"context_line":"        has_ss \u003d strutils.bool_from_string("}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_748d347b","line":35,"updated":"2015-05-29 15:59:32.000000000","message":"Same here.","commit_id":"6a24a1670d8e39401c558fbd56cb7f6310eb15b5"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"dfd0494509ecb15cba4b35085505555141cb7050","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    def host_passes(self, host_state, filter_properties):"},{"line_number":33,"context_line":"        \"\"\"Filter hosts according to provided \u0027has_share_server\u0027 value."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"           Return True if host has pools that satisfy condition"},{"line_number":36,"context_line":"           \u0027has_share_server\u0027 \u003d True\\False."},{"line_number":37,"context_line":"        \"\"\""},{"line_number":38,"context_line":"        has_ss \u003d strutils.bool_from_string("}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_75cce434","line":35,"in_reply_to":"7a016987_748d347b","updated":"2015-06-01 09:29:41.000000000","message":"Done","commit_id":"6a24a1670d8e39401c558fbd56cb7f6310eb15b5"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"f68aa757f3ab6cc627c21dcc689a7db838f12fd8","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                None),"},{"line_number":42,"context_line":"            strict\u003dFalse)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        del filter_properties[\u0027share_type\u0027][\u0027extra_specs\u0027][\u0027has_share_server\u0027]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        pool_mapping \u003d filter_properties[\u0027server_pools_mapping\u0027]"},{"line_number":47,"context_line":"        if (not host_state.pools or pool_mapping \u003d\u003d {}):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_f75ec3e7","line":44,"updated":"2015-05-29 15:59:32.000000000","message":"Use \"pop\" method on line 39 instead of \"get\" and then you can remove this line as redundant.","commit_id":"6a24a1670d8e39401c558fbd56cb7f6310eb15b5"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"f68aa757f3ab6cc627c21dcc689a7db838f12fd8","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        del filter_properties[\u0027share_type\u0027][\u0027extra_specs\u0027][\u0027has_share_server\u0027]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        pool_mapping \u003d filter_properties[\u0027server_pools_mapping\u0027]"},{"line_number":47,"context_line":"        if (not host_state.pools or pool_mapping \u003d\u003d {}):"},{"line_number":48,"context_line":"            return False"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_af7d951d","line":47,"updated":"2015-05-29 15:59:32.000000000","message":"if not (host_state.pools and pool_mapping):","commit_id":"6a24a1670d8e39401c558fbd56cb7f6310eb15b5"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"dfd0494509ecb15cba4b35085505555141cb7050","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        del filter_properties[\u0027share_type\u0027][\u0027extra_specs\u0027][\u0027has_share_server\u0027]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        pool_mapping \u003d filter_properties[\u0027server_pools_mapping\u0027]"},{"line_number":47,"context_line":"        if (not host_state.pools or pool_mapping \u003d\u003d {}):"},{"line_number":48,"context_line":"            return False"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_55cfa828","line":47,"in_reply_to":"7a016987_af7d951d","updated":"2015-06-01 09:29:41.000000000","message":"Done","commit_id":"6a24a1670d8e39401c558fbd56cb7f6310eb15b5"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"f04bd651440464fd24134db8d22f57dcd5064b89","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            utils.extract_host(host_state.host, \u0027backend\u0027))"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        for pool in host_state.pools:"},{"line_number":53,"context_line":"            for server in servers:"},{"line_number":54,"context_line":"                if pool in pool_mapping[server[\u0027id\u0027]]:"},{"line_number":55,"context_line":"                    return has_ss"},{"line_number":56,"context_line":"        return not has_ss"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_2e5b1289","line":53,"updated":"2015-06-09 06:49:16.000000000","message":"I think \"servers\" can be \"None\" and this will cause an exception. Or do I misunderstand it?","commit_id":"b9839cda5a11c744d4db56fe12727d9dada03753"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"4e2537e36a93ef7f07d6fde86a33b2174294f776","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            utils.extract_host(host_state.host, \u0027backend\u0027))"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        for pool in host_state.pools:"},{"line_number":53,"context_line":"            for server in servers:"},{"line_number":54,"context_line":"                if pool in pool_mapping[server[\u0027id\u0027]]:"},{"line_number":55,"context_line":"                    return has_ss"},{"line_number":56,"context_line":"        return not has_ss"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_9d50f7d5","line":53,"in_reply_to":"3afb71cf_2e5b1289","updated":"2015-06-09 08:29:16.000000000","message":"Hi, Mark!\n\nNo, servers could be only empty list [],  which is iterable too, so exception doesn\u0027t seem to be raised here.","commit_id":"b9839cda5a11c744d4db56fe12727d9dada03753"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"cecf62fd6c99f74402c294b2f699feb96990e38b","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        \"\"\""},{"line_number":38,"context_line":"        has_ss \u003d filter_properties[\u0027share_type\u0027][\u0027extra_specs\u0027].get("},{"line_number":39,"context_line":"            \u0027has_share_server\u0027,"},{"line_number":40,"context_line":"            None)"},{"line_number":41,"context_line":"        has_ss \u003d strutils.bool_from_string(has_ss, strict\u003dTrue)"},{"line_number":42,"context_line":"        pool \u003d utils.extract_host(host_state.host, \u0027pool\u0027)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_9d4ef86d","line":40,"updated":"2015-06-16 13:02:39.000000000","message":"Method \"get\" returns literal \"None\" by default.","commit_id":"0d812efa1ba0ad21df8825ce44974eb1d87d0421"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"cecf62fd6c99f74402c294b2f699feb96990e38b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        has_ss \u003d filter_properties[\u0027share_type\u0027][\u0027extra_specs\u0027].get("},{"line_number":39,"context_line":"            \u0027has_share_server\u0027,"},{"line_number":40,"context_line":"            None)"},{"line_number":41,"context_line":"        has_ss \u003d strutils.bool_from_string(has_ss, strict\u003dTrue)"},{"line_number":42,"context_line":"        pool \u003d utils.extract_host(host_state.host, \u0027pool\u0027)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        pool_mapping \u003d filter_properties[\u0027server_pools_mapping\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_7d453415","line":41,"updated":"2015-06-16 13:02:39.000000000","message":"If share type does not have extra spec \"has_share_server\" set to any proper boolean value then we get ValueError exception here. And it is incorrect behavior.\n\nWe should return \"True\" if this extra spec is not specified, because it is case when do not care about filtering by share_servers/pools.","commit_id":"0d812efa1ba0ad21df8825ce44974eb1d87d0421"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"cecf62fd6c99f74402c294b2f699feb96990e38b","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        pool_mapping \u003d filter_properties[\u0027server_pools_mapping\u0027]"},{"line_number":45,"context_line":"        if not (pool and pool_mapping):"},{"line_number":46,"context_line":"            return False"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":49,"context_line":"        servers \u003d db_api.share_server_get_all_by_host("}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_607d876d","line":46,"updated":"2015-06-16 13:02:39.000000000","message":"\"pool_mapping\" will be empty when driver does not have share servers yet. In this case we should consider \"has_ss\".","commit_id":"0d812efa1ba0ad21df8825ce44974eb1d87d0421"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"cecf62fd6c99f74402c294b2f699feb96990e38b","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            ctx,"},{"line_number":51,"context_line":"            utils.extract_host(host_state.host, \u0027backend\u0027))"},{"line_number":52,"context_line":"        for server in servers:"},{"line_number":53,"context_line":"            if any(pool \u003d\u003d p[\u0027pool_name\u0027] for p in pool_mapping[server[\u0027id\u0027]]):"},{"line_number":54,"context_line":"                return has_ss"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        return not has_ss"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_0bace132","line":53,"updated":"2015-06-16 13:02:39.000000000","message":"It is very likely to get here \"KeyError\" in \"pool_mapping[server[\u0027id\u0027]]\" when some share server was created between action on line 49 and stats update. In this case we should use safe getting of value:\n\n\"\"\"\n\nif any(pool \u003d\u003d p[\u0027pool_name\u0027] for p in pool_mapping.get(server[\u0027id\u0027], [])):\n\n\"\"\"\n\nAlso, mentioned case should be covered with unit tests.","commit_id":"0d812efa1ba0ad21df8825ce44974eb1d87d0421"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"80069ababc0d399d9aefa99951706faa45ad7b4b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            \u0027has_share_server\u0027)"},{"line_number":40,"context_line":"        try:"},{"line_number":41,"context_line":"            has_ss \u003d strutils.bool_from_string(has_ss, strict\u003dTrue)"},{"line_number":42,"context_line":"        except ValueError:"},{"line_number":43,"context_line":"            return True"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        pool \u003d utils.extract_host(host_state.host, \u0027pool\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_7d0d02e7","line":42,"updated":"2015-06-17 11:26:41.000000000","message":"If we set \"has_share_server \u003d \u0027Fake\u0027\" host will pass, but should not. So, this is bug. Need to fix it and cover with unit tests.","commit_id":"e17ea9984c87d22d5d550754644543248730835e"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"4de0a745fd8463ade96b208347ed18631a1335e6","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from manila.share import utils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class PoolFilter(filters.BaseHostFilter):"},{"line_number":25,"context_line":"    \"\"\"PoolFilter depends on \u0027has_share_server\u0027 extra spec."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    Filters out hosts which pools have existing share servers"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_1fe5b836","line":24,"updated":"2015-06-17 17:14:17.000000000","message":"After some thinking I am leaning to idea that it should not be a filter, it should be a weigher like capacity:\n\nhttps://github.com/openstack/manila/blob/master/manila/scheduler/weights/capacity.py\n\nFor the moment when key \"has_share_server\" is set we filter out some hosts, it is not useful. More useful to prioritize hosts by setting key \"has_share_server\".\n\nSo, can you please rework it to weigher?","commit_id":"54dc9d2cdc141c2e4b20a4003eaa55d8e7310acf"}],"manila/scheduler/weights/pool.py":[{"author":{"_account_id":14232,"name":"Igor Malinovskiy","email":"u.glide@gmail.com","username":"imalinovskiy"},"change_message_id":"965e69926f98fe8f6562325e268445d1a3b8818f","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def _weigh_object(self, host_state, weight_properties):"},{"line_number":41,"context_line":"        \"\"\"Pools with existing share server win.\"\"\""},{"line_number":42,"context_line":"        pool \u003d utils.extract_host(host_state.host, \u0027pool\u0027)"},{"line_number":43,"context_line":"        pool_mapping \u003d weight_properties.get(\u0027server_pools_mapping\u0027, {})"},{"line_number":44,"context_line":"        if not pool_mapping:"},{"line_number":45,"context_line":"            return 0"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa32b979_0de86be1","line":42,"updated":"2015-06-23 08:31:05.000000000","message":"No need to define this variable here, because it used only on line 51. That\u0027s why it should be moved to line 49","commit_id":"9370b4f39346d02045ad5ee7f5f69853db33e1ba"},{"author":{"_account_id":14232,"name":"Igor Malinovskiy","email":"u.glide@gmail.com","username":"imalinovskiy"},"change_message_id":"965e69926f98fe8f6562325e268445d1a3b8818f","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":47,"context_line":"        servers \u003d db_api.share_server_get_all_by_host("},{"line_number":48,"context_line":"            ctx,"},{"line_number":49,"context_line":"            utils.extract_host(host_state.host, \u0027backend\u0027))"},{"line_number":50,"context_line":"        for server in servers:"},{"line_number":51,"context_line":"            if any(pool \u003d\u003d p[\u0027pool_name\u0027] for p in pool_mapping.get("},{"line_number":52,"context_line":"                   server[\u0027id\u0027], [])):"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa32b979_ad929f49","line":49,"updated":"2015-06-23 08:31:05.000000000","message":"For better readability, please define additional variable \u0027host\u0027 here. With my previous comment your code will looks like:\n\n        pool_mapping \u003d weight_properties.get(\u0027server_pools_mapping\u0027, {})\n        if not pool_mapping:\n            return 0\n        \n        ctx \u003d context.get_admin_context()\n        host \u003d utils.extract_host(host_state.host, \u0027backend\u0027)\n        servers \u003d db_api.share_server_get_all_by_host(ctx, host)\n        pool \u003d utils.extract_host(host_state.host, \u0027pool\u0027)\n        for server in servers:\n            if any(pool \u003d\u003d p[\u0027pool_name\u0027] for p in pool_mapping.get(\n                   server[\u0027id\u0027], [])):\n                return 1\n        return 0","commit_id":"9370b4f39346d02045ad5ee7f5f69853db33e1ba"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"437811c63276d3b69acd03e12f11443687be835d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from manila.share import utils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"pool_weight_opts \u003d ["},{"line_number":24,"context_line":"    cfg.FloatOpt(\u0027pool_weight_multiplier\u0027,"},{"line_number":25,"context_line":"                 default\u003d1.0,"},{"line_number":26,"context_line":"                 help\u003d\u0027Multiplier used for weighing pools which have \u0027"},{"line_number":27,"context_line":"                      \u0027existing share servers. Negative numbers mean to spread\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa32b979_bb6fc729","line":24,"updated":"2015-06-25 10:08:36.000000000","message":"The new config is not in the sample config if you generate it with \"tox -egenconfig\". Needs to be added to manila/opts.py","commit_id":"783bfbc4df633f8c3b1d25d815db291d26bbb68f"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"e4d2af13bb5d9f230f4695d6890e4f3364a24f72","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from manila.share import utils"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"pool_weight_opts \u003d ["},{"line_number":24,"context_line":"    cfg.FloatOpt(\u0027pool_weight_multiplier\u0027,"},{"line_number":25,"context_line":"                 default\u003d1.0,"},{"line_number":26,"context_line":"                 help\u003d\u0027Multiplier used for weighing pools which have \u0027"},{"line_number":27,"context_line":"                      \u0027existing share servers. Negative numbers mean to spread\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa32b979_124a1828","line":24,"in_reply_to":"fa32b979_bb6fc729","updated":"2015-06-26 12:52:15.000000000","message":"Done","commit_id":"783bfbc4df633f8c3b1d25d815db291d26bbb68f"}],"manila/tests/api/contrib/test_types_manage.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"f68aa757f3ab6cc627c21dcc689a7db838f12fd8","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def make_create_body(name\u003d\"test_share_1\", extra_specs\u003dNone,"},{"line_number":66,"context_line":"                     spec_driver_handles_share_servers\u003dTrue,"},{"line_number":67,"context_line":"                     spec_has_share_server\u003dTrue):"},{"line_number":68,"context_line":"    if not extra_specs:"},{"line_number":69,"context_line":"        extra_specs \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_d57f3fdd","line":66,"updated":"2015-05-29 15:59:32.000000000","message":"This file should not be changed. Handling of new extra spec has nothing to the possibility of share type creation.","commit_id":"6a24a1670d8e39401c558fbd56cb7f6310eb15b5"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"dfd0494509ecb15cba4b35085505555141cb7050","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def make_create_body(name\u003d\"test_share_1\", extra_specs\u003dNone,"},{"line_number":66,"context_line":"                     spec_driver_handles_share_servers\u003dTrue,"},{"line_number":67,"context_line":"                     spec_has_share_server\u003dTrue):"},{"line_number":68,"context_line":"    if not extra_specs:"},{"line_number":69,"context_line":"        extra_specs \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_f5d8d4f0","line":66,"in_reply_to":"7a016987_d57f3fdd","updated":"2015-06-01 09:29:41.000000000","message":"Agree, done. Thank you!","commit_id":"6a24a1670d8e39401c558fbd56cb7f6310eb15b5"}],"manila/tests/scheduler/test_host_filters.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"f68aa757f3ab6cc627c21dcc689a7db838f12fd8","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        retry \u003d dict(num_attempts\u003d1, hosts\u003d[\u0027host1\u0027])"},{"line_number":134,"context_line":"        filter_properties \u003d dict(retry\u003dretry)"},{"line_number":135,"context_line":"        self.assertFalse(filt_cls.host_passes(host, filter_properties))"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_pool_filter_fail_host_with_no_pools(self):"},{"line_number":138,"context_line":"        filt_cls \u003d self.class_map[\u0027PoolFilter\u0027]()"},{"line_number":139,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, {\u0027pools\u0027: []})"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_1564b71f","line":136,"updated":"2015-05-29 15:59:32.000000000","message":"Case for \"has_share_server \u003d None\"?","commit_id":"6a24a1670d8e39401c558fbd56cb7f6310eb15b5"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"dfd0494509ecb15cba4b35085505555141cb7050","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        retry \u003d dict(num_attempts\u003d1, hosts\u003d[\u0027host1\u0027])"},{"line_number":134,"context_line":"        filter_properties \u003d dict(retry\u003dretry)"},{"line_number":135,"context_line":"        self.assertFalse(filt_cls.host_passes(host, filter_properties))"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_pool_filter_fail_host_with_no_pools(self):"},{"line_number":138,"context_line":"        filt_cls \u003d self.class_map[\u0027PoolFilter\u0027]()"},{"line_number":139,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, {\u0027pools\u0027: []})"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_35e9cc7f","line":136,"in_reply_to":"7a016987_1564b71f","updated":"2015-06-01 09:29:41.000000000","message":"Done","commit_id":"6a24a1670d8e39401c558fbd56cb7f6310eb15b5"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"cecf62fd6c99f74402c294b2f699feb96990e38b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            \u0027server_pools_mapping\u0027: {\u0027server1\u0027: \u0027pool1\u0027},"},{"line_number":146,"context_line":"        }"},{"line_number":147,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, {})"},{"line_number":148,"context_line":"        self.assertRaises(ValueError, filt_cls.host_passes, host,"},{"line_number":149,"context_line":"                          filter_properties)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def test_pool_filter_fail_host_with_no_pools(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa32b979_7d10d4a8","line":148,"updated":"2015-06-16 13:02:39.000000000","message":"This is not expected behavior. See related comments in https://review.openstack.org/#/c/184053/14/manila/scheduler/filters/pool_filter.py","commit_id":"0d812efa1ba0ad21df8825ce44974eb1d87d0421"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"80069ababc0d399d9aefa99951706faa45ad7b4b","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        filter_properties \u003d {"},{"line_number":140,"context_line":"            \u0027share_type\u0027: {"},{"line_number":141,"context_line":"                \u0027extra_specs\u0027: {"},{"line_number":142,"context_line":"                    \u0027has_share_server\u0027: None,"},{"line_number":143,"context_line":"                }"},{"line_number":144,"context_line":"            },"},{"line_number":145,"context_line":"            \u0027server_pools_mapping\u0027: {\u0027server1\u0027: \u0027pool1\u0027},"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_9d5b26f6","line":142,"updated":"2015-06-17 11:26:41.000000000","message":"Need add case when \"has_share_server\" has fake value.","commit_id":"e17ea9984c87d22d5d550754644543248730835e"}],"manila/tests/scheduler/test_pool_weigher.py":[{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"ae9c8e3268ef9c002fba2863a7362bc0cecf8fea","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Mirantis Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa32b979_dbf27d6f","line":1,"updated":"2015-06-22 00:34:44.000000000","message":"This file should be tests/scheduler/weights/test_pool.py\n\nI\u0027m not sure why the scheduler unit tests files don\u0027t match the directory structure of the code (probably a holdover from Cinder, where the unit test layout is a disaster), but no sense making the issue worse.","commit_id":"ba605375cfb262ca775354a84384df07533edf35"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"e1d6dee0cbe7df16376d95b1c27df37e9ede0c5b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Mirantis Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa32b979_4c3eaeb9","line":1,"in_reply_to":"fa32b979_dbf27d6f","updated":"2015-06-22 08:20:42.000000000","message":"Done","commit_id":"ba605375cfb262ca775354a84384df07533edf35"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"ca1aa8889157e424eb5340aeb263261e1bebd055","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        }"},{"line_number":86,"context_line":"        weighed_host \u003d self._get_weighed_host(self._get_all_hosts(),"},{"line_number":87,"context_line":"                                              weight_properties)"},{"line_number":88,"context_line":"        self.assertEqual(weighed_host.weight, 0.0)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def test_choose_pool_with_existing_share_server(self):"},{"line_number":91,"context_line":"        # host1: weight \u003d 0*(1.0)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa32b979_a048a488","line":88,"updated":"2015-06-21 19:20:52.000000000","message":"self.assertEqual(0.0, weighed_host.weight)","commit_id":"ba605375cfb262ca775354a84384df07533edf35"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"e1d6dee0cbe7df16376d95b1c27df37e9ede0c5b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        }"},{"line_number":86,"context_line":"        weighed_host \u003d self._get_weighed_host(self._get_all_hosts(),"},{"line_number":87,"context_line":"                                              weight_properties)"},{"line_number":88,"context_line":"        self.assertEqual(weighed_host.weight, 0.0)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def test_choose_pool_with_existing_share_server(self):"},{"line_number":91,"context_line":"        # host1: weight \u003d 0*(1.0)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa32b979_ac73bab3","line":88,"in_reply_to":"fa32b979_a048a488","updated":"2015-06-22 08:20:42.000000000","message":"Thank you! Fixed it here and below.","commit_id":"ba605375cfb262ca775354a84384df07533edf35"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"ca1aa8889157e424eb5340aeb263261e1bebd055","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                                              weight_properties)"},{"line_number":146,"context_line":"        self.assertEqual(weighed_host.weight, 0.0)"},{"line_number":147,"context_line":"        self.assertEqual("},{"line_number":148,"context_line":"            \u0027host2@BBB\u0027, utils.extract_host(weighed_host.obj.host))"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa32b979_00587055","line":148,"updated":"2015-06-21 19:20:52.000000000","message":"Can you add two tests:\n\n1. weight for all 5 hosts is 1\n\n2. weight for all 5 hosts is 0","commit_id":"ba605375cfb262ca775354a84384df07533edf35"},{"author":{"_account_id":7331,"name":"Julia Varlamova","email":"jvarlamova@mirantis.com","username":"jvarlamova"},"change_message_id":"e1d6dee0cbe7df16376d95b1c27df37e9ede0c5b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                                              weight_properties)"},{"line_number":146,"context_line":"        self.assertEqual(weighed_host.weight, 0.0)"},{"line_number":147,"context_line":"        self.assertEqual("},{"line_number":148,"context_line":"            \u0027host2@BBB\u0027, utils.extract_host(weighed_host.obj.host))"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa32b979_6c7b727c","line":148,"in_reply_to":"fa32b979_00587055","updated":"2015-06-22 08:20:42.000000000","message":"Case where weight for all 5 hosts is 0 is already added - test_no_server_pool_mapping.\n\nAdded test for case where  weight for all 5 hosts is 1.","commit_id":"ba605375cfb262ca775354a84384df07533edf35"}]}
