)]}'
{"mistral/api/controllers/v2/action_execution.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"171e6c2c5b0538fa22defa312cced0593efcb6d0","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                \"Please provide at least action name to run action.\""},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            values \u003d rpc.get_engine_client().start_action("},{"line_number":164,"context_line":"                name,"},{"line_number":165,"context_line":"                action_input,"},{"line_number":166,"context_line":"                description\u003ddescription,"},{"line_number":167,"context_line":"                **params"},{"line_number":168,"context_line":"            )"},{"line_number":169,"context_line":"            return resources.ActionExecution.from_dict(values)"},{"line_number":170,"context_line":"        except exc.MistralException as ex:"},{"line_number":171,"context_line":"            if ex.message.startswith(\u0027MessagingTimeout\u0027):"},{"line_number":172,"context_line":"                raise exc.ActionExecuteTimeoutException(action_name\u003dname)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    @rest_utils.wrap_wsme_controller_exception"},{"line_number":175,"context_line":"    @wsme_pecan.wsexpose("}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_9aefd9af","line":172,"range":{"start_line":162,"start_character":8,"end_line":172,"end_character":73},"updated":"2017-10-10 06:55:01.000000000","message":"May be I\u0027m missing something but I disagree with this change. How do we know that this is NOT an issue caused by an infrastructure failure? Testing the message for inclusion of \"MessagingTimeout\" is especially strange. It doesn\u0027t say anything about an action taking too long to complete.","commit_id":"c4a4e7e2631539fc96cb22a2bbe68c4b886cf21f"},{"author":{"_account_id":21479,"name":"int32bit","email":"krystism@gmail.com","username":"int32bit"},"change_message_id":"797d475ad0e00a97e08e476ce171e8bf01a68d1c","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                \"Please provide at least action name to run action.\""},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            values \u003d rpc.get_engine_client().start_action("},{"line_number":164,"context_line":"                name,"},{"line_number":165,"context_line":"                action_input,"},{"line_number":166,"context_line":"                description\u003ddescription,"},{"line_number":167,"context_line":"                **params"},{"line_number":168,"context_line":"            )"},{"line_number":169,"context_line":"            return resources.ActionExecution.from_dict(values)"},{"line_number":170,"context_line":"        except exc.MistralException as ex:"},{"line_number":171,"context_line":"            if ex.message.startswith(\u0027MessagingTimeout\u0027):"},{"line_number":172,"context_line":"                raise exc.ActionExecuteTimeoutException(action_name\u003dname)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    @rest_utils.wrap_wsme_controller_exception"},{"line_number":175,"context_line":"    @wsme_pecan.wsexpose("}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_bb8aed66","line":172,"range":{"start_line":162,"start_character":8,"end_line":172,"end_character":73},"in_reply_to":"5f4e5783_4da1ff93","updated":"2017-10-16 14:34:44.000000000","message":"I admit this is not a good way to solve this issue, but now I have a new idea looks like this:\n\ntry:\n    rpc.get_engine_client().start_action(user_action)\nexcept MistralException:\n    try:\n        rpc.get_engine_client().start_action(test_action)\n    except MistralException:\n        # infrastructure failure\n    # timeout wait for action\n\nThe \u0027test_action\u0027 above can be \u0027std.echo\u0027 or any other system action.\n\nI\u0027m really not sure if this is ok or not,  maybe we need further discussion. If no, we can just abandon this patch.","commit_id":"c4a4e7e2631539fc96cb22a2bbe68c4b886cf21f"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"874b73affbb9988c00c1c848d56cff996c85811a","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                \"Please provide at least action name to run action.\""},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            values \u003d rpc.get_engine_client().start_action("},{"line_number":164,"context_line":"                name,"},{"line_number":165,"context_line":"                action_input,"},{"line_number":166,"context_line":"                description\u003ddescription,"},{"line_number":167,"context_line":"                **params"},{"line_number":168,"context_line":"            )"},{"line_number":169,"context_line":"            return resources.ActionExecution.from_dict(values)"},{"line_number":170,"context_line":"        except exc.MistralException as ex:"},{"line_number":171,"context_line":"            if ex.message.startswith(\u0027MessagingTimeout\u0027):"},{"line_number":172,"context_line":"                raise exc.ActionExecuteTimeoutException(action_name\u003dname)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    @rest_utils.wrap_wsme_controller_exception"},{"line_number":175,"context_line":"    @wsme_pecan.wsexpose("}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_1b7461fd","line":172,"range":{"start_line":162,"start_character":8,"end_line":172,"end_character":73},"in_reply_to":"5f4e5783_7bad9599","updated":"2017-10-16 14:49:53.000000000","message":"int32bit, I highly appreciate your efforts but I think this is not the right way to attack this problem.","commit_id":"c4a4e7e2631539fc96cb22a2bbe68c4b886cf21f"},{"author":{"_account_id":21479,"name":"int32bit","email":"krystism@gmail.com","username":"int32bit"},"change_message_id":"c1f35050e1fc3331c8c14ee7c628a48b2f808f53","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                \"Please provide at least action name to run action.\""},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            values \u003d rpc.get_engine_client().start_action("},{"line_number":164,"context_line":"                name,"},{"line_number":165,"context_line":"                action_input,"},{"line_number":166,"context_line":"                description\u003ddescription,"},{"line_number":167,"context_line":"                **params"},{"line_number":168,"context_line":"            )"},{"line_number":169,"context_line":"            return resources.ActionExecution.from_dict(values)"},{"line_number":170,"context_line":"        except exc.MistralException as ex:"},{"line_number":171,"context_line":"            if ex.message.startswith(\u0027MessagingTimeout\u0027):"},{"line_number":172,"context_line":"                raise exc.ActionExecuteTimeoutException(action_name\u003dname)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    @rest_utils.wrap_wsme_controller_exception"},{"line_number":175,"context_line":"    @wsme_pecan.wsexpose("}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_a455d71f","line":172,"range":{"start_line":162,"start_character":8,"end_line":172,"end_character":73},"in_reply_to":"5f4e5783_9aefd9af","updated":"2017-10-10 08:53:46.000000000","message":"It may be really difficult to identify whether this is an issue caused by an infrastructure failure or timeout issue, because we hardly get any useful info from MistralException. I agree with you that it\u0027s really ugly to rely on message of exception, but it may be only way to narrow issue scope.","commit_id":"c4a4e7e2631539fc96cb22a2bbe68c4b886cf21f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"227230b6a450c99230c33b51482659faaf472a3b","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                \"Please provide at least action name to run action.\""},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            values \u003d rpc.get_engine_client().start_action("},{"line_number":164,"context_line":"                name,"},{"line_number":165,"context_line":"                action_input,"},{"line_number":166,"context_line":"                description\u003ddescription,"},{"line_number":167,"context_line":"                **params"},{"line_number":168,"context_line":"            )"},{"line_number":169,"context_line":"            return resources.ActionExecution.from_dict(values)"},{"line_number":170,"context_line":"        except exc.MistralException as ex:"},{"line_number":171,"context_line":"            if ex.message.startswith(\u0027MessagingTimeout\u0027):"},{"line_number":172,"context_line":"                raise exc.ActionExecuteTimeoutException(action_name\u003dname)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    @rest_utils.wrap_wsme_controller_exception"},{"line_number":175,"context_line":"    @wsme_pecan.wsexpose("}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_4da1ff93","line":172,"range":{"start_line":162,"start_character":8,"end_line":172,"end_character":73},"in_reply_to":"5f4e5783_a455d71f","updated":"2017-10-16 13:36:50.000000000","message":"Maybe the best approach here is to approach oslo.messaging folks and see if they have a recommended way of handling this.","commit_id":"c4a4e7e2631539fc96cb22a2bbe68c4b886cf21f"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"b763f120eb5ef10cad47b39a9e378037fbd41cc8","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                \"Please provide at least action name to run action.\""},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            values \u003d rpc.get_engine_client().start_action("},{"line_number":164,"context_line":"                name,"},{"line_number":165,"context_line":"                action_input,"},{"line_number":166,"context_line":"                description\u003ddescription,"},{"line_number":167,"context_line":"                **params"},{"line_number":168,"context_line":"            )"},{"line_number":169,"context_line":"            return resources.ActionExecution.from_dict(values)"},{"line_number":170,"context_line":"        except exc.MistralException as ex:"},{"line_number":171,"context_line":"            if ex.message.startswith(\u0027MessagingTimeout\u0027):"},{"line_number":172,"context_line":"                raise exc.ActionExecuteTimeoutException(action_name\u003dname)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    @rest_utils.wrap_wsme_controller_exception"},{"line_number":175,"context_line":"    @wsme_pecan.wsexpose("}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_7bad9599","line":172,"range":{"start_line":162,"start_character":8,"end_line":172,"end_character":73},"in_reply_to":"5f4e5783_bb8aed66","updated":"2017-10-16 14:43:45.000000000","message":"I wouldn\u0027t try this because in case of Timeout it may double the length of the call just to identify that there is an infrastructure error. Which may not even be an infrastructure error but another Mistral component is failing or not able to process messages.\n\nIMHO, the RPC story needs to be aligned on the oslo.messaging level. It is not Ok that synchronous calls are simple send and wait for response sequences. For fail-fast behavior it should replicate the \"direct connection\" type of calls. In a distributed system this is not trivial but there are well known patterns that are obviously not implemented in oslo.messaging yet. At least some \"healthchecks\" should be added to ongoing calls. Having bad RPC clearly hinders the HA behavior for all Openstack components.","commit_id":"c4a4e7e2631539fc96cb22a2bbe68c4b886cf21f"}]}
