)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"757f8311d38886ced692ad98e52a7bcdd287a51b","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"If the new option is set to \"false\", then the behaviour will be"},{"line_number":21,"context_line":"unchanged--the logs will be emitted right away at the \"debug\" log"},{"line_number":22,"context_line":"level."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Partially implements blueprint improve-sched-logging"},{"line_number":25,"context_line":"Co-Authored-By: Vu Tran \u003cvu.tran@windriver.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3aaa91ec_e66a2db2","line":22,"updated":"2016-06-30 21:07:01.000000000","message":"Needs a releasenote, please.","commit_id":"6b5db15bc56631687a08a8fc086e750cd6a87fa7"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c3350a1ffa039dc82e274663a09662af077e89fb","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import random"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from nova.scheduler import log as logging"},{"line_number":25,"context_line":"from six.moves import range"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"import nova.conf"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_b9abdfd5","line":24,"updated":"2016-06-28 00:16:17.000000000","message":"This changed from a third-party import to a project import so it should go in the last section: http://docs.openstack.org/developer/hacking/#import-order-template\n\nSame for all the other files.\n\nAlso, I\u0027m not sure calling it \"logging\" is a great idea since it looks quite different than plain logging. Maybe \"sched_log\" so it would be sched_log.start(), sched_log.emit(), sched_log.clear().","commit_id":"bd966d650d2ad2470a83e4760e0f285e93bd52b2"}],"nova/scheduler/log.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"e0ce1775ddfdc8bacd998535538ee24ac5b7b8f2","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self.logger_adapter \u003d logger_adapter"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def store_log(self, msg, *args, **kwargs):"},{"line_number":54,"context_line":"        if CONF.scheduler_detailed_log_only_on_failure:"},{"line_number":55,"context_line":"            self._log_records.append([msg, args, kwargs, self])"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_7f682df6","line":54,"updated":"2016-06-20 17:54:57.000000000","message":"I\u0027m still not super sure why the is configurable....","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"b43dc619f097d27e9b6ae54629c705be5ae431ce","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self.logger_adapter \u003d logger_adapter"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def store_log(self, msg, *args, **kwargs):"},{"line_number":54,"context_line":"        if CONF.scheduler_detailed_log_only_on_failure:"},{"line_number":55,"context_line":"            self._log_records.append([msg, args, kwargs, self])"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_d8dcfa1a","line":54,"in_reply_to":"5a9d85d2_7f682df6","updated":"2016-06-21 20:35:03.000000000","message":"I think the main reason would be for people that are worried about the performance penalty of generating the logs.\n\nIf there is a consensus that this should be unconditional then I\u0027m happy to remove the config option.","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"e0ce1775ddfdc8bacd998535538ee24ac5b7b8f2","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def store_log(self, msg, *args, **kwargs):"},{"line_number":54,"context_line":"        if CONF.scheduler_detailed_log_only_on_failure:"},{"line_number":55,"context_line":"            self._log_records.append([msg, args, kwargs, self])"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @classmethod"},{"line_number":58,"context_line":"    def sched_log_start(cls):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_ff225db8","line":55,"updated":"2016-06-20 17:54:57.000000000","message":"could we make this a real object, if we did, we could loop the list and mark the ones we emitted as sent, then do a separate delete sweep.","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"b43dc619f097d27e9b6ae54629c705be5ae431ce","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def store_log(self, msg, *args, **kwargs):"},{"line_number":54,"context_line":"        if CONF.scheduler_detailed_log_only_on_failure:"},{"line_number":55,"context_line":"            self._log_records.append([msg, args, kwargs, self])"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @classmethod"},{"line_number":58,"context_line":"    def sched_log_start(cls):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_d8787afb","line":55,"in_reply_to":"5a9d85d2_ff225db8","updated":"2016-06-21 20:35:03.000000000","message":"oops, that was supposed to be a tuple.  What\u0027s the benefit of being able to mark the ones that were emitted?  Would you propose doing multiple passes or something?","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"e0ce1775ddfdc8bacd998535538ee24ac5b7b8f2","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    @classmethod"},{"line_number":66,"context_line":"    def emit_logs(cls):"},{"line_number":67,"context_line":"        if CONF.scheduler_detailed_log_only_on_failure:"},{"line_number":68,"context_line":"            for msg, args, kwargs, logger in cls._log_records:"},{"line_number":69,"context_line":"                logger.info(msg, *args, **kwargs)"},{"line_number":70,"context_line":"        cls.clear_logs()"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_dfb68189","line":68,"updated":"2016-06-20 17:54:57.000000000","message":"what happens if things are added to _log_records when it emits to disk? Is this just an explode? Shouldn\u0027t we be operating on a copy?","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"b43dc619f097d27e9b6ae54629c705be5ae431ce","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    @classmethod"},{"line_number":66,"context_line":"    def emit_logs(cls):"},{"line_number":67,"context_line":"        if CONF.scheduler_detailed_log_only_on_failure:"},{"line_number":68,"context_line":"            for msg, args, kwargs, logger in cls._log_records:"},{"line_number":69,"context_line":"                logger.info(msg, *args, **kwargs)"},{"line_number":70,"context_line":"        cls.clear_logs()"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_d8623a16","line":68,"in_reply_to":"5a9d85d2_dfb68189","updated":"2016-06-21 20:35:03.000000000","message":"I asked about this but didn\u0027t get a lot of response.  Do we need to worry about simultaneous parallel scheduler operations in different eventlets, or does the scheduler run one _schedule() operation to completion and then start another?  If we could potentially have many of them going on at the same time, then we need to change the code to make _log_records a per-eventlet variable.  Once we can guarantee that then this shouldn\u0027t be a problem because we only call emit_logs() once we\u0027re done the scheduler operation.","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"e0ce1775ddfdc8bacd998535538ee24ac5b7b8f2","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def emit_logs(cls):"},{"line_number":67,"context_line":"        if CONF.scheduler_detailed_log_only_on_failure:"},{"line_number":68,"context_line":"            for msg, args, kwargs, logger in cls._log_records:"},{"line_number":69,"context_line":"                logger.info(msg, *args, **kwargs)"},{"line_number":70,"context_line":"        cls.clear_logs()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_ff237d03","line":69,"updated":"2016-06-20 17:54:57.000000000","message":"why are the logs upgraded to info? Shouldn\u0027t they keep their original level?","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"b43dc619f097d27e9b6ae54629c705be5ae431ce","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def emit_logs(cls):"},{"line_number":67,"context_line":"        if CONF.scheduler_detailed_log_only_on_failure:"},{"line_number":68,"context_line":"            for msg, args, kwargs, logger in cls._log_records:"},{"line_number":69,"context_line":"                logger.info(msg, *args, **kwargs)"},{"line_number":70,"context_line":"        cls.clear_logs()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_f848d689","line":69,"in_reply_to":"5a9d85d2_ff237d03","updated":"2016-06-21 20:35:03.000000000","message":"Some operators have said they can\u0027t run at \"debug\" log level because there are too many logs emitted.  The idea here was to allow running at \"info\" log level, but then emit additional logs in the case of a failure to schedule.","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"e0ce1775ddfdc8bacd998535538ee24ac5b7b8f2","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        if CONF.scheduler_detailed_log_only_on_failure:"},{"line_number":68,"context_line":"            for msg, args, kwargs, logger in cls._log_records:"},{"line_number":69,"context_line":"                logger.info(msg, *args, **kwargs)"},{"line_number":70,"context_line":"        cls.clear_logs()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def clear_logs(cls):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_9feeb989","line":70,"updated":"2016-06-20 17:54:57.000000000","message":"Is there any concern that clear logs happening after now contains more items?","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"b43dc619f097d27e9b6ae54629c705be5ae431ce","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        if CONF.scheduler_detailed_log_only_on_failure:"},{"line_number":68,"context_line":"            for msg, args, kwargs, logger in cls._log_records:"},{"line_number":69,"context_line":"                logger.info(msg, *args, **kwargs)"},{"line_number":70,"context_line":"        cls.clear_logs()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @classmethod"},{"line_number":73,"context_line":"    def clear_logs(cls):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_3e20879b","line":70,"in_reply_to":"5a9d85d2_9feeb989","updated":"2016-06-21 20:35:03.000000000","message":"It shouldn\u0027t...what did you have in mind?  The idea here was that once you\u0027ve emitted the logs there\u0027s no reason to cache them anymore.","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c3350a1ffa039dc82e274663a09662af077e89fb","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import nova.conf"},{"line_number":18,"context_line":"from oslo_log import log as oslo_logging"},{"line_number":19,"context_line":"import sys"},{"line_number":20,"context_line":"import types"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"CONF \u003d nova.conf.CONF"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_f6729448","line":20,"updated":"2016-06-28 00:16:17.000000000","message":"These aren\u0027t following the openstack hacking guidelines [1]. Should be:\n\n import copy\n import logging\n import sys\n import types\n\n\n from oslo_log import log as oslo_logging\n\n\n import nova.conf\n\n[1] http://docs.openstack.org/developer/hacking/#import-order-template","commit_id":"bd966d650d2ad2470a83e4760e0f285e93bd52b2"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c3350a1ffa039dc82e274663a09662af077e89fb","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    _cache_logs \u003d False"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def __init__(self, logger_adapter):"},{"line_number":65,"context_line":"        self.logger \u003d logger_adapter"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def findCaller(self):"},{"line_number":68,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_1934b3dc","line":65,"updated":"2016-06-28 00:16:17.000000000","message":"Why do you want this to be different than the superclass and exclude extra?","commit_id":"bd966d650d2ad2470a83e4760e0f285e93bd52b2"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c3350a1ffa039dc82e274663a09662af077e89fb","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        kwargs[\u0027sched_filter_pathname\u0027] \u003d fn"},{"line_number":123,"context_line":"        kwargs[\u0027sched_filter_lineno\u0027] \u003d lno"},{"line_number":124,"context_line":"        kwargs[\u0027sched_filter_funcName\u0027] \u003d func"},{"line_number":125,"context_line":"        return msg, kwargs"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def debug(self, msg, *args, **kwargs):"},{"line_number":128,"context_line":"        if CONF.scheduler_detailed_log_only_on_failure and self._cache_logs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_96fd1071","line":125,"updated":"2016-06-28 00:16:17.000000000","message":"Shouldn\u0027t this method call the superclass first? The source has:\n\n kwargs[\"extra\"] \u003d self.extra\n\nand with this, that would be lost","commit_id":"bd966d650d2ad2470a83e4760e0f285e93bd52b2"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"757f8311d38886ced692ad98e52a7bcdd287a51b","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def findCaller(self):"},{"line_number":67,"context_line":"        \"\"\"Return file name, line number, and function name of original caller."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        We want to find foo() in the call chain below:"},{"line_number":70,"context_line":"        foo() -\u003e SchedFilterLog::debug() -\u003e SchedFilterLog::process() -\u003e"},{"line_number":71,"context_line":"            SchedFilterLog::findCaller()"},{"line_number":72,"context_line":"        \"\"\""},{"line_number":73,"context_line":"        try:"},{"line_number":74,"context_line":"            raise Exception"},{"line_number":75,"context_line":"        except Exception:"},{"line_number":76,"context_line":"            f \u003d sys.exc_info()[2].tb_frame.f_back"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            f \u003d f.f_back.f_back"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_c6c1f181","line":76,"range":{"start_line":69,"start_character":0,"end_line":76,"end_character":49},"updated":"2016-06-30 21:07:01.000000000","message":"that\u0027s very ugly, why not using the traceback module for example ?","commit_id":"6b5db15bc56631687a08a8fc086e750cd6a87fa7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"6ade8ee73cf49bb354ea5b8528f278f49ce67707","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def findCaller(self):"},{"line_number":67,"context_line":"        \"\"\"Return file name, line number, and function name of original caller."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        We want to find foo() in the call chain below:"},{"line_number":70,"context_line":"        foo() -\u003e SchedFilterLog::debug() -\u003e SchedFilterLog::process() -\u003e"},{"line_number":71,"context_line":"            SchedFilterLog::findCaller()"},{"line_number":72,"context_line":"        \"\"\""},{"line_number":73,"context_line":"        try:"},{"line_number":74,"context_line":"            raise Exception"},{"line_number":75,"context_line":"        except Exception:"},{"line_number":76,"context_line":"            f \u003d sys.exc_info()[2].tb_frame.f_back"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            f \u003d f.f_back.f_back"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_41684bf5","line":76,"range":{"start_line":69,"start_character":0,"end_line":76,"end_character":49},"in_reply_to":"3aaa91ec_c6c1f181","updated":"2016-06-30 21:51:23.000000000","message":"Agree that it\u0027s ugly, will take a look at traceback.","commit_id":"6b5db15bc56631687a08a8fc086e750cd6a87fa7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d29bb2bd8cf890762dea4d44e92df3c2ce8b1bec","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    return _loggers[name]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"class SchedFilterLog(logging.LoggerAdapter):"},{"line_number":64,"context_line":"    _log_records \u003d {}"},{"line_number":65,"context_line":"    _cache_logs \u003d False"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_492f44f6","line":63,"range":{"start_line":63,"start_character":21,"end_line":63,"end_character":42},"updated":"2016-07-05 15:31:49.000000000","message":"here, I could be a bit worried to see a new oslo.log version modifying the internal APIs so that the inheritance would be trampled - even silently.\n\nProbably we should figure out another approach to just pile the logs in memory without really needing to inherit from oslo.log.","commit_id":"dc5ea074dbc65a4477e241508d84901df9b1ea27"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"482cf5b75f611a96792c6a7455e1fbce1fc3b6e8","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    return _loggers[name]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"class SchedFilterLog(logging.LoggerAdapter):"},{"line_number":64,"context_line":"    _log_records \u003d {}"},{"line_number":65,"context_line":"    _cache_logs \u003d False"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_983de6bd","line":63,"range":{"start_line":63,"start_character":21,"end_line":63,"end_character":42},"in_reply_to":"1aa78d24_492f44f6","updated":"2016-07-05 19:57:28.000000000","message":"I\u0027m less worried about the inheritance (we really only use debug() and info()) and more worried about getLogger and logger_handle_override().\n\nHow can we preserve the original log location without some intimate knowledge of the internals of oslo_log?","commit_id":"dc5ea074dbc65a4477e241508d84901df9b1ea27"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d29bb2bd8cf890762dea4d44e92df3c2ce8b1bec","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                if len(args) \u003d\u003d 1 and isinstance(args[0], dict) and args[0]:"},{"line_number":139,"context_line":"                    args \u003d args[0]"},{"line_number":140,"context_line":"                msg \u003d msg % args"},{"line_number":141,"context_line":"            self._log_records[lr_id].append((msg, kwargs, self))"},{"line_number":142,"context_line":"        else:"},{"line_number":143,"context_line":"            kwargs \u003d self.findCaller(kwargs)"},{"line_number":144,"context_line":"            self.logger.debug(msg, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_2950f85c","line":141,"range":{"start_line":141,"start_character":12,"end_line":141,"end_character":29},"updated":"2016-07-05 15:31:49.000000000","message":"Some good point was made during your unconference discussion about using the RequestContext for persisting in memory the logs. That would be another direction that wouldn\u0027t need to use the internal oslo.log interface.","commit_id":"dc5ea074dbc65a4477e241508d84901df9b1ea27"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"482cf5b75f611a96792c6a7455e1fbce1fc3b6e8","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                if len(args) \u003d\u003d 1 and isinstance(args[0], dict) and args[0]:"},{"line_number":139,"context_line":"                    args \u003d args[0]"},{"line_number":140,"context_line":"                msg \u003d msg % args"},{"line_number":141,"context_line":"            self._log_records[lr_id].append((msg, kwargs, self))"},{"line_number":142,"context_line":"        else:"},{"line_number":143,"context_line":"            kwargs \u003d self.findCaller(kwargs)"},{"line_number":144,"context_line":"            self.logger.debug(msg, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_653fb7d6","line":141,"range":{"start_line":141,"start_character":12,"end_line":141,"end_character":29},"in_reply_to":"1aa78d24_2950f85c","updated":"2016-07-05 19:57:28.000000000","message":"Are you thinking we could do that while still preserving the LOG.debug() API?\n\nIt would also have the nice property of being naturally per-eventlet.","commit_id":"dc5ea074dbc65a4477e241508d84901df9b1ea27"}],"nova/tests/unit/scheduler/test_log.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c3350a1ffa039dc82e274663a09662af077e89fb","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                \u0027nova.scheduler.filters.ram_filter\u0027)"},{"line_number":90,"context_line":"        self.saved_logger_adapter \u003d self.schedfilter_logger.logger"},{"line_number":91,"context_line":"        self.fake_logger_adaper \u003d fake_logger_adapter()"},{"line_number":92,"context_line":"        self.schedfilter_logger.logger \u003d self.fake_logger_adaper"},{"line_number":93,"context_line":"        self.fake_logger_adaper.clear()"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def tearDown(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_df884bc9","line":92,"updated":"2016-06-28 00:16:17.000000000","message":"I don\u0027t like this because a significant part of the change is the custom adapter, so I think we want to run that code.\n\nHere\u0027s a local change I did to check the actual log output instead. What do you think?\n\nhttp://paste.openstack.org/show/523689/","commit_id":"bd966d650d2ad2470a83e4760e0f285e93bd52b2"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c3350a1ffa039dc82e274663a09662af077e89fb","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        self.assertTrue("},{"line_number":198,"context_line":"                self.fake_logger_adaper.verify_order(expected_msgs))"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        fake_hosts.append(fakes.FakeHostState(\u0027host2\u0027, \u0027node2\u0027,"},{"line_number":201,"context_line":"                {\u0027free_ram_mb\u0027: 4093, \u0027total_usable_ram_mb\u0027: 4096,"},{"line_number":202,"context_line":"                 \u0027ram_allocation_ratio\u0027: 1.0}))"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        self.fake_logger_adaper.clear()"},{"line_number":205,"context_line":"        self.driver.select_destinations(self.context, spec_obj)"},{"line_number":206,"context_line":"        self.assertTrue("},{"line_number":207,"context_line":"                self.fake_logger_adaper.verify_order([]))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_1f2013f7","line":207,"range":{"start_line":200,"start_character":8,"end_line":207,"end_character":57},"updated":"2016-06-28 00:16:17.000000000","message":"I think the \"should not log\" test should be a separate test case, so you don\u0027t have to clear the adapter before testing it.","commit_id":"bd966d650d2ad2470a83e4760e0f285e93bd52b2"}],"nova/virt/hardware.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"e0ce1775ddfdc8bacd998535538ee24ac5b7b8f2","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import fractions"},{"line_number":17,"context_line":"import itertools"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from nova.scheduler import log as logging"},{"line_number":20,"context_line":"from oslo_serialization import jsonutils"},{"line_number":21,"context_line":"from oslo_utils import strutils"},{"line_number":22,"context_line":"from oslo_utils import units"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_bf73b5b0","line":19,"updated":"2016-06-20 17:54:57.000000000","message":"why is this changed outside of the scheduler?","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"794aa1146e289f0041a9beadbebba4f26e24c645","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import fractions"},{"line_number":17,"context_line":"import itertools"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from nova.scheduler import log as logging"},{"line_number":20,"context_line":"from oslo_serialization import jsonutils"},{"line_number":21,"context_line":"from oslo_utils import strutils"},{"line_number":22,"context_line":"from oslo_utils import units"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_e20f62df","line":19,"in_reply_to":"5a9d85d2_bf73b5b0","updated":"2016-06-20 18:01:17.000000000","message":"Maybe because of:\n\nhttps://review.openstack.org/#/c/331306/1/nova/scheduler/filters/numa_topology_filter.py@18\n\n? But yeah this looks wrong.","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"20068756224c743e14ab6362eece8dbfaa0bb93b","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import fractions"},{"line_number":17,"context_line":"import itertools"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from nova.scheduler import log as logging"},{"line_number":20,"context_line":"from oslo_serialization import jsonutils"},{"line_number":21,"context_line":"from oslo_utils import strutils"},{"line_number":22,"context_line":"from oslo_utils import units"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_d85d1aee","line":19,"in_reply_to":"5a9d85d2_e20f62df","updated":"2016-06-21 20:22:02.000000000","message":"I agree, it\u0027s kind of wonky.\n\nThis code is called from within numa_topology_filter.py, and so when it\u0027s called from there we want to be able to cache the debug logs and emit them only if the scheduler operation fails.  When called from elsewhere we want to log immediately.\n\nIf you\u0027ve got any ideas on how to accomplish that more cleanly, I\u0027m open to suggestions.","commit_id":"3bca2070d2afde43f24fca6cf06da8f07c332957"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"757f8311d38886ced692ad98e52a7bcdd287a51b","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from nova import objects"},{"line_number":29,"context_line":"from nova.objects import fields"},{"line_number":30,"context_line":"from nova.objects import instance as obj_instance"},{"line_number":31,"context_line":"from nova.scheduler import log as logging"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"CONF \u003d nova.conf.CONF"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_a3fc9772","line":31,"updated":"2016-06-30 21:07:01.000000000","message":"not sure I understand why this change is needed here... Because of the NUMAFilter?","commit_id":"6b5db15bc56631687a08a8fc086e750cd6a87fa7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"6ade8ee73cf49bb354ea5b8528f278f49ce67707","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from nova import objects"},{"line_number":29,"context_line":"from nova.objects import fields"},{"line_number":30,"context_line":"from nova.objects import instance as obj_instance"},{"line_number":31,"context_line":"from nova.scheduler import log as logging"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"CONF \u003d nova.conf.CONF"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_01000301","line":31,"in_reply_to":"3aaa91ec_06fdb9b0","updated":"2016-06-30 21:51:23.000000000","message":"For the NUMATopologyFilter the functions in virt.hardware do all the interesting checks, so if we don\u0027t include their debug logs in the sched log pipe we get basically no useful information for that filter.\n\nSince the NUMATopologyFilter is one of the most complicated filters (with some non-obvious failure modes) it would be a real shame if we didn\u0027t actually provide useful logs for this filter.","commit_id":"6b5db15bc56631687a08a8fc086e750cd6a87fa7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"87eafb61d5fc5e51850ad280be8fc976f07bb5dd","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from nova import objects"},{"line_number":29,"context_line":"from nova.objects import fields"},{"line_number":30,"context_line":"from nova.objects import instance as obj_instance"},{"line_number":31,"context_line":"from nova.scheduler import log as logging"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"CONF \u003d nova.conf.CONF"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_06fdb9b0","line":31,"in_reply_to":"3aaa91ec_a3fc9772","updated":"2016-06-30 21:09:28.000000000","message":"Oh, saw comments in PS1. Well, I don\u0027t think we should add the virt.hardware logs into the sched log pipe.","commit_id":"6b5db15bc56631687a08a8fc086e750cd6a87fa7"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"97ae447180cf4e9d245aaf86ce3c07fa7aca4a2c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from nova import objects"},{"line_number":29,"context_line":"from nova.objects import fields"},{"line_number":30,"context_line":"from nova.objects import instance as obj_instance"},{"line_number":31,"context_line":"from nova.scheduler import log as logging"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"CONF \u003d nova.conf.CONF"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_29bbd828","line":31,"updated":"2016-07-05 15:23:34.000000000","message":"I\u0027m really not a fan of having to change the imports in every module to suit the schedular. IMHO there needs to be a way to get the schedular logging config setup, without having to futz with imports in all code modules that happen to contain methods that might be run from the schedular.","commit_id":"dc5ea074dbc65a4477e241508d84901df9b1ea27"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"482cf5b75f611a96792c6a7455e1fbce1fc3b6e8","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from nova import objects"},{"line_number":29,"context_line":"from nova.objects import fields"},{"line_number":30,"context_line":"from nova.objects import instance as obj_instance"},{"line_number":31,"context_line":"from nova.scheduler import log as logging"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"CONF \u003d nova.conf.CONF"}],"source_content_type":"text/x-python","patch_set":8,"id":"1aa78d24_85ac63a1","line":31,"in_reply_to":"1aa78d24_29bbd828","updated":"2016-07-05 19:57:28.000000000","message":"I agree, it\u0027s not elegant.\n\nWhat if we monkey-patched the logging routines in the hardware module when importing it from the scheduler code?  Still not elegant, but at least the changes would be limited to the scheduler code.\n\nAny suggestions are welcome.","commit_id":"dc5ea074dbc65a4477e241508d84901df9b1ea27"}]}
