)]}'
{"ironic/common/exception.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"f4930f2c02a57fc73c70ba2bdc50abb50b9cc96e","unresolved":false,"context_lines":[{"line_number":698,"context_line":"    _msg_fmt \u003d _(\"OneView exception occurred. Error: %(error)s\")"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":""},{"line_number":701,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":702,"context_line":"class OneViewInvalidNodeParameter(OneViewError):"},{"line_number":703,"context_line":"    _msg_fmt \u003d _(\"Error while obtaining OneView info from node %(node_uuid)s. \""},{"line_number":704,"context_line":"                 \"Error: %(error)s\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_2f4a77ab","line":701,"updated":"2017-10-06 20:21:24.000000000","message":"This needs to be removed","commit_id":"d3980ae51d220d3449f158fa6484c3be00732b9c"}],"ironic/drivers/modules/agent_client.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8ba175e329f96da3918afcbbe99bdf77ec7c5a1b","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                   \u0027error\u0027: result.get(\u0027command_error\u0027),"},{"line_number":94,"context_line":"                   \u0027code\u0027: response.status_code})"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        if response.status_code \u003e\u003d http_client.BAD_REQUEST:"},{"line_number":97,"context_line":"            raise AgentAPIError(node\u003dnode.uuid, status\u003dresponse.status_code,"},{"line_number":98,"context_line":"                                error\u003dresult.get(\u0027faultstring\u0027))"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_10a569b4","line":96,"updated":"2016-02-02 11:39:14.000000000","message":"maybe we need logging here?","commit_id":"d268203cec5f75dbc66ada4f3268002ab8bb8682"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8ba175e329f96da3918afcbbe99bdf77ec7c5a1b","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                   \u0027code\u0027: response.status_code})"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        if response.status_code \u003e\u003d http_client.BAD_REQUEST:"},{"line_number":97,"context_line":"            raise AgentAPIError(node\u003dnode.uuid, status\u003dresponse.status_code,"},{"line_number":98,"context_line":"                                error\u003dresult.get(\u0027faultstring\u0027))"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_b0a9f592","line":97,"updated":"2016-02-02 11:39:14.000000000","message":"+1","commit_id":"d268203cec5f75dbc66ada4f3268002ab8bb8682"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"4247ed8ab8856d54cc9e66b65c89867a9650c6ef","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                   \u0027code\u0027: response.status_code})"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        if response.status_code \u003e\u003d http_client.BAD_REQUEST:"},{"line_number":97,"context_line":"            raise AgentAPIError(node\u003dnode.uuid, status\u003dresponse.status_code,"},{"line_number":98,"context_line":"                                error\u003dresult.get(\u0027faultstring\u0027))"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a68dd71_fc3f43d4","line":97,"range":{"start_line":97,"start_character":18,"end_line":97,"end_character":31},"updated":"2016-01-20 16:33:11.000000000","message":"s/AgentAPIError/ exception.AgentAPIError","commit_id":"d268203cec5f75dbc66ada4f3268002ab8bb8682"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"63b589a55e0eb86e385a58d50088ac7ed861b5f1","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            LOG.info(\u0027Agent command %(method)s for node %(node)s failed \u0027"},{"line_number":98,"context_line":"                     \u0027expected 2xx HTTP status code, got %(code)d.\u0027,"},{"line_number":99,"context_line":"                     {\u0027method\u0027: method, \u0027node\u0027: node.uuid,"},{"line_number":100,"context_line":"                      \u0027code\u0027: response.status_code})"},{"line_number":101,"context_line":"            raise exception.AgentAPIError(node\u003dnode.uuid,"},{"line_number":102,"context_line":"                                          status\u003dresponse.status_code,"},{"line_number":103,"context_line":"                                          error\u003dresult.get(\u0027faultstring\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_80661a4f","line":100,"updated":"2016-02-08 10:19:56.000000000","message":"Shouldn\u0027t we include the actual error as part of this log message?\n\nAlso, I\u0027m not convinced that \"info\" is the right log level for this, as the message itself mentions a failure it feels like that it should be an \"error\" or \"warning\".","commit_id":"0e0e5b805cf37b793cb33f25739a39f84474bbff"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"401dcad83be817a45be8d92e702cf1665cdbb719","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            LOG.info(\u0027Agent command %(method)s for node %(node)s failed \u0027"},{"line_number":98,"context_line":"                     \u0027expected 2xx HTTP status code, got %(code)d.\u0027,"},{"line_number":99,"context_line":"                     {\u0027method\u0027: method, \u0027node\u0027: node.uuid,"},{"line_number":100,"context_line":"                      \u0027code\u0027: response.status_code})"},{"line_number":101,"context_line":"            raise exception.AgentAPIError(node\u003dnode.uuid,"},{"line_number":102,"context_line":"                                          status\u003dresponse.status_code,"},{"line_number":103,"context_line":"                                          error\u003dresult.get(\u0027faultstring\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_9e497f33","line":100,"in_reply_to":"5a5ae5dd_80661a4f","updated":"2016-02-08 19:44:42.000000000","message":"The actual error /is/ the wrong HTTP status code, and the full thing should  be logged when we throw the exception below.\n\nThe reason I don\u0027t make this WARN or higher is because this should be an expected error we handle. A single HTTP query failing isn\u0027t reason to throw a WARN/ERROR log, although I could see the argument that it is until we properly retry. IDK.","commit_id":"0e0e5b805cf37b793cb33f25739a39f84474bbff"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"63b589a55e0eb86e385a58d50088ac7ed861b5f1","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            raise exception.AgentAPIError(node\u003dnode.uuid,"},{"line_number":102,"context_line":"                                          status\u003dresponse.status_code,"},{"line_number":103,"context_line":"                                          error\u003dresult.get(\u0027faultstring\u0027))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return result"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def get_commands_status(self, node):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_74288333","line":104,"updated":"2016-02-08 10:19:56.000000000","message":"I wonder also if places calling commands should handle this exception to fail gracefully, e.g:\n\nhttps://github.com/openstack/ironic/blob/master/ironic/drivers/modules/iscsi_deploy.py#L441-L447\n\nI think that we should handle this exception there and fail correctly, because most of the place prior to this code didn\u0027t except an exception, but it expected the status of the command to be \"FAILED\" (since the code in IPA would be handling the exception for us already)","commit_id":"0e0e5b805cf37b793cb33f25739a39f84474bbff"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"401dcad83be817a45be8d92e702cf1665cdbb719","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            raise exception.AgentAPIError(node\u003dnode.uuid,"},{"line_number":102,"context_line":"                                          status\u003dresponse.status_code,"},{"line_number":103,"context_line":"                                          error\u003dresult.get(\u0027faultstring\u0027))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return result"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def get_commands_status(self, node):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_b807ae16","line":104,"in_reply_to":"5a5ae5dd_74288333","updated":"2016-02-08 19:44:42.000000000","message":"The failure case we\u0027re fixing here is even more insidious: in cases where this failed, nothing would happen. The node would be \"stuck\" forever in deploying or cleaning state until something was done to restart it.\n\nI agree the calling functions should handle this better generally, but raising any exception at all is better than existing behavior.","commit_id":"0e0e5b805cf37b793cb33f25739a39f84474bbff"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"04dcc7c7639ffc8db9128ffd8ddb78966048cfac","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                   \u0027code\u0027: response.status_code})"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if response.status_code \u003e\u003d http_client.BAD_REQUEST:"},{"line_number":96,"context_line":"            LOG.info(\u0027Agent command %(method)s for node %(node)s failed \u0027"},{"line_number":97,"context_line":"                     \u0027expected 2xx HTTP status code, got %(code)d.\u0027,"},{"line_number":98,"context_line":"                     {\u0027method\u0027: method, \u0027node\u0027: node.uuid,"},{"line_number":99,"context_line":"                      \u0027code\u0027: response.status_code})"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f4b6375_ea3843d5","line":96,"updated":"2017-11-08 10:24:51.000000000","message":"as it\u0027s a failure, please s/info/error/","commit_id":"d067fbdc8281fbe7f6861829dfdd3c67f03ca450"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c5c868f94213679722423a141ac36464ca9fa2e4","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            LOG.error(msg)"},{"line_number":72,"context_line":"            raise exception.IronicException(msg)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        # TODO(russellhaering): real error handling"},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            result \u003d response.json()"},{"line_number":77,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_c83d01c5","line":74,"updated":"2017-11-15 22:47:21.000000000","message":"is this patch addressing this, or only part of it ? :)","commit_id":"22ea3fb3b72b614bb1a052a04b5cf5a5359b5b40"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c5c868f94213679722423a141ac36464ca9fa2e4","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                   \u0027code\u0027: response.status_code})"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if response.status_code \u003e\u003d http_client.BAD_REQUEST:"},{"line_number":96,"context_line":"            LOG.error(\u0027Agent command %(method)s for node %(node)s failed \u0027"},{"line_number":97,"context_line":"                      \u0027expected 2xx HTTP status code, got %(code)d.\u0027,"},{"line_number":98,"context_line":"                      {\u0027method\u0027: method, \u0027node\u0027: node.uuid,"},{"line_number":99,"context_line":"                       \u0027code\u0027: response.status_code})"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_085559fa","line":96,"updated":"2017-11-15 22:47:21.000000000","message":"maybe s/failed/failed;/\n\nsome punctuation is needed otherwise the two lines are not correct grammatically.","commit_id":"22ea3fb3b72b614bb1a052a04b5cf5a5359b5b40"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8f95f8e62a29f23d6261a908053423f635410d53","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                   \u0027code\u0027: response.status_code})"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if response.status_code \u003e\u003d http_client.BAD_REQUEST:"},{"line_number":96,"context_line":"            LOG.error(\u0027Agent command %(method)s for node %(node)s failed \u0027"},{"line_number":97,"context_line":"                      \u0027expected 2xx HTTP status code, got %(code)d.\u0027,"},{"line_number":98,"context_line":"                      {\u0027method\u0027: method, \u0027node\u0027: node.uuid,"},{"line_number":99,"context_line":"                       \u0027code\u0027: response.status_code})"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_46755963","line":96,"in_reply_to":"1f485f77_085559fa","updated":"2017-11-17 04:53:14.000000000","message":"+1","commit_id":"22ea3fb3b72b614bb1a052a04b5cf5a5359b5b40"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1900a3276215eda440fe64dbd4dcfb2675541a50","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                   \u0027code\u0027: response.status_code})"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if response.status_code \u003e\u003d http_client.BAD_REQUEST:"},{"line_number":96,"context_line":"            LOG.error(\u0027Agent command %(method)s for node %(node)s failed \u0027"},{"line_number":97,"context_line":"                      \u0027expected 2xx HTTP status code, got %(code)d.\u0027,"},{"line_number":98,"context_line":"                      {\u0027method\u0027: method, \u0027node\u0027: node.uuid,"},{"line_number":99,"context_line":"                       \u0027code\u0027: response.status_code})"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_a505b27c","line":96,"in_reply_to":"1f485f77_46755963","updated":"2017-11-20 20:23:07.000000000","message":"followup patch to address this: https://review.openstack.org/521649","commit_id":"22ea3fb3b72b614bb1a052a04b5cf5a5359b5b40"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c5c868f94213679722423a141ac36464ca9fa2e4","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if response.status_code \u003e\u003d http_client.BAD_REQUEST:"},{"line_number":96,"context_line":"            LOG.error(\u0027Agent command %(method)s for node %(node)s failed \u0027"},{"line_number":97,"context_line":"                      \u0027expected 2xx HTTP status code, got %(code)d.\u0027,"},{"line_number":98,"context_line":"                      {\u0027method\u0027: method, \u0027node\u0027: node.uuid,"},{"line_number":99,"context_line":"                       \u0027code\u0027: response.status_code})"},{"line_number":100,"context_line":"            raise exception.AgentAPIError(node\u003dnode.uuid,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_685e0d13","line":97,"updated":"2017-11-15 22:47:21.000000000","message":"i guess we\u0027re assuming the agent will never return 3xx status codes. This is fine, i\u0027m just commenting :)","commit_id":"22ea3fb3b72b614bb1a052a04b5cf5a5359b5b40"}],"ironic/tests/unit/drivers/modules/test_agent_client.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c5c868f94213679722423a141ac36464ca9fa2e4","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        url \u003d self.client._get_command_url(self.node)"},{"line_number":144,"context_line":"        body \u003d self.client._get_command_body(method, params)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        self.assertRaises(exception.AgentAPIError,"},{"line_number":147,"context_line":"                          self.client._command,"},{"line_number":148,"context_line":"                          self.node, method, params)"},{"line_number":149,"context_line":"        self.client.session.post.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_885269dd","line":146,"updated":"2017-11-15 22:47:21.000000000","message":"since we\u0027re not asserting/checking the actual exception string, could you confirm that you looked at the string and it is OK?","commit_id":"22ea3fb3b72b614bb1a052a04b5cf5a5359b5b40"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1900a3276215eda440fe64dbd4dcfb2675541a50","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        url \u003d self.client._get_command_url(self.node)"},{"line_number":144,"context_line":"        body \u003d self.client._get_command_body(method, params)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        self.assertRaises(exception.AgentAPIError,"},{"line_number":147,"context_line":"                          self.client._command,"},{"line_number":148,"context_line":"                          self.node, method, params)"},{"line_number":149,"context_line":"        self.client.session.post.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":8,"id":"ff82abbf_c57a3687","line":146,"in_reply_to":"1f485f77_885269dd","updated":"2017-11-20 20:23:07.000000000","message":"No one confirmed, so I looked. The exception that was raised: \n\n Agent API for node uuid returned status 400 with error you dun goofd","commit_id":"22ea3fb3b72b614bb1a052a04b5cf5a5359b5b40"}],"releasenotes/notes/add-agent-api-error-77ec6c272390c488.yaml":[{"author":{"_account_id":11297,"name":"Nisha Agarwal","email":"agarwalnisha1980@gmail.com","username":"Nisha"},"change_message_id":"5ac3ca4a913b7d3ad96afb0b16958881ed2ff0f9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Adds an AgentAPIError exception class, and raises it when the IPA returns"},{"line_number":4,"context_line":"    a 400 status code or higher when issuing a command."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5f4e5783_677a4189","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":9},"updated":"2017-10-10 08:50:17.000000000","message":"Should it be features or fix? It looks to be a bug.","commit_id":"27ad321b0a95a3b85c1f0aa3f36f108a31ba8bd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"04dcc7c7639ffc8db9128ffd8ddb78966048cfac","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - Adds an AgentAPIError exception class, and raises it when the IPA returns"},{"line_number":4,"context_line":"    a 400 status code or higher when issuing a command."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3f4b6375_ca3587dd","line":4,"updated":"2017-11-08 10:24:51.000000000","message":"I think this should be reworded from user\u0027s point of view. Something like\n\n - Fixes propagation of HTTP errors from **ironic-python-agent** commands. Now an operation is aborted on receiving HTTP error status from the ramdisk.","commit_id":"d067fbdc8281fbe7f6861829dfdd3c67f03ca450"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c5c868f94213679722423a141ac36464ca9fa2e4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - Fixes propagation of HTTP errors from **ironic-python-agent** commands. Now"},{"line_number":4,"context_line":"    an operation is aborted on receiving HTTP error status from the ramdisk."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"1f485f77_48beb1d5","line":4,"updated":"2017-11-15 22:47:21.000000000","message":"I see that Dmitry suggested this, so I won\u0027t comment :D","commit_id":"22ea3fb3b72b614bb1a052a04b5cf5a5359b5b40"}]}
