)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"478070bf14d5dc0fa8f75bf9bef71829579dab98","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Merge Central and Compute agents to *polling agent*"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u003d\u003d\u003d TO DO \u003d\u003d\u003d"},{"line_number":10,"context_line":"* test on the lab in all the variants (now tested for all-in-one, and"},{"line_number":11,"context_line":"  two agents running on one VM in the central group with ZK)"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3a961159_d25d524a","line":9,"updated":"2014-12-08 09:52:18.000000000","message":"Please remove.","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"5e45b7035c2f56595e458e083fffacb8c52ec50d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Merge Central and Compute agents to *polling agent*"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u003d\u003d\u003d TO DO \u003d\u003d\u003d"},{"line_number":10,"context_line":"* test on the lab in all the variants (now tested for all-in-one, and"},{"line_number":11,"context_line":"  two agents running on one VM in the central group with ZK)"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3a961159_8ae8c7b5","line":9,"in_reply_to":"3a961159_53888422","updated":"2014-12-09 11:51:26.000000000","message":"done","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"f013f8b94fb7882a74e6e2c06e90986bd3cef6eb","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Merge Central and Compute agents to *polling agent*"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u003d\u003d\u003d TO DO \u003d\u003d\u003d"},{"line_number":10,"context_line":"* test on the lab in all the variants (now tested for all-in-one, and"},{"line_number":11,"context_line":"  two agents running on one VM in the central group with ZK)"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3a961159_53888422","line":9,"in_reply_to":"3a961159_d25d524a","updated":"2014-12-08 11:10:23.000000000","message":"ok, already in progress actually","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"}],"ceilometer/agent/base.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"41cd9f261d1de4be2bfa791e7f01497a5dc9fe22","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            \"\"\"Find out if pollster name matches to one of the list.\"\"\""},{"line_number":145,"context_line":"            if not pollster_list:"},{"line_number":146,"context_line":"                return True"},{"line_number":147,"context_line":"            return any(fnmatch.fnmatch(pollster, pollster_list))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        if type(namespaces) is not list:"},{"line_number":150,"context_line":"            namespaces \u003d [namespaces]"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_bc442d1a","line":147,"updated":"2014-12-05 06:29:46.000000000","message":"I don\u0027t think this is the correct way to any, also I don\u0027t think fnmatch works on stevedore.Extension object.\n\nWould you please add a unit test to test the case of not-None pollster_list?","commit_id":"06500006a1e267831ed3daffac3230ba6b229afd"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"eb72ad8eaea1d7e752923a3cdf63b7a029aaa5b2","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            \"\"\"Find out if pollster name matches to one of the list.\"\"\""},{"line_number":145,"context_line":"            if not pollster_list:"},{"line_number":146,"context_line":"                return True"},{"line_number":147,"context_line":"            return any(fnmatch.fnmatch(pollster, pollster_list))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        if type(namespaces) is not list:"},{"line_number":150,"context_line":"            namespaces \u003d [namespaces]"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_a55a49f0","line":147,"in_reply_to":"5a890539_2cb726fa","updated":"2014-12-05 10:52:28.000000000","message":"Actually \u0027any\u0027 will work ok here I believe - as I\u0027m checking smth like \u0027if pollster name matches with any item from pollster list passed - ok, return true\u0027","commit_id":"06500006a1e267831ed3daffac3230ba6b229afd"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"5ace0f7f0ff738b312020a7df049335a52098253","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            \"\"\"Find out if pollster name matches to one of the list.\"\"\""},{"line_number":145,"context_line":"            if not pollster_list:"},{"line_number":146,"context_line":"                return True"},{"line_number":147,"context_line":"            return any(fnmatch.fnmatch(pollster, pollster_list))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        if type(namespaces) is not list:"},{"line_number":150,"context_line":"            namespaces \u003d [namespaces]"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_5a17b645","line":147,"in_reply_to":"5a890539_bc442d1a","updated":"2014-12-05 16:48:03.000000000","message":"Done","commit_id":"06500006a1e267831ed3daffac3230ba6b229afd"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"247981536192e1cda640665d798928f3b04a5e17","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            \"\"\"Find out if pollster name matches to one of the list.\"\"\""},{"line_number":145,"context_line":"            if not pollster_list:"},{"line_number":146,"context_line":"                return True"},{"line_number":147,"context_line":"            return any(fnmatch.fnmatch(pollster, pollster_list))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        if type(namespaces) is not list:"},{"line_number":150,"context_line":"            namespaces \u003d [namespaces]"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_2cb726fa","line":147,"in_reply_to":"5a890539_bc442d1a","updated":"2014-12-05 09:36:12.000000000","message":"ah, it should be name of extension here. Will change!","commit_id":"06500006a1e267831ed3daffac3230ba6b229afd"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"478070bf14d5dc0fa8f75bf9bef71829579dab98","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # be passed"},{"line_number":157,"context_line":"        for namespace in namespaces:"},{"line_number":158,"context_line":"            pollster_manager \u003d self._extensions(\u0027poll\u0027, namespace)"},{"line_number":159,"context_line":"            self.extensions \u003d itertools.chain("},{"line_number":160,"context_line":"                self.extensions,"},{"line_number":161,"context_line":"                itertools.ifilter(_match, pollster_manager.extensions))"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_2d1abb6e","line":159,"updated":"2014-12-08 09:52:18.000000000","message":"Sounds like you could just +\u003d rather than chain and iterate.\n\nAlso you could check here for pollster_list to be empty rather than each time you iterate over pollster_manager.extensions.","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"21c4f50741a1f1e73fd3e5a275c4c2555aab50b4","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # be passed"},{"line_number":157,"context_line":"        for namespace in namespaces:"},{"line_number":158,"context_line":"            pollster_manager \u003d self._extensions(\u0027poll\u0027, namespace)"},{"line_number":159,"context_line":"            self.extensions \u003d itertools.chain("},{"line_number":160,"context_line":"                self.extensions,"},{"line_number":161,"context_line":"                itertools.ifilter(_match, pollster_manager.extensions))"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_3b066e21","line":159,"in_reply_to":"3a961159_139fdc60","updated":"2014-12-08 13:20:44.000000000","message":"Yeah what I\u0027m saying is that I think this code could be written more cleanly, that\u0027s all. I\u0027m not sure I\u0027ll be able to explain correctly in a Git review so since it\u0027s a big deal I might do it myself later if it does not jump on your eyes. :)","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"f013f8b94fb7882a74e6e2c06e90986bd3cef6eb","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # be passed"},{"line_number":157,"context_line":"        for namespace in namespaces:"},{"line_number":158,"context_line":"            pollster_manager \u003d self._extensions(\u0027poll\u0027, namespace)"},{"line_number":159,"context_line":"            self.extensions \u003d itertools.chain("},{"line_number":160,"context_line":"                self.extensions,"},{"line_number":161,"context_line":"                itertools.ifilter(_match, pollster_manager.extensions))"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_139fdc60","line":159,"in_reply_to":"3a961159_2d1abb6e","updated":"2014-12-08 11:10:23.000000000","message":"Julien, I\u0027m iterating the self.extensions after init stage, so I have no object pollster_list or any from polling manager after this. I store only self.extensions and iterate through them.","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"a9e66e89e48d90a76c2b96e8277709c05b57e053","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # be passed"},{"line_number":157,"context_line":"        for namespace in namespaces:"},{"line_number":158,"context_line":"            pollster_manager \u003d self._extensions(\u0027poll\u0027, namespace)"},{"line_number":159,"context_line":"            self.extensions \u003d itertools.chain("},{"line_number":160,"context_line":"                self.extensions,"},{"line_number":161,"context_line":"                itertools.ifilter(_match, pollster_manager.extensions))"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_c4d1e6fc","line":159,"in_reply_to":"3a961159_2d1abb6e","updated":"2014-12-09 10:53:37.000000000","message":"Julien, also it looks like iterators cannot be combined via +\u003d or +, although I still want to have self.extensions as the iterator to keep looping through it efficient later in the code. So it looks like I\u0027ll need to keep itertools usage and combining of the iterators using the chain, but i\u0027ll remove unnecessary ifiltering in case of empty pollster_list","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"a88b766c129763b28bb7881ed9f24a88e15b15f7","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # be passed"},{"line_number":157,"context_line":"        for namespace in namespaces:"},{"line_number":158,"context_line":"            pollster_manager \u003d self._extensions(\u0027poll\u0027, namespace)"},{"line_number":159,"context_line":"            self.extensions \u003d itertools.chain("},{"line_number":160,"context_line":"                self.extensions,"},{"line_number":161,"context_line":"                itertools.ifilter(_match, pollster_manager.extensions))"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_d92572ac","line":159,"in_reply_to":"3a961159_3b066e21","updated":"2014-12-08 14:00:55.000000000","message":"Ah, I think I got your point. Do you mean I should use the ifilter stuff only if pollster list is not empty. Ok, cool, really good point :) Sorry, did not get the idea first time I\u0027ve read your message, thanks for the review!","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"7162a693f961a7fced62899b2e60128d7f7ccdb6","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        # be passed"},{"line_number":157,"context_line":"        for namespace in namespaces:"},{"line_number":158,"context_line":"            pollster_manager \u003d self._extensions(\u0027poll\u0027, namespace)"},{"line_number":159,"context_line":"            self.extensions \u003d itertools.chain("},{"line_number":160,"context_line":"                self.extensions,"},{"line_number":161,"context_line":"                itertools.ifilter(_match, pollster_manager.extensions))"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_4a909f43","line":159,"in_reply_to":"3a961159_c4d1e6fc","updated":"2014-12-09 11:51:03.000000000","message":"done, made list from it actually, as we\u0027re using it later as list via itertools.product","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"e8cea5ac19e3563e9a7232a977e9de88b6e7a1de","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def setup_polling_tasks(self):"},{"line_number":194,"context_line":"        polling_tasks \u003d {}"},{"line_number":195,"context_line":"        for pipeline in self.pipeline_manager.pipelines:"},{"line_number":196,"context_line":"            for pollster in self.extensions:"},{"line_number":197,"context_line":"                if pipeline.support_meter(pollster.name):"},{"line_number":198,"context_line":"                    polling_task \u003d polling_tasks.get(pipeline.get_interval())"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_ea9eab53","line":195,"updated":"2014-12-09 11:50:48.000000000","message":"as now it\u0027s list, we can rite simple nested loop without itertools.product","commit_id":"4168c467339935a5d070e2185eab6b9d262b9a3d"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"828b20f248853e0bff589474d7748f0126996e59","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.discovery_manager \u003d self._extensions(\u0027discover\u0027)"},{"line_number":161,"context_line":"        self.context \u003d context.RequestContext(\u0027admin\u0027, \u0027admin\u0027, is_admin\u003dTrue)"},{"line_number":162,"context_line":"        self.partition_coordinator \u003d coordination.PartitionCoordinator()"},{"line_number":163,"context_line":"        namespace_prefix \u003d \u0027-\u0027.join(sorted(namespaces))"},{"line_number":164,"context_line":"        self.group_prefix \u003d (\u0027%s-%s\u0027 % (namespace_prefix, group_prefix)"},{"line_number":165,"context_line":"                             if group_prefix else namespace_prefix)"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_2230b655","line":163,"updated":"2014-12-10 09:13:32.000000000","message":"ah, I need to compose group prefix from final extensions list, not from the namespaces.","commit_id":"4ae84e88188a9cc5540a6b08a3458e758471f6a5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"2ea00e35f9f8d26d5357a40b303e13b010e9247f","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        # Compose coordination group prefix."},{"line_number":165,"context_line":"        # Prefix should be based on extensions list to have all agents with the"},{"line_number":166,"context_line":"        # same extensions list in the same group. Let\u0027s use hashlib for this."},{"line_number":167,"context_line":"        ext_names \u003d sorted([ext.name for ext in self.extensions])"},{"line_number":168,"context_line":"        prefix \u003d hashlib.md5(\u0027-\u0027.join(ext_names)).hexdigest()"},{"line_number":169,"context_line":"        self.group_prefix \u003d (\u0027%s-%s\u0027 % (prefix, group_prefix)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_e9ed80b8","line":166,"updated":"2014-12-11 14:36:33.000000000","message":"Hmmm, IIUC this approach could be problematic if the lists of pollster extensions used by two agents are non-disjoint (i.e. the list intersect, but are not equivalent).\n\ne.g.\n\n agent1: $ ceilometer-polling --pollster-list image image.size ...\n agent2: $ ceilometer-polling --pollster-list image storage.* ...\n\nAs a result, agent1 and agent2 will join separate groups, but both groups will attempt to take responsibility for the image polling, leading to duplication.\n\nWould it make sense instead to have the pollster selection and the group-cordination as mutually exclusive features?\n\ni.e. to treat the --pollster-list option as a kind of manual partitioning, where the pollsters are split between different agents with any kind of automatic coordination as provided by tooz?","commit_id":"bde98b63a360901aacc6021f14b9881cdd277bda"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"3d2f3fc6eaf31cbbbe53119e4cc3db11e1bba3cb","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        # Compose coordination group prefix."},{"line_number":165,"context_line":"        # Prefix should be based on extensions list to have all agents with the"},{"line_number":166,"context_line":"        # same extensions list in the same group. Let\u0027s use hashlib for this."},{"line_number":167,"context_line":"        ext_names \u003d sorted([ext.name for ext in self.extensions])"},{"line_number":168,"context_line":"        prefix \u003d hashlib.md5(\u0027-\u0027.join(ext_names)).hexdigest()"},{"line_number":169,"context_line":"        self.group_prefix \u003d (\u0027%s-%s\u0027 % (prefix, group_prefix)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_921fa36b","line":166,"in_reply_to":"3a961159_047711a1","updated":"2014-12-12 10:15:19.000000000","message":"Eoghan, in next patch set I used namespaces as the basement for group prefix, but in this case we\u0027ll have the issue I\u0027ve described in comments + todo. It\u0027ll be the following: if we\u0027ll run several agents with the same namespaces, but different pollster-list, we\u0027ll lose some samples, as these agents will partition resources to poll.. Temporary solution is not to run agents with the same functionality (let\u0027s say \"central\") but with different pollster-list","commit_id":"bde98b63a360901aacc6021f14b9881cdd277bda"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"55f5a9402798db4d7b911d1c8014d7b747d7cac9","unresolved":false,"context_lines":[{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        # Compose coordination group prefix."},{"line_number":165,"context_line":"        # Prefix should be based on extensions list to have all agents with the"},{"line_number":166,"context_line":"        # same extensions list in the same group. Let\u0027s use hashlib for this."},{"line_number":167,"context_line":"        ext_names \u003d sorted([ext.name for ext in self.extensions])"},{"line_number":168,"context_line":"        prefix \u003d hashlib.md5(\u0027-\u0027.join(ext_names)).hexdigest()"},{"line_number":169,"context_line":"        self.group_prefix \u003d (\u0027%s-%s\u0027 % (prefix, group_prefix)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a961159_047711a1","line":166,"in_reply_to":"3a961159_e9ed80b8","updated":"2014-12-11 14:47:26.000000000","message":"a-ha, ok, thanks for this! I\nll check this moment and fix, thanks!","commit_id":"bde98b63a360901aacc6021f14b9881cdd277bda"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"02807eba8913dbc06def4d1bd3506dc9f271bfdd","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        self.partition_coordinator \u003d coordination.PartitionCoordinator()"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        # Compose coordination group prefix."},{"line_number":164,"context_line":"        # We\u0027ll use namespaces as the basement for this partitioning."},{"line_number":165,"context_line":"        # Pollsters list will be kind of manual setting of what to poll,"},{"line_number":166,"context_line":"        # and if these will be several central-like agents running with"},{"line_number":167,"context_line":"        # the same pollsters list, they\u0027ll work ok with coordination as well."}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_c8125e08","line":164,"updated":"2014-12-12 11:25:03.000000000","message":"Non-blocking nit: s/basement/basis/","commit_id":"adfda96d3534c19975a9cc6c8b22fbf151cfa48f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"02807eba8913dbc06def4d1bd3506dc9f271bfdd","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        # namespaces will partition resources to poll)"},{"line_number":173,"context_line":"        # todo(dbelova): solve the issue described above ^^"},{"line_number":174,"context_line":"        # Temporary solution: do not run agents with the different pollster"},{"line_number":175,"context_line":"        # lists in one coordination group"},{"line_number":176,"context_line":"        namespace_prefix \u003d \u0027-\u0027.join(sorted(namespaces))"},{"line_number":177,"context_line":"        self.group_prefix \u003d (\u0027%s-%s\u0027 % (namespace_prefix, group_prefix)"},{"line_number":178,"context_line":"                             if group_prefix else namespace_prefix)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_681a4a7e","line":175,"updated":"2014-12-12 11:25:03.000000000","message":"So it seems that in order to both avoid duplication *and* to get full coverage of the resources targeted by the selected pollsters, the polling lists *must* be the same in the case where multiple agents are spun up with the same namespace.\n\nThis seems quite fragile to me, for users who don\u0027t fully understand the underlying mechanism.\n\nSo one approach would be document this restriction clearly, but another more robust approach might be just to refuse to start up a second agent if the pollster_list is not None\n\ni.e. make these two features:\n\n* group coordination\n* selectable pollsters\n\nstrictly mutually exclusive ... if you enable one, you can\u0027t also enable the other.\n\nWhat do you think of that idea?","commit_id":"adfda96d3534c19975a9cc6c8b22fbf151cfa48f"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"24fbfcc214778de27726fbcbe0b47d0b725ec392","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        # namespaces will partition resources to poll)"},{"line_number":173,"context_line":"        # todo(dbelova): solve the issue described above ^^"},{"line_number":174,"context_line":"        # Temporary solution: do not run agents with the different pollster"},{"line_number":175,"context_line":"        # lists in one coordination group"},{"line_number":176,"context_line":"        namespace_prefix \u003d \u0027-\u0027.join(sorted(namespaces))"},{"line_number":177,"context_line":"        self.group_prefix \u003d (\u0027%s-%s\u0027 % (namespace_prefix, group_prefix)"},{"line_number":178,"context_line":"                             if group_prefix else namespace_prefix)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_83f037ff","line":175,"in_reply_to":"3a961159_681a4a7e","updated":"2014-12-12 11:35:15.000000000","message":"Eoghan, yeah, I got your point, but still I can imagine the situation when we\u0027re running these agents on the, let\u0027s say, cloud controllers. And we want to collect measurements only about networking, and we\u0027re not interested in Swift measurements, for instance. In this case it looks logical to allow select pollsters, but to make sure these list identical.... But I have no idea how to achieve this, because in this case we need to know more about agents in one coordination group, than their number.... \u003e_\u003c Finally I think that I should do these changes exclusive, and the situation I\u0027ve just described (only network measures, I mean) will be solved via pipeline. Will it be ok?","commit_id":"adfda96d3534c19975a9cc6c8b22fbf151cfa48f"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"752f2f388d9e10479c45708719322180e4647598","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        # namespaces will partition resources to poll)"},{"line_number":173,"context_line":"        # todo(dbelova): solve the issue described above ^^"},{"line_number":174,"context_line":"        # Temporary solution: do not run agents with the different pollster"},{"line_number":175,"context_line":"        # lists in one coordination group"},{"line_number":176,"context_line":"        namespace_prefix \u003d \u0027-\u0027.join(sorted(namespaces))"},{"line_number":177,"context_line":"        self.group_prefix \u003d (\u0027%s-%s\u0027 % (namespace_prefix, group_prefix)"},{"line_number":178,"context_line":"                             if group_prefix else namespace_prefix)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_a3245360","line":175,"in_reply_to":"3a961159_83f037ff","updated":"2014-12-12 11:44:49.000000000","message":"the only thing - I\u0027ll need to start coordinator + join partitioning group on the init stage, not during the start service stage. I suppose it is not so harmful","commit_id":"adfda96d3534c19975a9cc6c8b22fbf151cfa48f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"8930125f10e872418e1bf39ee25426e1ccfaa18d","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        # namespaces will partition resources to poll)"},{"line_number":173,"context_line":"        # todo(dbelova): solve the issue described above ^^"},{"line_number":174,"context_line":"        # Temporary solution: do not run agents with the different pollster"},{"line_number":175,"context_line":"        # lists in one coordination group"},{"line_number":176,"context_line":"        namespace_prefix \u003d \u0027-\u0027.join(sorted(namespaces))"},{"line_number":177,"context_line":"        self.group_prefix \u003d (\u0027%s-%s\u0027 % (namespace_prefix, group_prefix)"},{"line_number":178,"context_line":"                             if group_prefix else namespace_prefix)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_375a5a2a","line":175,"in_reply_to":"3a961159_a3245360","updated":"2014-12-12 13:17:49.000000000","message":"\u003e In this case it looks logical to allow select pollsters, but to make sure these list identical\n\nHmmm, I guess if you reverted to your original approach of encoding a digest of the pollster list in the tooz group ID, then on startup an agent could list the groups, checking for any group IDs with the same namespace component but a different pollster list digest (and then check if any such group found is non-empty).\n\nHowever that seems complex and also liable to start-up ordering issues (e.g. if two agents with different pollster lists are started up in very quick succession).\n\n\u003e Finally I think that I should do these changes exclusive, and the situation I\u0027ve just described (only network measures, I mean) will be solved via pipeline. Will it be ok?\n\nYes, thanks for that, I agree.","commit_id":"adfda96d3534c19975a9cc6c8b22fbf151cfa48f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a4ef8ab10676be3df431157e7227d1e2e6effed6","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            if any(self.partition_coordinator._get_members(g) for g in groups):"},{"line_number":177,"context_line":"                raise PollsterListForbidden()"},{"line_number":178,"context_line":"            extensions \u003d (itertools.ifilter(_match, exts)"},{"line_number":179,"context_line":"                          for exts in extensions)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        self.extensions \u003d list(itertools.chain(*list(extensions)))"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a961159_ceec1fbe","line":179,"updated":"2014-12-12 15:42:10.000000000","message":"Would an even simpler approach here be to just check if both the coordination.backend_url config option and the --pollster-list CLI option are both set?\n\n(otherwise there may be a small window while two agent are starting up simultaneously, but haven\u0027t yet joined the group when the other one checks)","commit_id":"4d0ddf04d128f730744351c78c411500cbc3485e"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"11f8f7d56eceebfc67e9dacbca4e28f08183abce","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            if any(self.partition_coordinator._get_members(g) for g in groups):"},{"line_number":177,"context_line":"                raise PollsterListForbidden()"},{"line_number":178,"context_line":"            extensions \u003d (itertools.ifilter(_match, exts)"},{"line_number":179,"context_line":"                          for exts in extensions)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        self.extensions \u003d list(itertools.chain(*list(extensions)))"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3a961159_ea519d62","line":179,"in_reply_to":"3a961159_ceec1fbe","updated":"2014-12-15 09:56:59.000000000","message":"Eoghan, yeah! Definitely that\u0027ll be much better, I just didn\u0027t see such simple solution somehow :) thank\u0027s will fix it right now :)","commit_id":"4d0ddf04d128f730744351c78c411500cbc3485e"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a4ef8ab10676be3df431157e7227d1e2e6effed6","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    def setup_polling_tasks(self):"},{"line_number":214,"context_line":"        polling_tasks \u003d {}"},{"line_number":215,"context_line":"        for pipeline in self.pipeline_manager.pipelines:"},{"line_number":216,"context_line":"            for pollster in self.extensions:"},{"line_number":217,"context_line":"                if pipeline.support_meter(pollster.name):"},{"line_number":218,"context_line":"                    polling_task \u003d polling_tasks.get(pipeline.get_interval())"},{"line_number":219,"context_line":"                    if not polling_task:"}],"source_content_type":"text/x-python","patch_set":21,"id":"3a961159_ce997f7a","line":216,"updated":"2014-12-12 15:42:10.000000000","message":"Just out of curiosity, why the change over from the the itertools.product to the nest for loops?\n\n(seems to be equivalent at a first look, maybe I\u0027m missing something)","commit_id":"4d0ddf04d128f730744351c78c411500cbc3485e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"b56138f705f7d7638fe0fc98cf04a74c4bfd1e7c","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            raise PollsterListForbidden()"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        if type(namespaces) is not list:"},{"line_number":168,"context_line":"            namespaces \u003d [namespaces]"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        # we\u0027ll have default [\u0027compute\u0027, \u0027central\u0027] here if no namespaces will"},{"line_number":171,"context_line":"        # be passed"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a961159_33a4fc49","line":168,"updated":"2014-12-15 11:35:44.000000000","message":"Actually you can just do namespace \u003d list(namespaces) it\u0027ll be a no-op on a list, no need to check the type.","commit_id":"9fdcae9ea943a690b1eaf2d08ef63f710436f749"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"369b53781ed42977718392b8a1c324b6197f6b13","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            raise PollsterListForbidden()"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        if type(namespaces) is not list:"},{"line_number":168,"context_line":"            namespaces \u003d [namespaces]"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        # we\u0027ll have default [\u0027compute\u0027, \u0027central\u0027] here if no namespaces will"},{"line_number":171,"context_line":"        # be passed"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a961159_5e88af70","line":168,"in_reply_to":"3a961159_33a4fc49","updated":"2014-12-15 11:45:18.000000000","message":"heh, yeah, did not think about this moment. Thanks, will use next time!","commit_id":"9fdcae9ea943a690b1eaf2d08ef63f710436f749"}],"ceilometer/agent/manager.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"41cd9f261d1de4be2bfa791e7f01497a5dc9fe22","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            namespaces, pollster_list,"},{"line_number":49,"context_line":"            group_prefix\u003dcfg.CONF.polling.partitioning_group_prefix)"},{"line_number":50,"context_line":"        if \u0027compute\u0027 in namespaces:"},{"line_number":51,"context_line":"            self._inspector \u003d virt_inspector.get_hypervisor_inspector()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @property"},{"line_number":54,"context_line":"    def inspector(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_417602a5","line":51,"updated":"2014-12-05 06:29:46.000000000","message":"seems a little bit hacky, maybe move this into compute pollster base class as a class attribute?","commit_id":"06500006a1e267831ed3daffac3230ba6b229afd"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"5ace0f7f0ff738b312020a7df049335a52098253","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            namespaces, pollster_list,"},{"line_number":49,"context_line":"            group_prefix\u003dcfg.CONF.polling.partitioning_group_prefix)"},{"line_number":50,"context_line":"        if \u0027compute\u0027 in namespaces:"},{"line_number":51,"context_line":"            self._inspector \u003d virt_inspector.get_hypervisor_inspector()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @property"},{"line_number":54,"context_line":"    def inspector(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_9a283e87","line":51,"in_reply_to":"5a890539_417602a5","updated":"2014-12-05 16:48:03.000000000","message":"Done","commit_id":"06500006a1e267831ed3daffac3230ba6b229afd"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"247981536192e1cda640665d798928f3b04a5e17","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            namespaces, pollster_list,"},{"line_number":49,"context_line":"            group_prefix\u003dcfg.CONF.polling.partitioning_group_prefix)"},{"line_number":50,"context_line":"        if \u0027compute\u0027 in namespaces:"},{"line_number":51,"context_line":"            self._inspector \u003d virt_inspector.get_hypervisor_inspector()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @property"},{"line_number":54,"context_line":"    def inspector(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_2c9e466a","line":51,"in_reply_to":"5a890539_417602a5","updated":"2014-12-05 09:36:12.000000000","message":"it\u0027ll be ok I guess :) actually I forgot to change this piece of code after I added pollster-list opportunity","commit_id":"06500006a1e267831ed3daffac3230ba6b229afd"}],"ceilometer/cmd/polling.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"41cd9f261d1de4be2bfa791e7f01497a5dc9fe22","unresolved":false,"context_lines":[{"line_number":23,"context_line":"CONF \u003d cfg.CONF"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class MultiChoicesOpt(cfg.Opt):"},{"line_number":27,"context_line":"    def __init__(self, name, choices\u003dNone, **kwargs):"},{"line_number":28,"context_line":"        super(MultiChoicesOpt, self).__init__(name,"},{"line_number":29,"context_line":"                                              type\u003dcfg.types.List(),"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_213496ab","line":26,"updated":"2014-12-05 06:29:46.000000000","message":"Sorry, but why need this? Could we just use ListOpt instead?","commit_id":"06500006a1e267831ed3daffac3230ba6b229afd"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"247981536192e1cda640665d798928f3b04a5e17","unresolved":false,"context_lines":[{"line_number":23,"context_line":"CONF \u003d cfg.CONF"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class MultiChoicesOpt(cfg.Opt):"},{"line_number":27,"context_line":"    def __init__(self, name, choices\u003dNone, **kwargs):"},{"line_number":28,"context_line":"        super(MultiChoicesOpt, self).__init__(name,"},{"line_number":29,"context_line":"                                              type\u003dcfg.types.List(),"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_6ca84e8d","line":26,"in_reply_to":"5a890539_213496ab","updated":"2014-12-05 09:36:12.000000000","message":"I need choices opportunity here - and thee is no list + choices in oslo.config","commit_id":"06500006a1e267831ed3daffac3230ba6b229afd"}],"ceilometer/opts.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"478070bf14d5dc0fa8f75bf9bef71829579dab98","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        (\u0027api\u0027,"},{"line_number":105,"context_line":"         itertools.chain(ceilometer.api.OPTS,"},{"line_number":106,"context_line":"                         ceilometer.api.app.API_OPTS,)),"},{"line_number":107,"context_line":"        (\u0027polling\u0027, ceilometer.agent.manager.OPTS),"},{"line_number":108,"context_line":"        (\u0027collector\u0027, ceilometer.collector.OPTS),"},{"line_number":109,"context_line":"        (\u0027compute\u0027, ceilometer.compute.discovery.OPTS),"},{"line_number":110,"context_line":"        (\u0027coordination\u0027, ceilometer.coordination.OPTS),"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_cd6777e9","line":107,"updated":"2014-12-08 09:52:18.000000000","message":"You need a deprecation path here.","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"f013f8b94fb7882a74e6e2c06e90986bd3cef6eb","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        (\u0027api\u0027,"},{"line_number":105,"context_line":"         itertools.chain(ceilometer.api.OPTS,"},{"line_number":106,"context_line":"                         ceilometer.api.app.API_OPTS,)),"},{"line_number":107,"context_line":"        (\u0027polling\u0027, ceilometer.agent.manager.OPTS),"},{"line_number":108,"context_line":"        (\u0027collector\u0027, ceilometer.collector.OPTS),"},{"line_number":109,"context_line":"        (\u0027compute\u0027, ceilometer.compute.discovery.OPTS),"},{"line_number":110,"context_line":"        (\u0027coordination\u0027, ceilometer.coordination.OPTS),"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_d37b9427","line":107,"in_reply_to":"3a961159_cd6777e9","updated":"2014-12-08 11:10:23.000000000","message":"ok, will leave old one, and add new here","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"f013f8b94fb7882a74e6e2c06e90986bd3cef6eb","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        (\u0027api\u0027,"},{"line_number":105,"context_line":"         itertools.chain(ceilometer.api.OPTS,"},{"line_number":106,"context_line":"                         ceilometer.api.app.API_OPTS,)),"},{"line_number":107,"context_line":"        (\u0027polling\u0027, ceilometer.agent.manager.OPTS),"},{"line_number":108,"context_line":"        (\u0027collector\u0027, ceilometer.collector.OPTS),"},{"line_number":109,"context_line":"        (\u0027compute\u0027, ceilometer.compute.discovery.OPTS),"},{"line_number":110,"context_line":"        (\u0027coordination\u0027, ceilometer.coordination.OPTS),"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_f378902d","line":107,"in_reply_to":"3a961159_cd6777e9","updated":"2014-12-08 11:10:23.000000000","message":"ok, will leave old one, and add new here","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"5e45b7035c2f56595e458e083fffacb8c52ec50d","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        (\u0027api\u0027,"},{"line_number":105,"context_line":"         itertools.chain(ceilometer.api.OPTS,"},{"line_number":106,"context_line":"                         ceilometer.api.app.API_OPTS,)),"},{"line_number":107,"context_line":"        (\u0027polling\u0027, ceilometer.agent.manager.OPTS),"},{"line_number":108,"context_line":"        (\u0027collector\u0027, ceilometer.collector.OPTS),"},{"line_number":109,"context_line":"        (\u0027compute\u0027, ceilometer.compute.discovery.OPTS),"},{"line_number":110,"context_line":"        (\u0027coordination\u0027, ceilometer.coordination.OPTS),"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a961159_6ae1dbcf","line":107,"in_reply_to":"3a961159_f378902d","updated":"2014-12-09 11:51:26.000000000","message":"done","commit_id":"22c0567782a64486906854679a511c8db5bc30cb"}]}
