)]}'
{"contrib/profile_caching_scheduler.sh":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"9c452a0d1c988691e25ed6adce140467a0faab3e","unresolved":false,"context_lines":[{"line_number":36,"context_line":"RESULTDIR\u003d$(pwd)"},{"line_number":37,"context_line":"echo"},{"line_number":38,"context_line":"echo \"For profiler result see: \""},{"line_number":39,"context_line":"echo $RESULTDIR/scheduer.png"},{"line_number":40,"context_line":"echo"}],"source_content_type":"text/x-sh","patch_set":39,"id":"AAAAU3%2F%2FmHU%3D","line":39,"updated":"2014-02-25 18:49:22.000000000","message":"scheduler.png","commit_id":"edf28d65523ad0986b663d55c616318a20df1477"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"935b3f190f3f51bed3dcbf28331b6e2896c0a5fe","unresolved":false,"context_lines":[{"line_number":36,"context_line":"RESULTDIR\u003d$(pwd)"},{"line_number":37,"context_line":"echo"},{"line_number":38,"context_line":"echo \"For profiler result see: \""},{"line_number":39,"context_line":"echo $RESULTDIR/scheduer.png"},{"line_number":40,"context_line":"echo"}],"source_content_type":"text/x-sh","patch_set":39,"id":"AAAAU3%2F%2FfNk%3D","line":39,"in_reply_to":"AAAAU3%2F%2FmHU%3D","updated":"2014-02-26 10:37:20.000000000","message":"oh, man, so close.","commit_id":"edf28d65523ad0986b663d55c616318a20df1477"}],"etc/nova/nova.conf.sample":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"94c320bf45067d26ad85cf46113b9f55b343f2a9","unresolved":false,"context_lines":[{"line_number":2737,"context_line":"# defined) this string is used for key derivation. (string"},{"line_number":2738,"context_line":"# value)"},{"line_number":2739,"context_line":"#memcache_secret_key\u003d\u003cNone\u003e"},{"line_number":2740,"context_line":""},{"line_number":2741,"context_line":"# (optional) indicate whether to set the X-Service-Catalog"},{"line_number":2742,"context_line":"# header. If False, middleware will not ask for service"},{"line_number":2743,"context_line":"# catalog on token validation and will not set the X-Service-"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAUH%2F%2B11Q%3D","side":"PARENT","line":2740,"updated":"2014-01-21 14:49:22.000000000","message":"looks like your keystone code is out of date","commit_id":"b89f1320cdb1c3de8ca10a51f9ba1998eaea52a9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"76aa6926fa896ffd5a044301e1312c3050e3fa23","unresolved":false,"context_lines":[{"line_number":2737,"context_line":"# defined) this string is used for key derivation. (string"},{"line_number":2738,"context_line":"# value)"},{"line_number":2739,"context_line":"#memcache_secret_key\u003d\u003cNone\u003e"},{"line_number":2740,"context_line":""},{"line_number":2741,"context_line":"# (optional) indicate whether to set the X-Service-Catalog"},{"line_number":2742,"context_line":"# header. If False, middleware will not ask for service"},{"line_number":2743,"context_line":"# catalog on token validation and will not set the X-Service-"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAUH%2F%2B1ps%3D","side":"PARENT","line":2740,"in_reply_to":"AAAAUH%2F%2B11Q%3D","updated":"2014-01-21 15:22:01.000000000","message":"ah, thats what that is, odd, thanks.","commit_id":"b89f1320cdb1c3de8ca10a51f9ba1998eaea52a9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d337700c23c530a9103eb62c12d233fb6b21a90a","unresolved":false,"context_lines":[{"line_number":1839,"context_line":"# How often to run periodic tasks in the scheduler driver of"},{"line_number":1840,"context_line":"# your choice. Please note this is likely to interact with the"},{"line_number":1841,"context_line":"# value of service_down_time. (integer value)"},{"line_number":1842,"context_line":"#scheduler_driver_task_period\u003d60"},{"line_number":1843,"context_line":""},{"line_number":1844,"context_line":""},{"line_number":1845,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":32,"id":"AAAAU3%2F%2F2vI%3D","line":1842,"updated":"2014-02-24 13:49:18.000000000","message":"I have a number of concerns with this. In the event of a service down it would be nice if the scheduler could get an event that a specific service is down - that would enable it to purge the locally cached entries.\nI am not sure if this is possible.","commit_id":"f9b77edf137623f8899214612375d868a02dc923"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1ede7f13f1e2de26ab4e231ac3789cc36e70286c","unresolved":false,"context_lines":[{"line_number":1839,"context_line":"# How often to run periodic tasks in the scheduler driver of"},{"line_number":1840,"context_line":"# your choice. Please note this is likely to interact with the"},{"line_number":1841,"context_line":"# value of service_down_time. (integer value)"},{"line_number":1842,"context_line":"#scheduler_driver_task_period\u003d60"},{"line_number":1843,"context_line":""},{"line_number":1844,"context_line":""},{"line_number":1845,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":32,"id":"AAAAU3%2F%2F1jE%3D","line":1842,"in_reply_to":"AAAAU3%2F%2F2vI%3D","updated":"2014-02-24 15:21:49.000000000","message":"yes, but this doesn\u0027t really change the behaviour we have today, it just extends the timelines a little.\n\nwe could reduce the default to 30 or lower, but then you get quite a load on your DB.\n\nits a choice, not a default deployment here, there are tradeoffs.","commit_id":"f9b77edf137623f8899214612375d868a02dc923"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"b1a5a8ed8759baad2fa12cfa2f7eb7a7689fe078","unresolved":false,"context_lines":[{"line_number":1841,"context_line":"# to interact with the value of service_down_time, but exactly"},{"line_number":1842,"context_line":"# how they interact will depend on your choice of scheduler"},{"line_number":1843,"context_line":"# driver. (integer value)"},{"line_number":1844,"context_line":"#scheduler_driver_task_period\u003d60"},{"line_number":1845,"context_line":""},{"line_number":1846,"context_line":""},{"line_number":1847,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":41,"id":"AAAAVX%2F%2F%2BGw%3D","line":1844,"updated":"2014-02-27 04:06:47.000000000","message":"Why is this enabled by default? The  default scheduler has a no-op periodic task?\n\nBeing this option is for only one scheduler, it would be good to mention that in the docstring otherwise this is confusing for users.","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5bf3766aa1560aa04f3f0506b4023f58a5666a1a","unresolved":false,"context_lines":[{"line_number":1841,"context_line":"# to interact with the value of service_down_time, but exactly"},{"line_number":1842,"context_line":"# how they interact will depend on your choice of scheduler"},{"line_number":1843,"context_line":"# driver. (integer value)"},{"line_number":1844,"context_line":"#scheduler_driver_task_period\u003d60"},{"line_number":1845,"context_line":""},{"line_number":1846,"context_line":""},{"line_number":1847,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":41,"id":"AAAAVX%2F%2F3ms%3D","line":1844,"in_reply_to":"AAAAVX%2F%2F%2BGw%3D","updated":"2014-02-27 17:48:17.000000000","message":"yeah, we should change that.","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8b6dfeaa457f4d93165844c441309cc7024153b8","unresolved":false,"context_lines":[{"line_number":1841,"context_line":"# to interact with the value of service_down_time, but exactly"},{"line_number":1842,"context_line":"# how they interact will depend on your choice of scheduler"},{"line_number":1843,"context_line":"# driver. (integer value)"},{"line_number":1844,"context_line":"#scheduler_driver_task_period\u003d60"},{"line_number":1845,"context_line":""},{"line_number":1846,"context_line":""},{"line_number":1847,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":41,"id":"AAAAVX%2F%2F3Yk%3D","line":1844,"in_reply_to":"AAAAVX%2F%2F3ms%3D","updated":"2014-02-27 18:11:20.000000000","message":"Thanks for bringing this up Joe.  It didn\u0027t occur to me until after it merged, but I agree completely.","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"}],"nova/scheduler/caching_scheduler.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"94c320bf45067d26ad85cf46113b9f55b343f2a9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2010 OpenStack Foundation"},{"line_number":4,"context_line":"# Copyright 2010 United States Government as represented by the"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B12c%3D","line":1,"updated":"2014-01-21 14:49:22.000000000","message":"these 2 lines are not needed","commit_id":"2853d104271ee0908ea00e1e91123ff97dee74b0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"76aa6926fa896ffd5a044301e1312c3050e3fa23","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright (c) 2010 OpenStack Foundation"},{"line_number":4,"context_line":"# Copyright 2010 United States Government as represented by the"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B1pk%3D","line":1,"in_reply_to":"AAAAUH%2F%2B12c%3D","updated":"2014-01-21 15:22:01.000000000","message":"sure","commit_id":"2853d104271ee0908ea00e1e91123ff97dee74b0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"94c320bf45067d26ad85cf46113b9f55b343f2a9","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class CachingScheduler(driver.Scheduler):"},{"line_number":63,"context_line":"    \"\"\"Implements Scheduler with caching on top of filter scheduler."},{"line_number":64,"context_line":"    Please not there can only be one scheduler process with the current"},{"line_number":65,"context_line":"    design."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    This is Experimental. This driver and associated configuration values"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B12I%3D","line":64,"updated":"2014-01-21 14:49:22.000000000","message":"not \u003d\u003e note","commit_id":"2853d104271ee0908ea00e1e91123ff97dee74b0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"94c320bf45067d26ad85cf46113b9f55b343f2a9","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    @property"},{"line_number":78,"context_line":"    def flavors(self):"},{"line_number":79,"context_line":"        if self._flavors is None:"},{"line_number":80,"context_line":"            return None"},{"line_number":81,"context_line":"        return [i[\"flavor\"] for i in self._flavors.values()]"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def _load_flavors(self, context):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B11w%3D","line":80,"updated":"2014-01-21 14:49:22.000000000","message":"no need for return None, you can just return","commit_id":"2853d104271ee0908ea00e1e91123ff97dee74b0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"76aa6926fa896ffd5a044301e1312c3050e3fa23","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    @property"},{"line_number":78,"context_line":"    def flavors(self):"},{"line_number":79,"context_line":"        if self._flavors is None:"},{"line_number":80,"context_line":"            return None"},{"line_number":81,"context_line":"        return [i[\"flavor\"] for i in self._flavors.values()]"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def _load_flavors(self, context):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B1pQ%3D","line":80,"in_reply_to":"AAAAUH%2F%2B11w%3D","updated":"2014-01-21 15:22:01.000000000","message":"I know, i just like to be explicit sometimes.","commit_id":"2853d104271ee0908ea00e1e91123ff97dee74b0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"94c320bf45067d26ad85cf46113b9f55b343f2a9","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                      flavor_id\u003dflavor[\"id\"],"},{"line_number":149,"context_line":"                      host\u003ddestination.host)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        #if not filtered_hosts:"},{"line_number":152,"context_line":"        #    LOG.debug(\"couldn\u0027t find and hosts\")"},{"line_number":153,"context_line":"        # cache weights?"},{"line_number":154,"context_line":"        # weighed_hosts \u003d self.host_manager.get_weighed_hosts(hosts,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B11g%3D","line":151,"updated":"2014-01-21 14:49:22.000000000","message":"is this code needed","commit_id":"2853d104271ee0908ea00e1e91123ff97dee74b0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"76aa6926fa896ffd5a044301e1312c3050e3fa23","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                      flavor_id\u003dflavor[\"id\"],"},{"line_number":149,"context_line":"                      host\u003ddestination.host)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        #if not filtered_hosts:"},{"line_number":152,"context_line":"        #    LOG.debug(\"couldn\u0027t find and hosts\")"},{"line_number":153,"context_line":"        # cache weights?"},{"line_number":154,"context_line":"        # weighed_hosts \u003d self.host_manager.get_weighed_hosts(hosts,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B1pM%3D","line":151,"in_reply_to":"AAAAUH%2F%2B11g%3D","updated":"2014-01-21 15:22:01.000000000","message":"yes, it will be, still working on this, hence WIP patch.","commit_id":"2853d104271ee0908ea00e1e91123ff97dee74b0"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"50bdda38e5556960950efc39eccab28f13dc3e0c","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        # maintain order of the config"},{"line_number":88,"context_line":"        for flavor_id in CONF.caching_scheduler.cache_list:"},{"line_number":89,"context_line":"            flavor_info \u003d self._flavors[flavor_id]"},{"line_number":90,"context_line":"            flavor_info_list.append(flavor_info)"},{"line_number":91,"context_line":"        return flavor_info_list"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _load_flavors(self, context):"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2BSO8%3D","line":90,"updated":"2014-01-28 12:49:40.000000000","message":"could you merge the linge 89 and 90?","commit_id":"f9852ee2b634381da22227e42e8bbf90111c18f1"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"50bdda38e5556960950efc39eccab28f13dc3e0c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            raise exception.NovaException(_(\"Bad caching_scheduler config.\"))"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        flavors \u003d {}"},{"line_number":102,"context_line":"        for i in xrange(num_of_flavors):"},{"line_number":103,"context_line":"            flavor_id \u003d CONF.caching_scheduler.cache_list[i]"},{"line_number":104,"context_line":"            if num_of_weights:"},{"line_number":105,"context_line":"                # TODO(johngarbutt) use oslo utils?"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2BSKE%3D","line":102,"updated":"2014-01-28 12:49:40.000000000","message":"xrange is no longer available on py3?","commit_id":"f9852ee2b634381da22227e42e8bbf90111c18f1"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"50bdda38e5556960950efc39eccab28f13dc3e0c","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"            count \u003d float(weight) * CONF.caching_scheduler.factor"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            flavor \u003d db.flavor_get_by_flavor_id(context, flavor_id, False)"},{"line_number":113,"context_line":"            flavors[flavor_id] \u003d {"},{"line_number":114,"context_line":"                \"flavorid\": flavor_id,"},{"line_number":115,"context_line":"                \"flavor\": flavor,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2BSJU%3D","line":112,"updated":"2014-01-28 12:49:40.000000000","message":"I think it is not a good pattern, you will do a call to the database for each flavor. Do you think it\u0027s possible to retrieve the list of flavors and work with it?","commit_id":"f9852ee2b634381da22227e42e8bbf90111c18f1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"170a4c83aa5f9ccadc957b5bf580c195942f813c","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"            count \u003d float(weight) * CONF.caching_scheduler.factor"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            flavor \u003d db.flavor_get_by_flavor_id(context, flavor_id, False)"},{"line_number":113,"context_line":"            flavors[flavor_id] \u003d {"},{"line_number":114,"context_line":"                \"flavorid\": flavor_id,"},{"line_number":115,"context_line":"                \"flavor\": flavor,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2BRzs%3D","line":112,"in_reply_to":"AAAAUH%2F%2BSJU%3D","updated":"2014-01-28 13:22:09.000000000","message":"Yep, I could, its just once per service start though.","commit_id":"f9852ee2b634381da22227e42e8bbf90111c18f1"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"50bdda38e5556960950efc39eccab28f13dc3e0c","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        elevated \u003d context.elevated()"},{"line_number":182,"context_line":"        raw_up_hosts \u003d self.host_manager.get_all_host_states(elevated)"},{"line_number":183,"context_line":"        up_hosts \u003d []"},{"line_number":184,"context_line":"        for host in raw_up_hosts:"},{"line_number":185,"context_line":"            LOG.debug(host)"},{"line_number":186,"context_line":"            up_hosts.append(host)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2BSHY%3D","line":184,"updated":"2014-01-28 12:49:40.000000000","message":"Could you use something more pythonic to generate the list ;)","commit_id":"f9852ee2b634381da22227e42e8bbf90111c18f1"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"50bdda38e5556960950efc39eccab28f13dc3e0c","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        raw_up_hosts \u003d self.host_manager.get_all_host_states(elevated)"},{"line_number":183,"context_line":"        up_hosts \u003d []"},{"line_number":184,"context_line":"        for host in raw_up_hosts:"},{"line_number":185,"context_line":"            LOG.debug(host)"},{"line_number":186,"context_line":"            up_hosts.append(host)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        LOG.debug(_(\"Up hosts: %s\") % up_hosts)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2BSIU%3D","line":185,"updated":"2014-01-28 12:49:40.000000000","message":"I think this log is redundant with the log line 188.","commit_id":"f9852ee2b634381da22227e42e8bbf90111c18f1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"170a4c83aa5f9ccadc957b5bf580c195942f813c","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        raw_up_hosts \u003d self.host_manager.get_all_host_states(elevated)"},{"line_number":183,"context_line":"        up_hosts \u003d []"},{"line_number":184,"context_line":"        for host in raw_up_hosts:"},{"line_number":185,"context_line":"            LOG.debug(host)"},{"line_number":186,"context_line":"            up_hosts.append(host)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        LOG.debug(_(\"Up hosts: %s\") % up_hosts)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2BRzM%3D","line":185,"in_reply_to":"AAAAUH%2F%2BSIU%3D","updated":"2014-01-28 13:22:09.000000000","message":"yeah, oops, debug code still present here.","commit_id":"f9852ee2b634381da22227e42e8bbf90111c18f1"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"50bdda38e5556960950efc39eccab28f13dc3e0c","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    @utils.synchronized(\u0027caching_scheduler_update_up_hosts\u0027)"},{"line_number":211,"context_line":"    def _populate_cache(self, context, up_hosts\u003dNone):"},{"line_number":212,"context_line":"        if up_hosts:"},{"line_number":213,"context_line":"            LOG.debug(_(\"Periodic update of host list.\"))"},{"line_number":214,"context_line":"            for flavor in self.flavors:"},{"line_number":215,"context_line":"                self._update_existing_slots(context, flavor, up_hosts)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2BSGo%3D","line":212,"updated":"2014-01-28 12:49:40.000000000","message":"At this step we are sure, bool(up_hosts) is True, no? (line 203)","commit_id":"f9852ee2b634381da22227e42e8bbf90111c18f1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"170a4c83aa5f9ccadc957b5bf580c195942f813c","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    @utils.synchronized(\u0027caching_scheduler_update_up_hosts\u0027)"},{"line_number":211,"context_line":"    def _populate_cache(self, context, up_hosts\u003dNone):"},{"line_number":212,"context_line":"        if up_hosts:"},{"line_number":213,"context_line":"            LOG.debug(_(\"Periodic update of host list.\"))"},{"line_number":214,"context_line":"            for flavor in self.flavors:"},{"line_number":215,"context_line":"                self._update_existing_slots(context, flavor, up_hosts)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2BRzY%3D","line":212,"in_reply_to":"AAAAUH%2F%2BSGo%3D","updated":"2014-01-28 13:22:09.000000000","message":"not in the last revision, still kinda working on the detail there.","commit_id":"f9852ee2b634381da22227e42e8bbf90111c18f1"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"be999fb270b8fcf88c59fc517d655076709356b3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2010 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2010 United States Government as represented by the"},{"line_number":3,"context_line":"# Administrator of the National Aeronautics and Space Administration."},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2Fzx0%3D","line":1,"updated":"2014-02-10 17:35:45.000000000","message":"header","commit_id":"e9d9a19b935a06da36aa4533914523ba257e2dbf"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"c53091c4dfcfc96d9c05902b44cf73558c24c4ad","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        super(CachingScheduler, self).__init__(*args, **kwargs)"},{"line_number":47,"context_line":"        self.all_host_states \u003d None"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def run_periodic_tasks(self, context):"},{"line_number":50,"context_line":"        \"\"\"Called from a periodic tasks in the manager.\"\"\""},{"line_number":51,"context_line":"        elevated \u003d context.elevated()"},{"line_number":52,"context_line":"        self.all_host_states \u003d self._get_up_hosts(elevated)"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2FotA%3D","line":49,"updated":"2014-02-11 20:43:43.000000000","message":"Hey, just as an alternative you could drop this periodic task and use the oslo in-memory cache with a timeout instead.\ni.e.:\n\nfrom nova.openstack.common import memory_cache\ncache \u003d memory_cache.get_client()\ncache.set(\u0027host_states\u0027, host_states, timeout)","commit_id":"1bf9b9ef5809731c214f75d920072c3a05d1c681"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"713b4398e6eb68ad2ffde7fe0d6b8cacd7a97906","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        super(CachingScheduler, self).__init__(*args, **kwargs)"},{"line_number":47,"context_line":"        self.all_host_states \u003d None"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def run_periodic_tasks(self, context):"},{"line_number":50,"context_line":"        \"\"\"Called from a periodic tasks in the manager.\"\"\""},{"line_number":51,"context_line":"        elevated \u003d context.elevated()"},{"line_number":52,"context_line":"        self.all_host_states \u003d self._get_up_hosts(elevated)"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAAUX%2F%2Foo0%3D","line":49,"in_reply_to":"AAAAUX%2F%2FotA%3D","updated":"2014-02-11 20:57:48.000000000","message":"Yeah, I just like the data already being present when the user request comes in. But that is to speed up the non-burst of requests.\n\nHowever I am not sure, it could help having fresher data, and reduce DB calls when nothing is being scheduled.","commit_id":"1bf9b9ef5809731c214f75d920072c3a05d1c681"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"f44c229e6b2e090925f5f07cc0e4510d9d62ac7c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    def _get_all_host_states(self, elevated_context):"},{"line_number":55,"context_line":"        \"\"\"Called from the filter scheduler, in a template pattern.\"\"\""},{"line_number":56,"context_line":"        if self.all_host_states is None:"},{"line_number":57,"context_line":"            LOG.warn(_(\"Host cache not populated during user request.\"))"},{"line_number":58,"context_line":"            self.all_host_states \u003d self._get_up_hosts(elevated_context)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        return self.all_host_states"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAUX%2F%2FdQ8%3D","line":57,"updated":"2014-02-13 03:12:48.000000000","message":"What about enhance log message telling end user that scheduler will populate all host stats at this time? This can improve the debug ability of caching scheduler.","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"751ac31f0c1910008af4716c7c3fa704ff2a8f67","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    def _get_all_host_states(self, elevated_context):"},{"line_number":55,"context_line":"        \"\"\"Called from the filter scheduler, in a template pattern.\"\"\""},{"line_number":56,"context_line":"        if self.all_host_states is None:"},{"line_number":57,"context_line":"            LOG.warn(_(\"Host cache not populated during user request.\"))"},{"line_number":58,"context_line":"            self.all_host_states \u003d self._get_up_hosts(elevated_context)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        return self.all_host_states"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAU3%2F%2F3e8%3D","line":57,"in_reply_to":"AAAAUX%2F%2BgM0%3D","updated":"2014-02-24 12:18:51.000000000","message":"It seems the periodic task doesn\u0027t trigger straight away, and we need a context to fill it up.\n\nProbably not worth logging at all though, to be honest.","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"55f9dde51c863aa291e48fe169784fc78caffb80","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    def _get_all_host_states(self, elevated_context):"},{"line_number":55,"context_line":"        \"\"\"Called from the filter scheduler, in a template pattern.\"\"\""},{"line_number":56,"context_line":"        if self.all_host_states is None:"},{"line_number":57,"context_line":"            LOG.warn(_(\"Host cache not populated during user request.\"))"},{"line_number":58,"context_line":"            self.all_host_states \u003d self._get_up_hosts(elevated_context)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        return self.all_host_states"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAUX%2F%2BgM0%3D","line":57,"in_reply_to":"AAAAUX%2F%2FVoY%3D","updated":"2014-02-20 20:29:00.000000000","message":"Is a log message needed here at all?  What\u0027s the expectation here?  Will this only get hit if the periodic task isn\u0027t running properly?  If so, should it be an error instead of warning?","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e906485b8c8458c50c70c2d9ea7f27eb7827b9ad","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    def _get_all_host_states(self, elevated_context):"},{"line_number":55,"context_line":"        \"\"\"Called from the filter scheduler, in a template pattern.\"\"\""},{"line_number":56,"context_line":"        if self.all_host_states is None:"},{"line_number":57,"context_line":"            LOG.warn(_(\"Host cache not populated during user request.\"))"},{"line_number":58,"context_line":"            self.all_host_states \u003d self._get_up_hosts(elevated_context)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        return self.all_host_states"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAUX%2F%2FVoY%3D","line":57,"in_reply_to":"AAAAUX%2F%2FdQ8%3D","updated":"2014-02-13 21:26:36.000000000","message":"OK","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"55f9dde51c863aa291e48fe169784fc78caffb80","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def _get_up_hosts(self, elevated_context):"},{"line_number":63,"context_line":"        raw_up_hosts \u003d self.host_manager.get_all_host_states(elevated_context)"},{"line_number":64,"context_line":"        # convert iterator into a list"},{"line_number":65,"context_line":"        return [host for host in raw_up_hosts]"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAUX%2F%2BgNc%3D","line":65,"updated":"2014-02-20 20:29:00.000000000","message":"This is fine, but I bet list(raw_up_hosts) does the same thing","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"751ac31f0c1910008af4716c7c3fa704ff2a8f67","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def _get_up_hosts(self, elevated_context):"},{"line_number":63,"context_line":"        raw_up_hosts \u003d self.host_manager.get_all_host_states(elevated_context)"},{"line_number":64,"context_line":"        # convert iterator into a list"},{"line_number":65,"context_line":"        return [host for host in raw_up_hosts]"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAU3%2F%2F3fI%3D","line":65,"in_reply_to":"AAAAUX%2F%2BgNc%3D","updated":"2014-02-24 12:18:51.000000000","message":"yeah, might change that, I guess this line morphed over time.","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2ef000b589002ecd1315e91e4d82aca5195fb2f0","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo.config import cfg"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from nova.openstack.common.gettextutils import _"},{"line_number":18,"context_line":"from nova.openstack.common import log as logging"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAU3%2F%2F3U4%3D","line":15,"updated":"2014-02-24 12:40:06.000000000","message":"this is not used","commit_id":"0073cf6c8dc88e4781118009623fe3957b59666c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2ef000b589002ecd1315e91e4d82aca5195fb2f0","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from nova.openstack.common import log as logging"},{"line_number":19,"context_line":"from nova.scheduler import filter_scheduler"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"CONF \u003d cfg.CONF"},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAU3%2F%2F3Uw%3D","line":21,"updated":"2014-02-24 12:40:06.000000000","message":"this is not used","commit_id":"0073cf6c8dc88e4781118009623fe3957b59666c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d337700c23c530a9103eb62c12d233fb6b21a90a","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":37,"context_line":"        super(CachingScheduler, self).__init__(*args, **kwargs)"},{"line_number":38,"context_line":"        self.all_host_states \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def run_periodic_tasks(self, context):"},{"line_number":41,"context_line":"        \"\"\"Called from a periodic tasks in the manager.\"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"AAAAU3%2F%2F2ug%3D","line":38,"updated":"2014-02-24 13:49:18.000000000","message":"how soon after init will the run periodic task take? why not set this here?","commit_id":"f9b77edf137623f8899214612375d868a02dc923"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1ede7f13f1e2de26ab4e231ac3789cc36e70286c","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":37,"context_line":"        super(CachingScheduler, self).__init__(*args, **kwargs)"},{"line_number":38,"context_line":"        self.all_host_states \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def run_periodic_tasks(self, context):"},{"line_number":41,"context_line":"        \"\"\"Called from a periodic tasks in the manager.\"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"AAAAU3%2F%2F1hk%3D","line":38,"in_reply_to":"AAAAU3%2F%2F2ug%3D","updated":"2014-02-24 15:21:49.000000000","message":"can\u0027t do it here, because there is no context available.\n\nset the periodic task to \"run immediately\" but that seems to take quite a while (like one poll period).","commit_id":"f9b77edf137623f8899214612375d868a02dc923"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d337700c23c530a9103eb62c12d233fb6b21a90a","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        super(CachingScheduler, self).__init__(*args, **kwargs)"},{"line_number":38,"context_line":"        self.all_host_states \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def run_periodic_tasks(self, context):"},{"line_number":41,"context_line":"        \"\"\"Called from a periodic tasks in the manager.\"\"\""},{"line_number":42,"context_line":"        elevated \u003d context.elevated()"},{"line_number":43,"context_line":"        # NOTE(johngarbutt) Fetching the list of hosts before we get"}],"source_content_type":"text/x-python","patch_set":32,"id":"AAAAU3%2F%2F2sc%3D","line":40,"updated":"2014-02-24 13:49:18.000000000","message":"another concern here is the fact that you may have over commitment. that is, scheduler 1 is not aware of what scheduler 2 is doing. they may both think that they have a full host at their disposal. this may turn out to be problematic when we are trying to use hosts to their capacity (which is ideal in a cloud)","commit_id":"f9b77edf137623f8899214612375d868a02dc923"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1ede7f13f1e2de26ab4e231ac3789cc36e70286c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        super(CachingScheduler, self).__init__(*args, **kwargs)"},{"line_number":38,"context_line":"        self.all_host_states \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def run_periodic_tasks(self, context):"},{"line_number":41,"context_line":"        \"\"\"Called from a periodic tasks in the manager.\"\"\""},{"line_number":42,"context_line":"        elevated \u003d context.elevated()"},{"line_number":43,"context_line":"        # NOTE(johngarbutt) Fetching the list of hosts before we get"}],"source_content_type":"text/x-python","patch_set":32,"id":"AAAAU3%2F%2F1gQ%3D","line":40,"in_reply_to":"AAAAU3%2F%2F2sc%3D","updated":"2014-02-24 15:21:49.000000000","message":"Agreed, thats why you can only run one of these at the moment. Or you get races.\n\nIts a deployment option, not the default, so I don\u0027t have a problem with that.\n\nIf you run multiple, you will just get retries, which could be fine, just depends what you want to trade off in your environment.","commit_id":"f9b77edf137623f8899214612375d868a02dc923"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"45773e6f68d469fd476ce2e7e9890da7aab41ae2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack Foundation"},{"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":37,"id":"AAAAU3%2F%2FnMg%3D","line":1,"updated":"2014-02-25 17:14:42.000000000","message":"Minor nit since copyright lines will never be fully accurate, but this would be copyright Rackspace rather than the foundation.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d553c715dd6cdc9f9c5c861146871fc1fec8a907","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack Foundation"},{"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":37,"id":"AAAAU3%2F%2Fmyc%3D","line":1,"in_reply_to":"AAAAU3%2F%2Fm%2BQ%3D","updated":"2014-02-25 17:52:20.000000000","message":"I got a -1 for leaving it off, so I added in this one, I can change it to rackspace.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a721b18afabef86fb468cd7b22a5b8249be74c4e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack Foundation"},{"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":37,"id":"AAAAU3%2F%2Fm%2BQ%3D","line":1,"in_reply_to":"AAAAU3%2F%2FnHM%3D","updated":"2014-02-25 17:34:59.000000000","message":"Best to leave it off then.  I don\u0027t really care either way, just passing on the pushback I\u0027ve received about this same thing.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cdc82718521f49f47d69ed56d016d5f7514c73cb","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack Foundation"},{"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":37,"id":"AAAAU3%2F%2FnHM%3D","line":1,"in_reply_to":"AAAAU3%2F%2FnMg%3D","updated":"2014-02-25 17:24:39.000000000","message":"Yeah, I am just trying to ignore this stuff, no one ever gives me a straight answer on what should be here.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"45773e6f68d469fd476ce2e7e9890da7aab41ae2","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    This scheduler tries its best to cache in memory the current"},{"line_number":35,"context_line":"    state of the system, so we don\u0027t need to make the expensive"},{"line_number":36,"context_line":"    call to get the current state of the system while processing"},{"line_number":37,"context_line":"    as users requests, we can do that query in a periodic task"},{"line_number":38,"context_line":"    before the user even issues their request."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    To reduce races, cached info of the chosen host is updated using"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnMM%3D","line":37,"updated":"2014-02-25 17:14:42.000000000","message":"s/as/a/","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cdc82718521f49f47d69ed56d016d5f7514c73cb","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    This scheduler tries its best to cache in memory the current"},{"line_number":35,"context_line":"    state of the system, so we don\u0027t need to make the expensive"},{"line_number":36,"context_line":"    call to get the current state of the system while processing"},{"line_number":37,"context_line":"    as users requests, we can do that query in a periodic task"},{"line_number":38,"context_line":"    before the user even issues their request."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    To reduce races, cached info of the chosen host is updated using"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnHA%3D","line":37,"in_reply_to":"AAAAU3%2F%2FnMM%3D","updated":"2014-02-25 17:24:39.000000000","message":"oops, thanks","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"b1a5a8ed8759baad2fa12cfa2f7eb7a7689fe078","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    before the user even issues their request."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    To reduce races, cached info of the chosen host is updated using"},{"line_number":41,"context_line":"    the existing host state call: consume_from_instance"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    Please note, the way this works, each scheduler worker has its own"},{"line_number":44,"context_line":"    copy of the cache. So if you run multiple schedulers, you will get"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F%2BDI%3D","line":41,"updated":"2014-02-27 04:06:47.000000000","message":"There is another parameter that makes this scheduler less racey:\n\nIf you use the spread first weigher (dispersion), then you reduce the risk of running out of space on a box. Also some randomization in the weigher can\u0027t hurt.\n\n\nCan you point me to the logic that uses consume_from_instance to update the cache?","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5bf3766aa1560aa04f3f0506b4023f58a5666a1a","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    before the user even issues their request."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    To reduce races, cached info of the chosen host is updated using"},{"line_number":41,"context_line":"    the existing host state call: consume_from_instance"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    Please note, the way this works, each scheduler worker has its own"},{"line_number":44,"context_line":"    copy of the cache. So if you run multiple schedulers, you will get"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F3mU%3D","line":41,"in_reply_to":"AAAAVX%2F%2F%2BDI%3D","updated":"2014-02-27 17:48:17.000000000","message":"Agreed, randomisation and spread first would help you.\n\nIts here, due to how requesting multiple hosts works:\nhttps://github.com/openstack/nova/blob/master/nova/scheduler/filter_scheduler.py#L349\n\nDon\u0027t know a good way of linking to that in these kinds of docs.","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"275e7df6687b9805440dc96bb68a51a66b4d2275","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    before the user even issues their request."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    To reduce races, cached info of the chosen host is updated using"},{"line_number":41,"context_line":"    the existing host state call: consume_from_instance"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    Please note, the way this works, each scheduler worker has its own"},{"line_number":44,"context_line":"    copy of the cache. So if you run multiple schedulers, you will get"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F3IE%3D","line":41,"in_reply_to":"AAAAVX%2F%2F3mU%3D","updated":"2014-02-27 18:49:52.000000000","message":"And for the second question:\n\nCan you point me to the logic that uses consume_from_instance to update the cache?","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"b1a5a8ed8759baad2fa12cfa2f7eb7a7689fe078","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    Please note, the way this works, each scheduler worker has its own"},{"line_number":44,"context_line":"    copy of the cache. So if you run multiple schedulers, you will get"},{"line_number":45,"context_line":"    more retries, because the data stored on any additional scheduler will"},{"line_number":46,"context_line":"    be more out of date, than if it was fetched from the database."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    In a similar way, if you have a high number of server deletes, the"},{"line_number":49,"context_line":"    extra capacity from those deletes will not show up until the cache is"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F%2BDM%3D","line":46,"updated":"2014-02-27 04:06:47.000000000","message":"In the documentations current form I don\u0027t really see any real value in this scheduler:\n\nIf it is designed to make scheduling faster, but doesn\u0027t work well with multiple schedulers, then what use case is that? That being said I do think there is a real case where this is valuable (see above comments).","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5bf3766aa1560aa04f3f0506b4023f58a5666a1a","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    Please note, the way this works, each scheduler worker has its own"},{"line_number":44,"context_line":"    copy of the cache. So if you run multiple schedulers, you will get"},{"line_number":45,"context_line":"    more retries, because the data stored on any additional scheduler will"},{"line_number":46,"context_line":"    be more out of date, than if it was fetched from the database."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    In a similar way, if you have a high number of server deletes, the"},{"line_number":49,"context_line":"    extra capacity from those deletes will not show up until the cache is"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F3lw%3D","line":46,"in_reply_to":"AAAAVX%2F%2F%2BDM%3D","updated":"2014-02-27 17:48:17.000000000","message":"Its quite valuable, according to the tests I have run, with one or two schedulers, and fill first.\n\nI think we should evolve this as we understand where its useful. Probably shouldn\u0027t live here, its just easy to put it here for now.","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"275e7df6687b9805440dc96bb68a51a66b4d2275","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    Please note, the way this works, each scheduler worker has its own"},{"line_number":44,"context_line":"    copy of the cache. So if you run multiple schedulers, you will get"},{"line_number":45,"context_line":"    more retries, because the data stored on any additional scheduler will"},{"line_number":46,"context_line":"    be more out of date, than if it was fetched from the database."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    In a similar way, if you have a high number of server deletes, the"},{"line_number":49,"context_line":"    extra capacity from those deletes will not show up until the cache is"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F3Ik%3D","line":46,"in_reply_to":"AAAAVX%2F%2F3lw%3D","updated":"2014-02-27 18:49:52.000000000","message":"I am fine with the docs living here for now.  But its missing anything about fill first","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"aba32d976a9b91124ea1346c76a62e374016a840","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self.all_host_states \u003d self._get_up_hosts(elevated)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _get_all_host_states(self, context):"},{"line_number":66,"context_line":"        \"\"\"Called from the filter scheduler, in a template pattern.\"\"\""},{"line_number":67,"context_line":"        if self.all_host_states is None:"},{"line_number":68,"context_line":"            # NOTE(johngarbutt) We only get here when we a scheduler request"},{"line_number":69,"context_line":"            # comes in before the first run of the periodic task."}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAU3%2F%2Fa14%3D","line":66,"updated":"2014-02-26 19:09:10.000000000","message":"\"a template pattern\" ... perhaps \"overrides the filter scheduler method\"?\n\nwe have run_immediately \u003d True... is this a concern?","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5bf3766aa1560aa04f3f0506b4023f58a5666a1a","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self.all_host_states \u003d self._get_up_hosts(elevated)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _get_all_host_states(self, context):"},{"line_number":66,"context_line":"        \"\"\"Called from the filter scheduler, in a template pattern.\"\"\""},{"line_number":67,"context_line":"        if self.all_host_states is None:"},{"line_number":68,"context_line":"            # NOTE(johngarbutt) We only get here when we a scheduler request"},{"line_number":69,"context_line":"            # comes in before the first run of the periodic task."}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F3kA%3D","line":66,"in_reply_to":"AAAAU3%2F%2Fa14%3D","updated":"2014-02-27 17:48:17.000000000","message":"yeah, that sounds better.","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"f44c229e6b2e090925f5f07cc0e4510d9d62ac7c","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                filter_properties[\u0027group_hosts\u0027].append(chosen_host.obj.host)"},{"line_number":352,"context_line":"        return selected_hosts"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def _get_all_host_states(self, elevated_context):"},{"line_number":355,"context_line":"        \"\"\"Template method, so a subclass can implement caching.\"\"\""},{"line_number":356,"context_line":"        return self.host_manager.get_all_host_states(elevated_context)"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAUX%2F%2FdW8%3D","line":354,"updated":"2014-02-13 03:12:48.000000000","message":"What about remove _ for this and make it as a not internal function?","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e906485b8c8458c50c70c2d9ea7f27eb7827b9ad","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                filter_properties[\u0027group_hosts\u0027].append(chosen_host.obj.host)"},{"line_number":352,"context_line":"        return selected_hosts"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def _get_all_host_states(self, elevated_context):"},{"line_number":355,"context_line":"        \"\"\"Template method, so a subclass can implement caching.\"\"\""},{"line_number":356,"context_line":"        return self.host_manager.get_all_host_states(elevated_context)"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAUX%2F%2FVlM%3D","line":354,"in_reply_to":"AAAAUX%2F%2FdW8%3D","updated":"2014-02-13 21:26:36.000000000","message":"Seems bad to add an extra \"public\" function, because no caller of this class needs to call the method. Thats why I chose \"_\"","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"45773e6f68d469fd476ce2e7e9890da7aab41ae2","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                filter_properties[\u0027group_hosts\u0027].append(chosen_host.obj.host)"},{"line_number":352,"context_line":"        return selected_hosts"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def _get_all_host_states(self, elevated_context):"},{"line_number":355,"context_line":"        \"\"\"Template method, so a subclass can implement caching.\"\"\""},{"line_number":356,"context_line":"        return self.host_manager.get_all_host_states(elevated_context)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnUE%3D","line":354,"updated":"2014-02-25 17:14:42.000000000","message":"Minor nit, but I would prefer this to just be context.  It\u0027s not a requirement of the scheduler or the host manager that the context be elevated.  The elevation is done due to a check in the db, but there\u0027s a push to move these checks out of the db layer to avoid these elevations.  So it would be nice if the name here didn\u0027t suggest that the scheduler requires an elevated context.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d553c715dd6cdc9f9c5c861146871fc1fec8a907","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                filter_properties[\u0027group_hosts\u0027].append(chosen_host.obj.host)"},{"line_number":352,"context_line":"        return selected_hosts"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def _get_all_host_states(self, elevated_context):"},{"line_number":355,"context_line":"        \"\"\"Template method, so a subclass can implement caching.\"\"\""},{"line_number":356,"context_line":"        return self.host_manager.get_all_host_states(elevated_context)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2Fmxg%3D","line":354,"in_reply_to":"AAAAU3%2F%2Fm%2BY%3D","updated":"2014-02-25 17:52:20.000000000","message":"OK, not sure it feels quite right though, let me worth that through and see how it looks.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a721b18afabef86fb468cd7b22a5b8249be74c4e","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                filter_properties[\u0027group_hosts\u0027].append(chosen_host.obj.host)"},{"line_number":352,"context_line":"        return selected_hosts"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def _get_all_host_states(self, elevated_context):"},{"line_number":355,"context_line":"        \"\"\"Template method, so a subclass can implement caching.\"\"\""},{"line_number":356,"context_line":"        return self.host_manager.get_all_host_states(elevated_context)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2Fm%2BY%3D","line":354,"in_reply_to":"AAAAU3%2F%2FnFk%3D","updated":"2014-02-25 17:34:59.000000000","message":"I\u0027m not suggesting elevating it twice, just renaming that parameter.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cdc82718521f49f47d69ed56d016d5f7514c73cb","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                filter_properties[\u0027group_hosts\u0027].append(chosen_host.obj.host)"},{"line_number":352,"context_line":"        return selected_hosts"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def _get_all_host_states(self, elevated_context):"},{"line_number":355,"context_line":"        \"\"\"Template method, so a subclass can implement caching.\"\"\""},{"line_number":356,"context_line":"        return self.host_manager.get_all_host_states(elevated_context)"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnFk%3D","line":354,"in_reply_to":"AAAAU3%2F%2FnUE%3D","updated":"2014-02-25 17:24:39.000000000","message":"hmm. It just seems bad to elevate the context twice, but thats probably neater I suppose.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"aba32d976a9b91124ea1346c76a62e374016a840","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        return selected_hosts"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def _get_all_host_states(self, context):"},{"line_number":355,"context_line":"        \"\"\"Template method, so a subclass can implement caching.\"\"\""},{"line_number":356,"context_line":"        return self.host_manager.get_all_host_states(context)"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAU3%2F%2Faz4%3D","line":355,"updated":"2014-02-26 19:09:10.000000000","message":"Hmm, terminology. \"Broken out so a subclass can override default behavior. For example, to add caching or fetch from a source other than the db.\"","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5bf3766aa1560aa04f3f0506b4023f58a5666a1a","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        return selected_hosts"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def _get_all_host_states(self, context):"},{"line_number":355,"context_line":"        \"\"\"Template method, so a subclass can implement caching.\"\"\""},{"line_number":356,"context_line":"        return self.host_manager.get_all_host_states(context)"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F3jM%3D","line":355,"in_reply_to":"AAAAU3%2F%2Faz4%3D","updated":"2014-02-27 17:48:17.000000000","message":"Yeah, its a little different that the pure form, but it does roughly follow the idea here:\nhttp://en.wikipedia.org/wiki/Template_method_pattern","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"}],"nova/scheduler/host_manager.py":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"55f9dde51c863aa291e48fe169784fc78caffb80","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        # Mutable available resources."},{"line_number":116,"context_line":"        # These will change as resources are virtually \"consumed\"."},{"line_number":117,"context_line":"        self.total_usable_ram_mb \u003d 0"},{"line_number":118,"context_line":"        self.total_usable_disk_gb \u003d 0"},{"line_number":119,"context_line":"        self.disk_mb_used \u003d 0"},{"line_number":120,"context_line":"        self.free_ram_mb \u003d 0"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAUX%2F%2BgL0%3D","line":117,"updated":"2014-02-20 20:29:00.000000000","message":"This doesn\u0027t look really related, but also seems incredibly trivial to split into another patch, so not a big deal","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7416fd8ac9269d2cbba87f514de6e1fc6f2f578c","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        # Mutable available resources."},{"line_number":116,"context_line":"        # These will change as resources are virtually \"consumed\"."},{"line_number":117,"context_line":"        self.total_usable_ram_mb \u003d 0"},{"line_number":118,"context_line":"        self.total_usable_disk_gb \u003d 0"},{"line_number":119,"context_line":"        self.disk_mb_used \u003d 0"},{"line_number":120,"context_line":"        self.free_ram_mb \u003d 0"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAU3%2F%2F3T0%3D","line":117,"in_reply_to":"AAAAU3%2F%2F3eU%3D","updated":"2014-02-24 12:42:12.000000000","message":"Yes, without this nova.tests.scheduler.test_caching_scheduler.CachingSchedulerTestCase.test_select_destination_works will not work.","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"751ac31f0c1910008af4716c7c3fa704ff2a8f67","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        # Mutable available resources."},{"line_number":116,"context_line":"        # These will change as resources are virtually \"consumed\"."},{"line_number":117,"context_line":"        self.total_usable_ram_mb \u003d 0"},{"line_number":118,"context_line":"        self.total_usable_disk_gb \u003d 0"},{"line_number":119,"context_line":"        self.disk_mb_used \u003d 0"},{"line_number":120,"context_line":"        self.free_ram_mb \u003d 0"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAU3%2F%2F3eU%3D","line":117,"in_reply_to":"AAAAUX%2F%2BgL0%3D","updated":"2014-02-24 12:18:51.000000000","message":"Without this some unit tests didn\u0027t work, let me dig into if this is needed any more. I suspect this was for the old scheduler only.","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d337700c23c530a9103eb62c12d233fb6b21a90a","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        # Mutable available resources."},{"line_number":116,"context_line":"        # These will change as resources are virtually \"consumed\"."},{"line_number":117,"context_line":"        self.total_usable_ram_mb \u003d 0"},{"line_number":118,"context_line":"        self.total_usable_disk_gb \u003d 0"},{"line_number":119,"context_line":"        self.disk_mb_used \u003d 0"},{"line_number":120,"context_line":"        self.free_ram_mb \u003d 0"}],"source_content_type":"text/x-python","patch_set":32,"id":"AAAAU3%2F%2F2sY%3D","line":117,"updated":"2014-02-24 13:49:18.000000000","message":"is this related to this patch set?","commit_id":"f9b77edf137623f8899214612375d868a02dc923"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1ede7f13f1e2de26ab4e231ac3789cc36e70286c","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        # Mutable available resources."},{"line_number":116,"context_line":"        # These will change as resources are virtually \"consumed\"."},{"line_number":117,"context_line":"        self.total_usable_ram_mb \u003d 0"},{"line_number":118,"context_line":"        self.total_usable_disk_gb \u003d 0"},{"line_number":119,"context_line":"        self.disk_mb_used \u003d 0"},{"line_number":120,"context_line":"        self.free_ram_mb \u003d 0"}],"source_content_type":"text/x-python","patch_set":32,"id":"AAAAU3%2F%2F1gE%3D","line":117,"in_reply_to":"AAAAU3%2F%2F2sY%3D","updated":"2014-02-24 15:21:49.000000000","message":"Yes, see previous comments, its required for the unit tests.","commit_id":"f9b77edf137623f8899214612375d868a02dc923"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"c04217193b9d7713474be7b5ad0a3ab8e53c9542","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        # Mutable available resources."},{"line_number":116,"context_line":"        # These will change as resources are virtually \"consumed\"."},{"line_number":117,"context_line":"        self.total_usable_ram_mb \u003d 0"},{"line_number":118,"context_line":"        self.total_usable_disk_gb \u003d 0"},{"line_number":119,"context_line":"        self.disk_mb_used \u003d 0"},{"line_number":120,"context_line":"        self.free_ram_mb \u003d 0"}],"source_content_type":"text/x-python","patch_set":33,"id":"AAAAU3%2F%2F0E8%3D","line":117,"updated":"2014-02-24 17:17:31.000000000","message":"Unrelated?","commit_id":"0fc6ce972f063c420d7471b0715bb555d0c10ccb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"01c3ccea88e1aa043a4f35ba206ef9146df51e8c","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        # Mutable available resources."},{"line_number":116,"context_line":"        # These will change as resources are virtually \"consumed\"."},{"line_number":117,"context_line":"        self.total_usable_ram_mb \u003d 0"},{"line_number":118,"context_line":"        self.total_usable_disk_gb \u003d 0"},{"line_number":119,"context_line":"        self.disk_mb_used \u003d 0"},{"line_number":120,"context_line":"        self.free_ram_mb \u003d 0"}],"source_content_type":"text/x-python","patch_set":33,"id":"AAAAU3%2F%2FzvY%3D","line":117,"in_reply_to":"AAAAU3%2F%2F0E8%3D","updated":"2014-02-24 17:36:35.000000000","message":"No, it makes the unit tests work.","commit_id":"0fc6ce972f063c420d7471b0715bb555d0c10ccb"}],"nova/scheduler/manager.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"be999fb270b8fcf88c59fc517d655076709356b3","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    cfg.StrOpt(\u0027scheduler_driver\u0027,"},{"line_number":49,"context_line":"               default\u003d\u0027nova.scheduler.filter_scheduler.FilterScheduler\u0027,"},{"line_number":50,"context_line":"               help\u003d\u0027Default driver to use for the scheduler\u0027),"},{"line_number":51,"context_line":"    cfg.IntOpt(\u0027scheduler_cache_poll_period\u0027,"},{"line_number":52,"context_line":"               default\u003d60,"},{"line_number":53,"context_line":"               help\u003d\u0027How often to refresh the cached slots. \u0027"},{"line_number":54,"context_line":"                    \u0027Please note this is likely to interact with the value \u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2FzyA%3D","line":51,"updated":"2014-02-10 17:35:45.000000000","message":"This option is specific to a driver, and should be moved to the driver, possibly in its own option group.","commit_id":"e9d9a19b935a06da36aa4533914523ba257e2dbf"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"be999fb270b8fcf88c59fc517d655076709356b3","unresolved":false,"context_lines":[{"line_number":267,"context_line":"    def _expire_reservations(self, context):"},{"line_number":268,"context_line":"        QUOTAS.expire(context)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    @periodic_task.periodic_task(spacing\u003dCONF.scheduler_cache_poll_period,"},{"line_number":271,"context_line":"                                 run_immediately\u003dTrue)"},{"line_number":272,"context_line":"    def _refresh_cache(self, context):"},{"line_number":273,"context_line":"        self.driver.periodic_refresh(context)"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2FzyY%3D","line":270,"updated":"2014-02-10 17:35:45.000000000","message":"This task is more specific to the caching driver.\n\nAt the manager level, I think you\u0027d want a more generic:\n\nself.driver.driver_tasks()\n\nto handle any driver-specific periodic tasks.","commit_id":"e9d9a19b935a06da36aa4533914523ba257e2dbf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"374af01215523138982e1d1ecaecaba9d05e4167","unresolved":false,"context_lines":[{"line_number":267,"context_line":"    def _expire_reservations(self, context):"},{"line_number":268,"context_line":"        QUOTAS.expire(context)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    @periodic_task.periodic_task(spacing\u003dCONF.scheduler_cache_poll_period,"},{"line_number":271,"context_line":"                                 run_immediately\u003dTrue)"},{"line_number":272,"context_line":"    def _refresh_cache(self, context):"},{"line_number":273,"context_line":"        self.driver.periodic_refresh(context)"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2FvUs%3D","line":270,"in_reply_to":"AAAAUX%2F%2FzyY%3D","updated":"2014-02-11 05:08:55.000000000","message":"I like that idea, and make the config match.","commit_id":"e9d9a19b935a06da36aa4533914523ba257e2dbf"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"45773e6f68d469fd476ce2e7e9890da7aab41ae2","unresolved":false,"context_lines":[{"line_number":48,"context_line":"               help\u003d\u0027Default driver to use for the scheduler\u0027),"},{"line_number":49,"context_line":"    cfg.IntOpt(\u0027scheduler_driver_task_period\u0027,"},{"line_number":50,"context_line":"               default\u003d60,"},{"line_number":51,"context_line":"               help\u003d\u0027How often to run periodic tasks in the scheduler driver \u0027"},{"line_number":52,"context_line":"                    \u0027of your choice. \u0027"},{"line_number":53,"context_line":"                    \u0027Please note this is likely to interact with the value \u0027"},{"line_number":54,"context_line":"                    \u0027of service_down_time.\u0027),"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnYE%3D","line":51,"updated":"2014-02-25 17:14:42.000000000","message":"Please add a unit to this.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cdc82718521f49f47d69ed56d016d5f7514c73cb","unresolved":false,"context_lines":[{"line_number":48,"context_line":"               help\u003d\u0027Default driver to use for the scheduler\u0027),"},{"line_number":49,"context_line":"    cfg.IntOpt(\u0027scheduler_driver_task_period\u0027,"},{"line_number":50,"context_line":"               default\u003d60,"},{"line_number":51,"context_line":"               help\u003d\u0027How often to run periodic tasks in the scheduler driver \u0027"},{"line_number":52,"context_line":"                    \u0027of your choice. \u0027"},{"line_number":53,"context_line":"                    \u0027Please note this is likely to interact with the value \u0027"},{"line_number":54,"context_line":"                    \u0027of service_down_time.\u0027),"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnFU%3D","line":51,"in_reply_to":"AAAAU3%2F%2FnYE%3D","updated":"2014-02-25 17:24:39.000000000","message":"yeah.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"45773e6f68d469fd476ce2e7e9890da7aab41ae2","unresolved":false,"context_lines":[{"line_number":50,"context_line":"               default\u003d60,"},{"line_number":51,"context_line":"               help\u003d\u0027How often to run periodic tasks in the scheduler driver \u0027"},{"line_number":52,"context_line":"                    \u0027of your choice. \u0027"},{"line_number":53,"context_line":"                    \u0027Please note this is likely to interact with the value \u0027"},{"line_number":54,"context_line":"                    \u0027of service_down_time.\u0027),"},{"line_number":55,"context_line":"]"},{"line_number":56,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnX4%3D","line":53,"updated":"2014-02-25 17:14:42.000000000","message":"In what way is this going to interact?","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cdc82718521f49f47d69ed56d016d5f7514c73cb","unresolved":false,"context_lines":[{"line_number":50,"context_line":"               default\u003d60,"},{"line_number":51,"context_line":"               help\u003d\u0027How often to run periodic tasks in the scheduler driver \u0027"},{"line_number":52,"context_line":"                    \u0027of your choice. \u0027"},{"line_number":53,"context_line":"                    \u0027Please note this is likely to interact with the value \u0027"},{"line_number":54,"context_line":"                    \u0027of service_down_time.\u0027),"},{"line_number":55,"context_line":"]"},{"line_number":56,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnE8%3D","line":53,"in_reply_to":"AAAAU3%2F%2FnX4%3D","updated":"2014-02-25 17:24:39.000000000","message":"its driver dependent, I can\u0027t say exactly, but I probably should say its scheduler driver dependent.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"}],"nova/tests/scheduler/test_caching_scheduler.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"94c320bf45067d26ad85cf46113b9f55b343f2a9","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    \"\"\"Test case for Filter Scheduler.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    driver_cls \u003d caching_scheduler.CachingScheduler"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    "},{"line_number":31,"context_line":"    @mock.patch.object(caching_scheduler.CachingScheduler,"},{"line_number":32,"context_line":"                       \"select_destinations\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B12o%3D","line":29,"updated":"2014-01-21 14:49:22.000000000","message":"whitespace","commit_id":"2853d104271ee0908ea00e1e91123ff97dee74b0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"94c320bf45067d26ad85cf46113b9f55b343f2a9","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                    admin_password, injected_files, requested_networks,"},{"line_number":49,"context_line":"                    True, filter_properties, False)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"            mock_run.assert_called_with(self.context, "},{"line_number":52,"context_line":"                    instance\u003dNone,"},{"line_number":53,"context_line":"                    host\u003d\"host\","},{"line_number":54,"context_line":"                    request_spec\u003dfake_request_spec,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B12k%3D","line":51,"updated":"2014-01-21 14:49:22.000000000","message":"ditto","commit_id":"2853d104271ee0908ea00e1e91123ff97dee74b0"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"f44c229e6b2e090925f5f07cc0e4510d9d62ac7c","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        result \u003d self._test_select_destinations(fake_request_spec)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        self.assertEqual(len(result), 1)"},{"line_number":89,"context_line":"        self.assertEqual(result[0][\"host\"], fake_host.host)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def _test_select_destinations(self, request_spec):"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAUX%2F%2FdWY%3D","line":88,"updated":"2014-02-13 03:12:48.000000000","message":"assertEqual(expected, observed).","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e906485b8c8458c50c70c2d9ea7f27eb7827b9ad","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        result \u003d self._test_select_destinations(fake_request_spec)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        self.assertEqual(len(result), 1)"},{"line_number":89,"context_line":"        self.assertEqual(result[0][\"host\"], fake_host.host)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def _test_select_destinations(self, request_spec):"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAUX%2F%2FVk4%3D","line":88,"in_reply_to":"AAAAUX%2F%2FdWY%3D","updated":"2014-02-13 21:26:36.000000000","message":"oops","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"f44c229e6b2e090925f5f07cc0e4510d9d62ac7c","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        self.assertEqual(0.0, per_request_ms)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":188,"context_line":"    # A handy tool to help profile the schedulers performance"},{"line_number":189,"context_line":"    import unittest"},{"line_number":190,"context_line":"    suite \u003d unittest.TestSuite()"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAUX%2F%2FdWM%3D","line":187,"updated":"2014-02-13 03:12:48.000000000","message":"Do we still need this?","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"751ac31f0c1910008af4716c7c3fa704ff2a8f67","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        self.assertEqual(0.0, per_request_ms)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":188,"context_line":"    # A handy tool to help profile the schedulers performance"},{"line_number":189,"context_line":"    import unittest"},{"line_number":190,"context_line":"    suite \u003d unittest.TestSuite()"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAU3%2F%2F3c4%3D","line":187,"in_reply_to":"AAAAUX%2F%2BgKU%3D","updated":"2014-02-24 12:18:51.000000000","message":"I couldn\u0027t decide where to put it, but it does feel a bit odd here.\n\nBut I like how with the current approach our \"performance tool\" is checked for correctness on every unit test run. Of course, it doesn\u0027t check the string test below, which sucks.\n\nI am tempted to leave this, if thats OK?","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"55f9dde51c863aa291e48fe169784fc78caffb80","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        self.assertEqual(0.0, per_request_ms)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":188,"context_line":"    # A handy tool to help profile the schedulers performance"},{"line_number":189,"context_line":"    import unittest"},{"line_number":190,"context_line":"    suite \u003d unittest.TestSuite()"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAUX%2F%2BgKU%3D","line":187,"in_reply_to":"AAAAUX%2F%2FdWM%3D","updated":"2014-02-20 20:29:00.000000000","message":"It seems fine to keep.\n\nMaybe it should be moved out to its own file somewhere, though?","commit_id":"3f8f700270f66ae6504fb2e0b58232a6be81b04a"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"c04217193b9d7713474be7b5ad0a3ab8e53c9542","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class CachingSchedulerTestCase(test_scheduler.SchedulerTestCase):"},{"line_number":26,"context_line":"    \"\"\"Test case for Filter Scheduler.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    driver_cls \u003d caching_scheduler.CachingScheduler"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"AAAAU3%2F%2F0Ds%3D","line":26,"updated":"2014-02-24 17:17:31.000000000","message":"nit, not filter schdeduler","commit_id":"0fc6ce972f063c420d7471b0715bb555d0c10ccb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"01c3ccea88e1aa043a4f35ba206ef9146df51e8c","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class CachingSchedulerTestCase(test_scheduler.SchedulerTestCase):"},{"line_number":26,"context_line":"    \"\"\"Test case for Filter Scheduler.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    driver_cls \u003d caching_scheduler.CachingScheduler"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"AAAAU3%2F%2Fzu4%3D","line":26,"in_reply_to":"AAAAU3%2F%2F0Ds%3D","updated":"2014-02-24 17:36:35.000000000","message":"damm, oops.","commit_id":"0fc6ce972f063c420d7471b0715bb555d0c10ccb"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"c04217193b9d7713474be7b5ad0a3ab8e53c9542","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        self.assertEqual(0.0, per_request_ms)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":188,"context_line":"    # A handy tool to help profile the schedulers performance"},{"line_number":189,"context_line":"    import unittest"},{"line_number":190,"context_line":"    suite \u003d unittest.TestSuite()"}],"source_content_type":"text/x-python","patch_set":33,"id":"AAAAU3%2F%2Fz%2FQ%3D","line":187,"updated":"2014-02-24 17:17:31.000000000","message":"Do you want to include this stuff in master?  It\u0027s likely to break all the time because it won\u0027t get tested.","commit_id":"0fc6ce972f063c420d7471b0715bb555d0c10ccb"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"45773e6f68d469fd476ce2e7e9890da7aab41ae2","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        per_request_ms \u003d None"},{"line_number":160,"context_line":"        try:"},{"line_number":161,"context_line":"            # helpful to use profiler, if installed"},{"line_number":162,"context_line":"            import pycallgraph"},{"line_number":163,"context_line":"            from pycallgraph import output"},{"line_number":164,"context_line":"            config \u003d pycallgraph.Config(max_depth\u003d10)"},{"line_number":165,"context_line":"            config.trace_filter \u003d pycallgraph.GlobbingFilter(exclude\u003d["}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnM8%3D","line":162,"updated":"2014-02-25 17:14:42.000000000","message":"Very cool, but I really don\u0027t like toggling this with an import check.  Tests changing based on the calling environment can end up being great sources of confusion when things go wrong.  Maybe just a global config flag that can be set by the main block below?","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cdc82718521f49f47d69ed56d016d5f7514c73cb","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        per_request_ms \u003d None"},{"line_number":160,"context_line":"        try:"},{"line_number":161,"context_line":"            # helpful to use profiler, if installed"},{"line_number":162,"context_line":"            import pycallgraph"},{"line_number":163,"context_line":"            from pycallgraph import output"},{"line_number":164,"context_line":"            config \u003d pycallgraph.Config(max_depth\u003d10)"},{"line_number":165,"context_line":"            config.trace_filter \u003d pycallgraph.GlobbingFilter(exclude\u003d["}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnEs%3D","line":162,"in_reply_to":"AAAAU3%2F%2FnM8%3D","updated":"2014-02-25 17:24:39.000000000","message":"Yeah, OK. That would work better.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"45773e6f68d469fd476ce2e7e9890da7aab41ae2","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        self.assertTrue(per_request_ms \u003c 1000)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":188,"context_line":"    # A handy tool to help profile the schedulers performance"},{"line_number":189,"context_line":"    import unittest"},{"line_number":190,"context_line":"    suite \u003d unittest.TestSuite()"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnPY%3D","line":187,"updated":"2014-02-25 17:14:42.000000000","message":"This is awesome, though it would be nice if it lived somewhere that made it more visible.  My guess is very few people will ever know this is here.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cdc82718521f49f47d69ed56d016d5f7514c73cb","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        self.assertTrue(per_request_ms \u003c 1000)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":188,"context_line":"    # A handy tool to help profile the schedulers performance"},{"line_number":189,"context_line":"    import unittest"},{"line_number":190,"context_line":"    suite \u003d unittest.TestSuite()"}],"source_content_type":"text/x-python","patch_set":37,"id":"AAAAU3%2F%2FnD4%3D","line":187,"in_reply_to":"AAAAU3%2F%2FnPY%3D","updated":"2014-02-25 17:24:39.000000000","message":"Very true, but most of the other places seem like worse places to put it.\n\nIf I move it out of here, then the above test looks mental.\n\nIf I move all of it out of here, then the thing will just bit rot as it doesn\u0027t get unit tested.\n\nOpen to ideas here.","commit_id":"525463d275ffac40c2ebee421ad7afd9ecc6e761"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"aba32d976a9b91124ea1346c76a62e374016a840","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        request_spec \u003d self._get_fake_request_spec()"},{"line_number":139,"context_line":"        host_states \u003d []"},{"line_number":140,"context_line":"        for x in xrange(hosts):"},{"line_number":141,"context_line":"            host_state \u003d self._get_fake_host_state(x)"},{"line_number":142,"context_line":"            host_states.append(host_state)"},{"line_number":143,"context_line":"        self.driver.all_host_states \u003d host_states"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAU3%2F%2Faws%3D","line":140,"updated":"2014-02-26 19:09:10.000000000","message":"xrange is gone in Py3","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"aba32d976a9b91124ea1346c76a62e374016a840","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        def run_test():"},{"line_number":146,"context_line":"            a \u003d timeutils.utcnow()"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"            for x in xrange(requests):"},{"line_number":149,"context_line":"                self.driver.select_destinations("},{"line_number":150,"context_line":"                    self.context, request_spec, {})"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAU3%2F%2Fawk%3D","line":148,"updated":"2014-02-26 19:09:10.000000000","message":"Python 3","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5bf3766aa1560aa04f3f0506b4023f58a5666a1a","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        def run_test():"},{"line_number":146,"context_line":"            a \u003d timeutils.utcnow()"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"            for x in xrange(requests):"},{"line_number":149,"context_line":"                self.driver.select_destinations("},{"line_number":150,"context_line":"                    self.context, request_spec, {})"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F3ic%3D","line":148,"in_reply_to":"AAAAU3%2F%2Fawk%3D","updated":"2014-02-27 17:48:17.000000000","message":"Yeah, good point, I keep forgetting that. We should add checks for this in our flake-8 tool if we want people to stop using this.","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"aba32d976a9b91124ea1346c76a62e374016a840","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        # This has proved to be around 1 ms on a random dev box"},{"line_number":179,"context_line":"        # But this is here so you can do simply performance testing easily."},{"line_number":180,"context_line":"        self.assertTrue(per_request_ms \u003c 1000)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAU3%2F%2Far8%3D","line":180,"updated":"2014-02-26 19:09:10.000000000","message":"Hmm, these sorts of checks are wreak havoc with CI environments. Arguably, If they give a wide enough berth, what\u0027s the point?","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5bf3766aa1560aa04f3f0506b4023f58a5666a1a","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        # This has proved to be around 1 ms on a random dev box"},{"line_number":179,"context_line":"        # But this is here so you can do simply performance testing easily."},{"line_number":180,"context_line":"        self.assertTrue(per_request_ms \u003c 1000)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":41,"id":"AAAAVX%2F%2F3hs%3D","line":180,"in_reply_to":"AAAAU3%2F%2Far8%3D","updated":"2014-02-27 17:48:17.000000000","message":"This is just so performance test \"harness\" doesn\u0027t break over time.","commit_id":"1b24bfbd73bd8d953cacb14bca8659d4e57bc579"}]}
