)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"5b8b7af8f271618ad6e1ea457a960bc4a06c4d56","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                    \u0027 device allocation retries on failures\u0027),"},{"line_number":175,"context_line":"    cfg.IntOpt(\u0027update_resources_interval\u0027,"},{"line_number":176,"context_line":"               default\u003d0,"},{"line_number":177,"context_line":"               help\u003d(\u0027Interval in seconds for updating compute resources.\u0027))"},{"line_number":178,"context_line":"]"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"timeout_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_7f77008f","line":177,"updated":"2014-08-05 13:11:47.000000000","message":"A note about what means the default value \u00270\u0027 should be interesting for the operator, what do you thing?","commit_id":"f59e388247aed962b9c3193aee9c7498bd37ea64"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"dd0c14997bab6e8b2f56804b128059bcb9b922dd","unresolved":false,"context_lines":[{"line_number":5662,"context_line":"        if (interval \u003c 0 or"},{"line_number":5663,"context_line":"                now \u003c self._last_update_resources_task + interval):"},{"line_number":5664,"context_line":"            return"},{"line_number":5665,"context_line":"        self._last_update_resources_task \u003d now"},{"line_number":5666,"context_line":""},{"line_number":5667,"context_line":"        new_resource_tracker_dict \u003d {}"},{"line_number":5668,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_01f3be6d","line":5665,"updated":"2014-08-07 07:49:11.000000000","message":"I refer to compute/manager.py\n\ncfg.IntOpt(\u0027instance_delete_interval\u0027,\n               default\u003d300,\n               help\u003d(\u0027Interval in seconds for retrying failed instance file \u0027\n                     \u0027deletes\u0027)),\n\n@periodic_task.periodic_task(spacing\u003dCONF.instance_delete_interval)\n\nit has a configuration so every 300 seconds the function will called \n\nrefer to openstack/common/periodic_task.py\n\ndef periodic_task(*args, **kwargs):\n\"\"\"Decorator to indicate that a method is a periodic task.\n\n    This decorator can be used in two ways:\n\n        1. Without arguments \u0027@periodic_task\u0027, this will be run on the default\n           interval of 60 seconds.\n\n        2. With arguments:\n           @periodic_task(spacing\u003dN [, run_immediately\u003d[True|False]])\n           this will be run on approximately every N seconds. If this number is\n           negative the periodic task will be disabled. If the run_immediately\n           argument is provided and has a value of \u0027True\u0027, the first run of the\n           task will be shortly after task scheduler starts.  If\n           run_immediately is omitted or set to \u0027False\u0027, the first time the\n           task runs will be approximately N seconds after the task scheduler\n           starts.\n\n\nso  I think the logic can be run by \n@periodic_task.periodic_task(spacing\u003dCONF.update_resources_interval)\n\nisn\u0027t it ?","commit_id":"da5b563fb2b2b95ffd12fd3e18adee61dfd03cfa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a9eca9cc5bc63d2df002fec08eb5f13a5f05421d","unresolved":false,"context_lines":[{"line_number":5662,"context_line":"        if (interval \u003c 0 or"},{"line_number":5663,"context_line":"                now \u003c self._last_update_resources_task + interval):"},{"line_number":5664,"context_line":"            return"},{"line_number":5665,"context_line":"        self._last_update_resources_task \u003d now"},{"line_number":5666,"context_line":""},{"line_number":5667,"context_line":"        new_resource_tracker_dict \u003d {}"},{"line_number":5668,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_5a2977f1","line":5665,"in_reply_to":"baada198_01f3be6d","updated":"2014-09-16 22:22:11.000000000","message":"Yeah a bunch of the periodic tasks in here are using the CONF values directly in the spacing kwarg to @periodic_task.periodic_task, why can\u0027t that be used here?\n\nIf there is a good reason we should probably have a NOTE in the code here.","commit_id":"da5b563fb2b2b95ffd12fd3e18adee61dfd03cfa"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"d5c97e79d66ab228bfe2abeda97c2b68f027f186","unresolved":false,"context_lines":[{"line_number":5956,"context_line":"                                  \"instance: %s\"),"},{"line_number":5957,"context_line":"                                e, instance\u003dinstance)"},{"line_number":5958,"context_line":""},{"line_number":5959,"context_line":"    @periodic_task.periodic_task"},{"line_number":5960,"context_line":"    def update_available_resource(self, context):"},{"line_number":5961,"context_line":"        \"\"\"See driver.get_available_resource()"},{"line_number":5962,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_9378f790","line":5959,"updated":"2014-11-12 13:30:01.000000000","message":"I see your reasoning for not just passing an argument here, but it seems that in this case things should be working or none of the other periodic tasks using that style would be adjustable.","commit_id":"28667da262e882ce05dff69352098bdaf6f828af"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d29d476c39b0373187057ece2f157f6748fbfb13","unresolved":false,"context_lines":[{"line_number":5956,"context_line":"                                  \"instance: %s\"),"},{"line_number":5957,"context_line":"                                e, instance\u003dinstance)"},{"line_number":5958,"context_line":""},{"line_number":5959,"context_line":"    @periodic_task.periodic_task"},{"line_number":5960,"context_line":"    def update_available_resource(self, context):"},{"line_number":5961,"context_line":"        \"\"\"See driver.get_available_resource()"},{"line_number":5962,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_959e6654","line":5959,"in_reply_to":"3a961159_8c465c7a","updated":"2015-01-19 11:26:59.000000000","message":"https://review.openstack.org/#/c/133904/\nis same to this one and it uses oslo style..","commit_id":"28667da262e882ce05dff69352098bdaf6f828af"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"505af0bf5b1270b7d561ee496bf8d3f4a84bb2ea","unresolved":false,"context_lines":[{"line_number":5956,"context_line":"                                  \"instance: %s\"),"},{"line_number":5957,"context_line":"                                e, instance\u003dinstance)"},{"line_number":5958,"context_line":""},{"line_number":5959,"context_line":"    @periodic_task.periodic_task"},{"line_number":5960,"context_line":"    def update_available_resource(self, context):"},{"line_number":5961,"context_line":"        \"\"\"See driver.get_available_resource()"},{"line_number":5962,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_591c3678","line":5959,"in_reply_to":"5a890539_56df060d","updated":"2014-11-18 21:10:53.000000000","message":"Well, this is an oslo-incubator module, so let\u0027s assume it\u0027s working correctly, or we have to raise a bug to them.","commit_id":"28667da262e882ce05dff69352098bdaf6f828af"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"8e9475619fe77fec535fe5385eb75174a0261939","unresolved":false,"context_lines":[{"line_number":5956,"context_line":"                                  \"instance: %s\"),"},{"line_number":5957,"context_line":"                                e, instance\u003dinstance)"},{"line_number":5958,"context_line":""},{"line_number":5959,"context_line":"    @periodic_task.periodic_task"},{"line_number":5960,"context_line":"    def update_available_resource(self, context):"},{"line_number":5961,"context_line":"        \"\"\"See driver.get_available_resource()"},{"line_number":5962,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a961159_8c465c7a","line":5959,"in_reply_to":"5a890539_591c3678","updated":"2015-01-09 20:42:22.000000000","message":"No, the bug is how nova uses it... not with the module itself.  If you pass a config variable to it here at the module level... It can be based on a config that is not  fully loaded yet. That said, I don\u0027t really care anymore.","commit_id":"28667da262e882ce05dff69352098bdaf6f828af"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8b130cd405373a5f5e393bc6dd590a52c08de435","unresolved":false,"context_lines":[{"line_number":5956,"context_line":"                                  \"instance: %s\"),"},{"line_number":5957,"context_line":"                                e, instance\u003dinstance)"},{"line_number":5958,"context_line":""},{"line_number":5959,"context_line":"    @periodic_task.periodic_task"},{"line_number":5960,"context_line":"    def update_available_resource(self, context):"},{"line_number":5961,"context_line":"        \"\"\"See driver.get_available_resource()"},{"line_number":5962,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_16615439","line":5959,"in_reply_to":"5a890539_9378f790","updated":"2014-11-12 14:34:31.000000000","message":"Agreed with Andrew, we should provide a consistent way of using periodic tasks","commit_id":"28667da262e882ce05dff69352098bdaf6f828af"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"5d4d8bb32586b58424fb0ff8270921448ef83162","unresolved":false,"context_lines":[{"line_number":5956,"context_line":"                                  \"instance: %s\"),"},{"line_number":5957,"context_line":"                                e, instance\u003dinstance)"},{"line_number":5958,"context_line":""},{"line_number":5959,"context_line":"    @periodic_task.periodic_task"},{"line_number":5960,"context_line":"    def update_available_resource(self, context):"},{"line_number":5961,"context_line":"        \"\"\"See driver.get_available_resource()"},{"line_number":5962,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_56df060d","line":5959,"in_reply_to":"5a890539_9378f790","updated":"2014-11-14 16:59:38.000000000","message":"I don\u0027t disagree. :) If you want, I can change it... and just hope that it works... since we\u0027re using that way elsewhere. Although there are other cases of things being the way I implemented it, too.. (bw usage polling is one).","commit_id":"28667da262e882ce05dff69352098bdaf6f828af"},{"author":{"_account_id":11224,"name":"Swami Reddy","email":"swamireddy@gmail.com","username":"swamireddy"},"change_message_id":"1409f2e617e6573036289f9a154a102945a16bbe","unresolved":false,"context_lines":[{"line_number":6070,"context_line":"        now \u003d time.time()"},{"line_number":6071,"context_line":"        interval \u003d CONF.update_resources_interval"},{"line_number":6072,"context_line":"        if (interval \u003c 0 or"},{"line_number":6073,"context_line":"                now \u003c self._last_update_resources_task + interval):"},{"line_number":6074,"context_line":"            return"},{"line_number":6075,"context_line":"        self._last_update_resources_task \u003d now"},{"line_number":6076,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ba7be1f8_7b0f8488","line":6073,"updated":"2015-02-25 05:28:58.000000000","message":"Remove leading extra spaces in the above line.","commit_id":"b06694d44e77ea4d130a944b502ea5d8975b80f7"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"62c5c84aed69ebcb6d06410a6c1d3c1e5cfe110c","unresolved":false,"context_lines":[{"line_number":6070,"context_line":"        now \u003d time.time()"},{"line_number":6071,"context_line":"        interval \u003d CONF.update_resources_interval"},{"line_number":6072,"context_line":"        if (interval \u003c 0 or"},{"line_number":6073,"context_line":"                now \u003c self._last_update_resources_task + interval):"},{"line_number":6074,"context_line":"            return"},{"line_number":6075,"context_line":"        self._last_update_resources_task \u003d now"},{"line_number":6076,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ba7be1f8_57019d03","line":6073,"in_reply_to":"ba7be1f8_7b0f8488","updated":"2015-02-25 14:44:13.000000000","message":"No, this is correct indentation for a continued line. Visual indentation would only be 4 spaces, which would line up with the \u0027return\u0027 line below. Correct indentation is 2 levels, or 8 spaces.","commit_id":"b06694d44e77ea4d130a944b502ea5d8975b80f7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2522e30acf72813316842e8739f71b7d2b795716","unresolved":false,"context_lines":[{"line_number":6198,"context_line":"                # different auto-increment id. The cached resource"},{"line_number":6199,"context_line":"                # tracker tried to update a deleted record and failed."},{"line_number":6200,"context_line":"                # Don\u0027t add this resource tracker to the new dict, so"},{"line_number":6201,"context_line":"                # that this will resolve itself on the next run."},{"line_number":6202,"context_line":"                continue"},{"line_number":6203,"context_line":"            except Exception as e:"},{"line_number":6204,"context_line":"                LOG.exception(_LE(\"Error updating resources for node \""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a6ced46_58a50903","line":6201,"updated":"2015-03-22 15:01:58.000000000","message":"Can we have a LOG.warning or debug here to at least let an admin know that the compute host was not found. If this happens once then it is OK, but if it is reoccurring for the same host then it may point to a real problem","commit_id":"b66a68dd1c04fcadc3f5e557b27128b606233a2f"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"812845390e975c37efb1dd6614ae8b886e7a9afe","unresolved":false,"context_lines":[{"line_number":6198,"context_line":"                # different auto-increment id. The cached resource"},{"line_number":6199,"context_line":"                # tracker tried to update a deleted record and failed."},{"line_number":6200,"context_line":"                # Don\u0027t add this resource tracker to the new dict, so"},{"line_number":6201,"context_line":"                # that this will resolve itself on the next run."},{"line_number":6202,"context_line":"                continue"},{"line_number":6203,"context_line":"            except Exception as e:"},{"line_number":6204,"context_line":"                LOG.exception(_LE(\"Error updating resources for node \""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a6ced46_7c761940","line":6201,"in_reply_to":"1a6ced46_58a50903","updated":"2015-03-23 15:48:02.000000000","message":"Done","commit_id":"b66a68dd1c04fcadc3f5e557b27128b606233a2f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2522e30acf72813316842e8739f71b7d2b795716","unresolved":false,"context_lines":[{"line_number":6201,"context_line":"                # that this will resolve itself on the next run."},{"line_number":6202,"context_line":"                continue"},{"line_number":6203,"context_line":"            except Exception as e:"},{"line_number":6204,"context_line":"                LOG.exception(_LE(\"Error updating resources for node \""},{"line_number":6205,"context_line":"                                  \"%(node)%s: %(e)s\"),"},{"line_number":6206,"context_line":"                              {\u0027node\u0027: nodename, \u0027e\u0027: e})"},{"line_number":6207,"context_line":"            new_resource_tracker_dict[nodename] \u003d rt"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a6ced46_b8ab5dd5","line":6204,"updated":"2015-03-22 15:01:58.000000000","message":"do we need a log exception here? would an error not suffice?\ndo we need the whole trace for update_available_resource?","commit_id":"b66a68dd1c04fcadc3f5e557b27128b606233a2f"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"812845390e975c37efb1dd6614ae8b886e7a9afe","unresolved":false,"context_lines":[{"line_number":6201,"context_line":"                # that this will resolve itself on the next run."},{"line_number":6202,"context_line":"                continue"},{"line_number":6203,"context_line":"            except Exception as e:"},{"line_number":6204,"context_line":"                LOG.exception(_LE(\"Error updating resources for node \""},{"line_number":6205,"context_line":"                                  \"%(node)%s: %(e)s\"),"},{"line_number":6206,"context_line":"                              {\u0027node\u0027: nodename, \u0027e\u0027: e})"},{"line_number":6207,"context_line":"            new_resource_tracker_dict[nodename] \u003d rt"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a6ced46_9c73d54c","line":6204,"in_reply_to":"1a6ced46_b8ab5dd5","updated":"2015-03-23 15:48:02.000000000","message":"Done","commit_id":"b66a68dd1c04fcadc3f5e557b27128b606233a2f"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"f28616114312b20b3fe8dbc273bf6218fd0395ea","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                    \u0027that its view of instances is in sync with nova. If the \u0027"},{"line_number":181,"context_line":"                    \u0027CONF option `scheduler_tracks_instance_changes` is \u0027"},{"line_number":182,"context_line":"                    \u0027False, changing this option will have no effect.\u0027),"},{"line_number":183,"context_line":"    cfg.IntOpt(\u0027update_resources_interval\u0027,"},{"line_number":184,"context_line":"               default\u003d0,"},{"line_number":185,"context_line":"               help\u003d\u0027Interval in seconds for updating compute resources. A \u0027"},{"line_number":186,"context_line":"                    \u0027number less than 0 means to disable the task completely. \u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa963961_1020c69a","line":183,"updated":"2015-03-26 18:44:01.000000000","message":"with docstring freeze and feature freeze, I think this has to wait for Liberty","commit_id":"02795069d069c4fd90a71d6187ba6de45689e68b"}]}
