)]}'
{"ironic_python_agent/api/controllers/v1/base.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b1a11ed3ac66654207d27c7ce1cfeaee6dbf6843","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        return {"},{"line_number":31,"context_line":"            \u0027type\u0027: value.__class__.__name__,"},{"line_number":32,"context_line":"            \u0027code\u0027: getattr(value, \u0027status_code\u0027, 500),"},{"line_number":33,"context_line":"            \u0027message\u0027: value.message,"},{"line_number":34,"context_line":"            \u0027details\u0027: getattr(value, \u0027details\u0027, \u0027\u0027),"},{"line_number":35,"context_line":"        }"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1af86dd1_caecd191","line":33,"updated":"2015-06-12 11:52:37.000000000","message":"nit: str(value). message attribute is deprecated and was dropped in Python 3","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"e7abfdd557044bba842f0ca7154ec7ea6f46bb6a","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        return {"},{"line_number":31,"context_line":"            \u0027type\u0027: value.__class__.__name__,"},{"line_number":32,"context_line":"            \u0027code\u0027: getattr(value, \u0027status_code\u0027, 500),"},{"line_number":33,"context_line":"            \u0027message\u0027: value.message,"},{"line_number":34,"context_line":"            \u0027details\u0027: getattr(value, \u0027details\u0027, \u0027\u0027),"},{"line_number":35,"context_line":"        }"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_67a1f945","line":33,"in_reply_to":"1af86dd1_caecd191","updated":"2015-07-28 00:59:41.000000000","message":"Done","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"}],"ironic_python_agent/extensions/base.py":[{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"2a8ec1c09ed04fbd46e1c57321a334624526b49b","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                self.command_result \u003d result"},{"line_number":158,"context_line":"                self.command_status \u003d AgentCommandStatus.SUCCEEDED"},{"line_number":159,"context_line":"        except errors.CleanVersionMismatch as e:"},{"line_number":160,"context_line":"            with self.command_state_lock:"},{"line_number":161,"context_line":"                self.command_error \u003d e"},{"line_number":162,"context_line":"                self.command_status \u003d AgentCommandStatus.CLEAN_VERSION_MISMATCH"},{"line_number":163,"context_line":"                self.command_result \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_d54f1132","line":160,"updated":"2015-06-10 17:54:21.000000000","message":"Should you log something here?","commit_id":"3a6c9d16c38475a5b6de7c48a76bee104bac1020"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"96441922f374c2c65fe7bb9d9be739a0404678d7","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                self.command_result \u003d result"},{"line_number":158,"context_line":"                self.command_status \u003d AgentCommandStatus.SUCCEEDED"},{"line_number":159,"context_line":"        except errors.CleanVersionMismatch as e:"},{"line_number":160,"context_line":"            with self.command_state_lock:"},{"line_number":161,"context_line":"                self.command_error \u003d e"},{"line_number":162,"context_line":"                self.command_status \u003d AgentCommandStatus.CLEAN_VERSION_MISMATCH"},{"line_number":163,"context_line":"                self.command_result \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_151fe908","line":160,"in_reply_to":"3afb71cf_d54f1132","updated":"2015-06-10 17:55:31.000000000","message":"It\u0027s logged in cleaning.py (where we have more context). I figured I\u0027d skip double logging.","commit_id":"3a6c9d16c38475a5b6de7c48a76bee104bac1020"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b1a11ed3ac66654207d27c7ce1cfeaee6dbf6843","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            if type(result) in (str, unicode):"},{"line_number":154,"context_line":"                result \u003d {\u0027result\u0027: \u0027{}: {}\u0027.format(self.command_name, result)}"},{"line_number":155,"context_line":"            LOG.info(\u0027Command result: %s\u0027, result)"},{"line_number":156,"context_line":"            with self.command_state_lock:"},{"line_number":157,"context_line":"                self.command_result \u003d result"},{"line_number":158,"context_line":"                self.command_status \u003d AgentCommandStatus.SUCCEEDED"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af86dd1_0af30975","line":155,"updated":"2015-06-12 11:52:37.000000000","message":"++ will look weird if several things will be done in parallel","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b9126540574e1d913c57c03305eaec6f9a7f8752","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            if type(result) in (str, unicode):"},{"line_number":154,"context_line":"                result \u003d {\u0027result\u0027: \u0027{}: {}\u0027.format(self.command_name, result)}"},{"line_number":155,"context_line":"            LOG.info(\u0027Command result: %s\u0027, result)"},{"line_number":156,"context_line":"            with self.command_state_lock:"},{"line_number":157,"context_line":"                self.command_result \u003d result"},{"line_number":158,"context_line":"                self.command_status \u003d AgentCommandStatus.SUCCEEDED"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af86dd1_634be22c","line":155,"updated":"2015-06-11 21:40:42.000000000","message":"You log the result but not the command itself?","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"e7abfdd557044bba842f0ca7154ec7ea6f46bb6a","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            if type(result) in (str, unicode):"},{"line_number":154,"context_line":"                result \u003d {\u0027result\u0027: \u0027{}: {}\u0027.format(self.command_name, result)}"},{"line_number":155,"context_line":"            LOG.info(\u0027Command result: %s\u0027, result)"},{"line_number":156,"context_line":"            with self.command_state_lock:"},{"line_number":157,"context_line":"                self.command_result \u003d result"},{"line_number":158,"context_line":"                self.command_status \u003d AgentCommandStatus.SUCCEEDED"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_22ae7fe6","line":155,"in_reply_to":"1af86dd1_0af30975","updated":"2015-07-28 00:59:41.000000000","message":"IPA doesn\u0027t do anything in parallel currently, but point taken.","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b1a11ed3ac66654207d27c7ce1cfeaee6dbf6843","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            with self.command_state_lock:"},{"line_number":161,"context_line":"                self.command_error \u003d e"},{"line_number":162,"context_line":"                self.command_status \u003d AgentCommandStatus.CLEAN_VERSION_MISMATCH"},{"line_number":163,"context_line":"                self.command_result \u003d None"},{"line_number":164,"context_line":"        except Exception as e:"},{"line_number":165,"context_line":"            LOG.exception(\u0027Command failed: %s\u0027, e)"},{"line_number":166,"context_line":"            if not isinstance(e, errors.RESTError):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af86dd1_eae78daa","line":163,"updated":"2015-06-12 11:52:37.000000000","message":"++ for logging this one","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b9126540574e1d913c57c03305eaec6f9a7f8752","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            with self.command_state_lock:"},{"line_number":161,"context_line":"                self.command_error \u003d e"},{"line_number":162,"context_line":"                self.command_status \u003d AgentCommandStatus.CLEAN_VERSION_MISMATCH"},{"line_number":163,"context_line":"                self.command_result \u003d None"},{"line_number":164,"context_line":"        except Exception as e:"},{"line_number":165,"context_line":"            LOG.exception(\u0027Command failed: %s\u0027, e)"},{"line_number":166,"context_line":"            if not isinstance(e, errors.RESTError):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_c092719f","line":163,"updated":"2015-06-11 21:40:42.000000000","message":"You don\u0027t want to log this?","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"e7abfdd557044bba842f0ca7154ec7ea6f46bb6a","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            with self.command_state_lock:"},{"line_number":161,"context_line":"                self.command_error \u003d e"},{"line_number":162,"context_line":"                self.command_status \u003d AgentCommandStatus.CLEAN_VERSION_MISMATCH"},{"line_number":163,"context_line":"                self.command_result \u003d None"},{"line_number":164,"context_line":"        except Exception as e:"},{"line_number":165,"context_line":"            LOG.exception(\u0027Command failed: %s\u0027, e)"},{"line_number":166,"context_line":"            if not isinstance(e, errors.RESTError):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_029823bf","line":163,"in_reply_to":"1af86dd1_eae78daa","updated":"2015-07-28 00:59:41.000000000","message":"I have it logging further up the stack where it has more information, but it can\u0027t hurt to have a simple message here.","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b9126540574e1d913c57c03305eaec6f9a7f8752","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        \"\"\"Execute an agent command.\"\"\""},{"line_number":225,"context_line":"        with self.command_lock:"},{"line_number":226,"context_line":"            LOG.info(\u0027Executing command: %(name)s with args: %(args)s\u0027,"},{"line_number":227,"context_line":"                     {\u0027name\u0027: command_name, \u0027args\u0027: kwargs})"},{"line_number":228,"context_line":"            extension_part, command_part \u003d self.split_command(command_name)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"            if len(self.command_results) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_a09e5561","line":227,"updated":"2015-06-11 21:40:42.000000000","message":"I don\u0027t know what can be in kwargs. As long as the content isn\u0027t too large eg, like the configdrive that we logged in ironic :)","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"e7abfdd557044bba842f0ca7154ec7ea6f46bb6a","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        \"\"\"Execute an agent command.\"\"\""},{"line_number":225,"context_line":"        with self.command_lock:"},{"line_number":226,"context_line":"            LOG.info(\u0027Executing command: %(name)s with args: %(args)s\u0027,"},{"line_number":227,"context_line":"                     {\u0027name\u0027: command_name, \u0027args\u0027: kwargs})"},{"line_number":228,"context_line":"            extension_part, command_part \u003d self.split_command(command_name)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"            if len(self.command_results) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_625a47f4","line":227,"in_reply_to":"3afb71cf_a09e5561","updated":"2015-07-28 00:59:41.000000000","message":"Hmmm, after a quick glance through the calls, it looks there shouldn\u0027t be anything crazy like the config drive. The only time the node object is passed in is during cleaning, and instance_info is cleared by then.","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b9126540574e1d913c57c03305eaec6f9a7f8752","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                result \u003d SyncCommandResult(command_name, kwargs, False, e)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"            self.command_results[result.id] \u003d result"},{"line_number":258,"context_line":"            return result"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"def async_command(command_name, validator\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af86dd1_63c40292","line":258,"updated":"2015-06-11 21:40:42.000000000","message":"It seems a bit odd that you log the \u0027executing command\u0027 at the start, but don\u0027t log that it succeeded/result.","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"e7abfdd557044bba842f0ca7154ec7ea6f46bb6a","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                result \u003d SyncCommandResult(command_name, kwargs, False, e)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"            self.command_results[result.id] \u003d result"},{"line_number":258,"context_line":"            return result"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"def async_command(command_name, validator\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_c2179bec","line":258,"in_reply_to":"1af86dd1_63c40292","updated":"2015-07-28 00:59:41.000000000","message":"Done","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"46d91f29ed95429d29b1664427285c9f42cf8956","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                raise e"},{"line_number":255,"context_line":"            except Exception as e:"},{"line_number":256,"context_line":"                # Other errors are considered command execution errors, and are"},{"line_number":257,"context_line":"                # recorded as an"},{"line_number":258,"context_line":"                LOG.exception(\u0027Command execution error: %s\u0027, e)"},{"line_number":259,"context_line":"                result \u003d SyncCommandResult(command_name, kwargs, False, e)"},{"line_number":260,"context_line":"            LOG.info(\u0027Command %(name)s completed successfully: %(result)s\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_f7a6fbbf","line":257,"updated":"2015-07-28 13:35:11.000000000","message":"recorded as an what? (I know, outside the scope of this patch but I was wondering)","commit_id":"0c00d8ef3f4ee860b1f39e5c02b60e172795675d"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"9ef5fc8a4a85f2960656eab5f7eeae7b39f8381b","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                raise e"},{"line_number":255,"context_line":"            except Exception as e:"},{"line_number":256,"context_line":"                # Other errors are considered command execution errors, and are"},{"line_number":257,"context_line":"                # recorded as an"},{"line_number":258,"context_line":"                LOG.exception(\u0027Command execution error: %s\u0027, e)"},{"line_number":259,"context_line":"                result \u003d SyncCommandResult(command_name, kwargs, False, e)"},{"line_number":260,"context_line":"            LOG.info(\u0027Command %(name)s completed successfully: %(result)s\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_6b0aff8b","line":257,"in_reply_to":"3a50d1a3_f7a6fbbf","updated":"2015-07-28 16:40:04.000000000","message":"Heh good question. Did a git blame and found it\u0027s been there for \u003e1yr. I\u0027ll fix it up, since this is a general fixup patch.","commit_id":"0c00d8ef3f4ee860b1f39e5c02b60e172795675d"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fa22bdf919dcf80ad3d52e0742e31eb0b8f9a0cb","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                # recorded as an"},{"line_number":258,"context_line":"                LOG.exception(\u0027Command execution error: %s\u0027, e)"},{"line_number":259,"context_line":"                result \u003d SyncCommandResult(command_name, kwargs, False, e)"},{"line_number":260,"context_line":"            LOG.info(\u0027Command %(name)s completed successfully: %(result)s\u0027,"},{"line_number":261,"context_line":"                     {\u0027name\u0027: command_name, \u0027result\u0027: result})"},{"line_number":262,"context_line":"            self.command_results[result.id] \u003d result"},{"line_number":263,"context_line":"            return result"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_3f1aff6f","line":260,"updated":"2015-07-28 12:35:16.000000000","message":"Wouldn\u0027t the error, and log entry and then the completed successfully messages possibly become a bit confusing?","commit_id":"0c00d8ef3f4ee860b1f39e5c02b60e172795675d"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"9ef5fc8a4a85f2960656eab5f7eeae7b39f8381b","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                # recorded as an"},{"line_number":258,"context_line":"                LOG.exception(\u0027Command execution error: %s\u0027, e)"},{"line_number":259,"context_line":"                result \u003d SyncCommandResult(command_name, kwargs, False, e)"},{"line_number":260,"context_line":"            LOG.info(\u0027Command %(name)s completed successfully: %(result)s\u0027,"},{"line_number":261,"context_line":"                     {\u0027name\u0027: command_name, \u0027result\u0027: result})"},{"line_number":262,"context_line":"            self.command_results[result.id] \u003d result"},{"line_number":263,"context_line":"            return result"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_2bd397d6","line":260,"in_reply_to":"3a50d1a3_3f1aff6f","updated":"2015-07-28 16:40:04.000000000","message":"Yup, missed that the above block doesn\u0027t raise again like the other exceptions.","commit_id":"0c00d8ef3f4ee860b1f39e5c02b60e172795675d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cb9d6ff273f4cd3be237c8d6ab00fadc54dd4106","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                self.command_error \u003d e"},{"line_number":163,"context_line":"                self.command_status \u003d AgentCommandStatus.CLEAN_VERSION_MISMATCH"},{"line_number":164,"context_line":"                self.command_result \u003d None"},{"line_number":165,"context_line":"            LOG.info(\u0027Clean version mismatch for command %s\u0027,"},{"line_number":166,"context_line":"                     self.command_name)"},{"line_number":167,"context_line":"        except Exception as e:"},{"line_number":168,"context_line":"            LOG.exception(\u0027Command failed: %(name)s, error: %(err)s\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_6a873961","line":165,"updated":"2015-07-29 07:49:08.000000000","message":"this should be error IMO","commit_id":"59281ecda8df5bf44c06e9edbc70e9cbfe061052"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cb9d6ff273f4cd3be237c8d6ab00fadc54dd4106","unresolved":false,"context_lines":[{"line_number":227,"context_line":"    def execute_command(self, command_name, **kwargs):"},{"line_number":228,"context_line":"        \"\"\"Execute an agent command.\"\"\""},{"line_number":229,"context_line":"        with self.command_lock:"},{"line_number":230,"context_line":"            LOG.info(\u0027Executing command: %(name)s with args: %(args)s\u0027,"},{"line_number":231,"context_line":"                     {\u0027name\u0027: command_name, \u0027args\u0027: kwargs})"},{"line_number":232,"context_line":"            extension_part, command_part \u003d self.split_command(command_name)"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_0a7a3577","line":230,"updated":"2015-07-29 07:49:08.000000000","message":"according to the guidelines, \"info\" should be a unit of work. \"Executing\" is not a unit of work, so it should be debug","commit_id":"59281ecda8df5bf44c06e9edbc70e9cbfe061052"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cb9d6ff273f4cd3be237c8d6ab00fadc54dd4106","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            if len(self.command_results) \u003e 0:"},{"line_number":235,"context_line":"                last_command \u003d list(self.command_results.values())[-1]"},{"line_number":236,"context_line":"                if not last_command.is_done():"},{"line_number":237,"context_line":"                    LOG.info(\u0027Tried to execute %(command)s, agent is still \u0027"},{"line_number":238,"context_line":"                             \u0027executing %(last)s\u0027, {\u0027command\u0027: command_name,"},{"line_number":239,"context_line":"                                                    \u0027last\u0027: last_command})"},{"line_number":240,"context_line":"                    raise errors.CommandExecutionError(\u0027agent is busy\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_2a7db16c","line":237,"updated":"2015-07-29 07:49:08.000000000","message":"this should be error, as you report an error to a caller","commit_id":"59281ecda8df5bf44c06e9edbc70e9cbfe061052"}],"ironic_python_agent/extensions/clean.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b3f59b10df69f740639e299e67c9e5dd5339c93d","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    if clean_version !\u003d agent_version:"},{"line_number":92,"context_line":"        LOG.warning(\u0027Mismatched clean versions. Agent version: %(agent), \u0027"},{"line_number":93,"context_line":"                    \u0027node version: %(node)\u0027, {\u0027agent\u0027: agent_version,"},{"line_number":94,"context_line":"                                              \u0027node\u0027: clean_version})"},{"line_number":95,"context_line":"        raise errors.CleanVersionMismatch(agent_version\u003dagent_version,"},{"line_number":96,"context_line":"                                          node_version\u003dclean_version)"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_b5a495b9","line":94,"updated":"2015-06-10 18:01:54.000000000","message":"Probably log.error here no?","commit_id":"3a6c9d16c38475a5b6de7c48a76bee104bac1020"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"c9fd3a6661e4de73b7fbd23dc93aed5e512641ff","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    if clean_version !\u003d agent_version:"},{"line_number":92,"context_line":"        LOG.warning(\u0027Mismatched clean versions. Agent version: %(agent), \u0027"},{"line_number":93,"context_line":"                    \u0027node version: %(node)\u0027, {\u0027agent\u0027: agent_version,"},{"line_number":94,"context_line":"                                              \u0027node\u0027: clean_version})"},{"line_number":95,"context_line":"        raise errors.CleanVersionMismatch(agent_version\u003dagent_version,"},{"line_number":96,"context_line":"                                          node_version\u003dclean_version)"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_b5bff55f","line":94,"in_reply_to":"3afb71cf_b5a495b9","updated":"2015-06-10 18:19:52.000000000","message":"It\u0027s not really an error. It\u0027s basically, \"Hey! We deployed a new agent while you were cleaning!\" and Ironic handles it gracefully by regenerating the list of clean steps and starting from the beginning.","commit_id":"3a6c9d16c38475a5b6de7c48a76bee104bac1020"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b1a11ed3ac66654207d27c7ce1cfeaee6dbf6843","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        :returns: A list of clean steps with keys step, priority, and"},{"line_number":33,"context_line":"            reboot_requested"},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        LOG.info(\u0027Getting clean steps\u0027)"},{"line_number":36,"context_line":"        # Results should be a dict, not a list"},{"line_number":37,"context_line":"        steps \u003d hardware.dispatch_to_all_managers(\u0027get_clean_steps\u0027,"},{"line_number":38,"context_line":"                                                  node, ports)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af86dd1_aa02b53c","line":35,"updated":"2015-06-12 11:52:37.000000000","message":"I would call it LOG.debug, as it does not mean any change","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b9126540574e1d913c57c03305eaec6f9a7f8752","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        :returns: A list of clean steps with keys step, priority, and"},{"line_number":33,"context_line":"            reboot_requested"},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        LOG.info(\u0027Getting clean steps\u0027)"},{"line_number":36,"context_line":"        # Results should be a dict, not a list"},{"line_number":37,"context_line":"        steps \u003d hardware.dispatch_to_all_managers(\u0027get_clean_steps\u0027,"},{"line_number":38,"context_line":"                                                  node, ports)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af86dd1_63f9a2c8","line":35,"updated":"2015-06-11 21:40:42.000000000","message":"is it useful to log the node \u0026 ports?","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"e7abfdd557044bba842f0ca7154ec7ea6f46bb6a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        :returns: A list of clean steps with keys step, priority, and"},{"line_number":33,"context_line":"            reboot_requested"},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        LOG.info(\u0027Getting clean steps\u0027)"},{"line_number":36,"context_line":"        # Results should be a dict, not a list"},{"line_number":37,"context_line":"        steps \u003d hardware.dispatch_to_all_managers(\u0027get_clean_steps\u0027,"},{"line_number":38,"context_line":"                                                  node, ports)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_e299777a","line":35,"in_reply_to":"1af86dd1_63f9a2c8","updated":"2015-07-28 00:59:41.000000000","message":"Done","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"e7abfdd557044bba842f0ca7154ec7ea6f46bb6a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        :returns: A list of clean steps with keys step, priority, and"},{"line_number":33,"context_line":"            reboot_requested"},{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        LOG.info(\u0027Getting clean steps\u0027)"},{"line_number":36,"context_line":"        # Results should be a dict, not a list"},{"line_number":37,"context_line":"        steps \u003d hardware.dispatch_to_all_managers(\u0027get_clean_steps\u0027,"},{"line_number":38,"context_line":"                                                  node, ports)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_8290b344","line":35,"in_reply_to":"1af86dd1_aa02b53c","updated":"2015-07-28 00:59:41.000000000","message":"Done","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b1a11ed3ac66654207d27c7ce1cfeaee6dbf6843","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        steps \u003d hardware.dispatch_to_all_managers(\u0027get_clean_steps\u0027,"},{"line_number":38,"context_line":"                                                  node, ports)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        LOG.info(\u0027Clean steps: %s\u0027, steps)"},{"line_number":41,"context_line":"        return {"},{"line_number":42,"context_line":"            \u0027clean_steps\u0027: steps,"},{"line_number":43,"context_line":"            \u0027hardware_manager_version\u0027: _get_current_clean_version()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af86dd1_8afff933","line":40,"updated":"2015-06-12 11:52:37.000000000","message":"ditto","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"e7abfdd557044bba842f0ca7154ec7ea6f46bb6a","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        steps \u003d hardware.dispatch_to_all_managers(\u0027get_clean_steps\u0027,"},{"line_number":38,"context_line":"                                                  node, ports)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        LOG.info(\u0027Clean steps: %s\u0027, steps)"},{"line_number":41,"context_line":"        return {"},{"line_number":42,"context_line":"            \u0027clean_steps\u0027: steps,"},{"line_number":43,"context_line":"            \u0027hardware_manager_version\u0027: _get_current_clean_version()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_a295af33","line":40,"in_reply_to":"1af86dd1_8afff933","updated":"2015-07-28 00:59:41.000000000","message":"Done","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b9126540574e1d913c57c03305eaec6f9a7f8752","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            LOG.exception(msg)"},{"line_number":74,"context_line":"            raise errors.CleaningError(msg)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        LOG.info(\u0027Clean step completed: %s\u0027, step)"},{"line_number":77,"context_line":"        # Return the step that was executed so we can dispatch"},{"line_number":78,"context_line":"        # to the appropriate Ironic interface"},{"line_number":79,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af86dd1_c38cd637","line":76,"updated":"2015-06-11 21:40:42.000000000","message":"don\u0027t know if you want to log the result too","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"e7abfdd557044bba842f0ca7154ec7ea6f46bb6a","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            LOG.exception(msg)"},{"line_number":74,"context_line":"            raise errors.CleaningError(msg)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        LOG.info(\u0027Clean step completed: %s\u0027, step)"},{"line_number":77,"context_line":"        # Return the step that was executed so we can dispatch"},{"line_number":78,"context_line":"        # to the appropriate Ironic interface"},{"line_number":79,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_a2e36fd8","line":76,"in_reply_to":"1af86dd1_c38cd637","updated":"2015-07-28 00:59:41.000000000","message":"More logging is always better!","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cb9d6ff273f4cd3be237c8d6ab00fadc54dd4106","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            the step returns."},{"line_number":60,"context_line":"        \"\"\""},{"line_number":61,"context_line":"        # Ensure the agent is still the same version, or raise an exception"},{"line_number":62,"context_line":"        LOG.info(\u0027Executing clean step %s\u0027, step)"},{"line_number":63,"context_line":"        _check_clean_version(clean_version)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        if \u0027step\u0027 not in step:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_ca98cdc2","line":62,"updated":"2015-07-29 07:49:08.000000000","message":"ditto about executing being debug log","commit_id":"59281ecda8df5bf44c06e9edbc70e9cbfe061052"}],"ironic_python_agent/extensions/standby.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b3f59b10df69f740639e299e67c9e5dd5339c93d","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            self.cached_image_id \u003d image_info[\u0027id\u0027]"},{"line_number":222,"context_line":"            result_msg \u003d \u0027image ({0}) cached to device {1}\u0027"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        LOG.info(result_msg.format(image_info[\u0027id\u0027], device))"},{"line_number":225,"context_line":"        return result_msg.format(image_info[\u0027id\u0027], device)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    @base.async_command(\u0027prepare_image\u0027, _validate_image_info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_15a24999","line":224,"updated":"2015-06-10 18:01:54.000000000","message":"I think this should be at info level, and the others in this method as debug. Logging guidelines basically say one INFO log for each action completed.","commit_id":"3a6c9d16c38475a5b6de7c48a76bee104bac1020"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"c9fd3a6661e4de73b7fbd23dc93aed5e512641ff","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            self.cached_image_id \u003d image_info[\u0027id\u0027]"},{"line_number":222,"context_line":"            result_msg \u003d \u0027image ({0}) cached to device {1}\u0027"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        LOG.info(result_msg.format(image_info[\u0027id\u0027], device))"},{"line_number":225,"context_line":"        return result_msg.format(image_info[\u0027id\u0027], device)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    @base.async_command(\u0027prepare_image\u0027, _validate_image_info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_f5a9ed24","line":224,"in_reply_to":"3afb71cf_15a24999","updated":"2015-06-10 18:19:52.000000000","message":"Gotcha.","commit_id":"3a6c9d16c38475a5b6de7c48a76bee104bac1020"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b3f59b10df69f740639e299e67c9e5dd5339c93d","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        msg \u003d (\u0027image ({0}) written to device {1}\u0027.format("},{"line_number":246,"context_line":"            image_info[\u0027id\u0027], device))"},{"line_number":247,"context_line":"        LOG.info(msg)"},{"line_number":248,"context_line":"        return msg"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    @base.async_command(\u0027run_image\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_95bcf9bb","line":247,"updated":"2015-06-10 18:01:54.000000000","message":"Ditto.","commit_id":"3a6c9d16c38475a5b6de7c48a76bee104bac1020"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"c9fd3a6661e4de73b7fbd23dc93aed5e512641ff","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        msg \u003d (\u0027image ({0}) written to device {1}\u0027.format("},{"line_number":246,"context_line":"            image_info[\u0027id\u0027], device))"},{"line_number":247,"context_line":"        LOG.info(msg)"},{"line_number":248,"context_line":"        return msg"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    @base.async_command(\u0027run_image\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_d5527134","line":247,"in_reply_to":"3afb71cf_95bcf9bb","updated":"2015-06-10 18:19:52.000000000","message":"Done","commit_id":"3a6c9d16c38475a5b6de7c48a76bee104bac1020"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b9126540574e1d913c57c03305eaec6f9a7f8752","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            self.cached_image_id \u003d image_info[\u0027id\u0027]"},{"line_number":222,"context_line":"            result_msg \u003d \u0027image ({0}) cached to device {1}\u0027"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        LOG.info(result_msg.format(image_info[\u0027id\u0027], device))"},{"line_number":225,"context_line":"        return result_msg.format(image_info[\u0027id\u0027], device)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    @base.async_command(\u0027prepare_image\u0027, _validate_image_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af86dd1_c32f36f5","line":224,"updated":"2015-06-11 21:40:42.000000000","message":"most times, log level will be \u0027info\u0027. So might be worth doing msg \u003d result_msg.format(...) first, instead of generating the string twice.","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"e7abfdd557044bba842f0ca7154ec7ea6f46bb6a","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            self.cached_image_id \u003d image_info[\u0027id\u0027]"},{"line_number":222,"context_line":"            result_msg \u003d \u0027image ({0}) cached to device {1}\u0027"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        LOG.info(result_msg.format(image_info[\u0027id\u0027], device))"},{"line_number":225,"context_line":"        return result_msg.format(image_info[\u0027id\u0027], device)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    @base.async_command(\u0027prepare_image\u0027, _validate_image_info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_c246bbbf","line":224,"in_reply_to":"1af86dd1_c32f36f5","updated":"2015-07-28 00:59:41.000000000","message":"I\u0027m not sure it\u0027ll matter, as both of these calls are taking probably minutes. But done (I apparently already did it below).","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"}],"ironic_python_agent/hardware.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b3f59b10df69f740639e299e67c9e5dd5339c93d","unresolved":false,"context_lines":[{"line_number":612,"context_line":"                          .format(manager, method))"},{"line_number":613,"context_line":"                continue"},{"line_number":614,"context_line":"            except Exception as e:"},{"line_number":615,"context_line":"                LOG.exception(\u0027Dispatch to all managers exception: %s\u0027, e)"},{"line_number":616,"context_line":"                raise"},{"line_number":617,"context_line":"            responses[manager.__class__.__name__] \u003d response"},{"line_number":618,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_d5bef1ac","line":615,"updated":"2015-06-10 18:01:54.000000000","message":"Maybe better written as \"Unexpected error dispatching %(method)s to manager %(manager)s: %(e)s\"","commit_id":"3a6c9d16c38475a5b6de7c48a76bee104bac1020"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"c9fd3a6661e4de73b7fbd23dc93aed5e512641ff","unresolved":false,"context_lines":[{"line_number":612,"context_line":"                          .format(manager, method))"},{"line_number":613,"context_line":"                continue"},{"line_number":614,"context_line":"            except Exception as e:"},{"line_number":615,"context_line":"                LOG.exception(\u0027Dispatch to all managers exception: %s\u0027, e)"},{"line_number":616,"context_line":"                raise"},{"line_number":617,"context_line":"            responses[manager.__class__.__name__] \u003d response"},{"line_number":618,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_98055012","line":615,"in_reply_to":"3afb71cf_d5bef1ac","updated":"2015-06-10 18:19:52.000000000","message":"Done","commit_id":"3a6c9d16c38475a5b6de7c48a76bee104bac1020"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b9126540574e1d913c57c03305eaec6f9a7f8752","unresolved":false,"context_lines":[{"line_number":615,"context_line":"                LOG.exception(\u0027Unexpected error dispatching %(method)s to \u0027"},{"line_number":616,"context_line":"                              \u0027manager %(manager)s: %(e)s\u0027,"},{"line_number":617,"context_line":"                              {\u0027method\u0027: method, \u0027manager\u0027: manager, \u0027e\u0027: e})"},{"line_number":618,"context_line":"                raise"},{"line_number":619,"context_line":"            responses[manager.__class__.__name__] \u003d response"},{"line_number":620,"context_line":"        else:"},{"line_number":621,"context_line":"            LOG.debug(\u0027HardwareManager {0} does not have method {1}\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af86dd1_e64c8078","line":618,"updated":"2015-06-11 21:40:42.000000000","message":"you might want to think about using oslo_utils.excutils.save_and_reraise_exception() for this[1].\n\n[1] https://github.com/openstack/oslo.utils/blob/master/oslo_utils/excutils.py#L64","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"e7abfdd557044bba842f0ca7154ec7ea6f46bb6a","unresolved":false,"context_lines":[{"line_number":615,"context_line":"                LOG.exception(\u0027Unexpected error dispatching %(method)s to \u0027"},{"line_number":616,"context_line":"                              \u0027manager %(manager)s: %(e)s\u0027,"},{"line_number":617,"context_line":"                              {\u0027method\u0027: method, \u0027manager\u0027: manager, \u0027e\u0027: e})"},{"line_number":618,"context_line":"                raise"},{"line_number":619,"context_line":"            responses[manager.__class__.__name__] \u003d response"},{"line_number":620,"context_line":"        else:"},{"line_number":621,"context_line":"            LOG.debug(\u0027HardwareManager {0} does not have method {1}\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_225d1f47","line":618,"in_reply_to":"1af86dd1_e64c8078","updated":"2015-07-28 00:59:41.000000000","message":"We\u0027re not running in a greenthread here and that log line shouldn\u0027t raise a new exception (LOG seems to swallow exceptions pretty happily).","commit_id":"b24b64b4aef69ce3e2a832d5a6a17faef8743fb0"}]}
