)]}'
{"specs/ocata/approved/mistral-multi-region-support.rst":[{"author":{"_account_id":9432,"name":"Dmitri Zimine","email":"dz@stackstorm.com","username":"dzimine"},"change_message_id":"4dbb7587994f1e179213a6135ec4af3d4587018a","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Launchpad blueprint:"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"https://blueprints.launchpad.net/mistral/+spec/mistral-multi-region-support"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This blueprint intends to support specifying OpenStack context (e.g. region"},{"line_number":16,"context_line":"name) in Mistral workflow definition, so that authorized user could run"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a3c09a3_a7cdad32","line":13,"updated":"2017-01-18 02:50:49.000000000","message":"I find this name confusing: if we want Mistral to support multi-region, it would be making engine and executors region-aware.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cc0446525e99d5303644442c07f93a83ff89e52b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_4751090e","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"updated":"2017-01-10 05:27:20.000000000","message":"I think \u0027openstack_context\u0027 should not be a first-class citizen of Mistral workflow language (DSL) since Mistral can be used w/o OpenStack.\n\nLet me think a little bit and come back..","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":9432,"name":"Dmitri Zimine","email":"dz@stackstorm.com","username":"dzimine"},"change_message_id":"4dbb7587994f1e179213a6135ec4af3d4587018a","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a3c09a3_82bfbf5f","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"in_reply_to":"9a57fde8_873cec30","updated":"2017-01-18 02:50:49.000000000","message":"I like Moshe’s option to provide default workflow context, and override it at task level.\n\nBut looks like it won’t help in this case, as the ‘region’ is an action invocation parameter (action input). See Renat’s reply: it’s just a pass-through to openstack actions, with no impact on the way engine/executor operate.\n\nFrom the use cases, you\u0027re looking for convenient way to pass specific parameters to a class of action, at workflow invocation level (execution create), or action invocation level (task).\n\nLingxian\u0027s last point on using param seems the best to me.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"ab2523bf03355dc61c35ed2a15ab8237fb12aa5a","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a57fde8_873cec30","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"in_reply_to":"9a57fde8_bb8e7225","updated":"2017-01-12 14:20:14.000000000","message":"I also like what Moshe is proposing.\n\n@Renat, I\u0027m not sure if giving actions access to workflow context (or any part of it) is a good idea. Can\u0027t it just be passed along with other parameters?","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7bc3150843c206067331755cbf11f53e11747153","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a57fde8_bb8e7225","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"in_reply_to":"9a57fde8_f8e720aa","updated":"2017-01-12 11:20:09.000000000","message":"Yes, Moshe\u0027s proposal looks good to me.\n\nThe only thing that\u0027s missing in order to implement it is that actions can\u0027t directly access workflow context (WF input + published variables). Actions are basically functions with certain signatures. There are two additional things to that though: environments (and action defaults mentioned by Winson) and accessing security context by OpenStack actions. The latter fact, honestly, is a little bit unfair and is a driver for the whole different activity that we call \"Actions API\".\n\nSo, what I have in mind regarding this is something like: what if we could configure specific actions to be able to take some required information from WF context (or maybe WF environment?)? A pseudo code could look like this:\n\n@required_in_wf_context(\"openstack_context\")\nclass NovaAction(...):\n    def __init__(openstack_context, server_name, ...)\n        self.region \u003d openstack_context[\u0027region_name\u0027]\n\nIn a similar way, we could teach Amazon EC2 related actions what they expect to have in WF context.\n\nThe point I\u0027m making: this way we don\u0027t have to have any hardcoded \"if\" statements in Mistral code base itself to define what variables from WF context will be used by actions. This will be a part of action implementations.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":9432,"name":"Dmitri Zimine","email":"dz@stackstorm.com","username":"dzimine"},"change_message_id":"369489e4e15124dee875107991b8afe24b2c23cd","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_321f7309","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"in_reply_to":"ba5201f7_07dcf671","updated":"2017-01-11 23:04:57.000000000","message":"Which abstraction the `region` property belongs to? \nIs the `region` only a pass-through to OpenStack actions?\nOr we want to make Mistral itself region-aware, and use ‘region’ to instruct an engine to schedule task on executors in a given region? Let’s use “std.ssh” task as an example: how the region applies to it, and what are the expectations from workflow service?  Please clarify, it’d help me cast an educated opinion :)","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"f9025eae6be53e732edbd13ee53e70433f3184bd","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_849a08c4","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"in_reply_to":"ba5201f7_4751090e","updated":"2017-01-10 08:37:20.000000000","message":"I was just wondering if we can make \u0027openstack_context\u0027 just a regular input parameter. Kind of a reserved parameter. \"reserved\" in a sense that some actions will know about it. \u0027openstack_context\u0027 could simply be part of workflow context along with other data.\n\nI think it would work OK except we need a mechanism to override its values per concrete task. This is now missing. A generic alternative solution for this missing piece could be just an ability to redefine certain context values per task. \n\nThe full example illustrating my thoughts:\n\nmy_wf:\n  input:\n    - openstack_context:\n         region_name: region1\n\n  tasks:\n    task1:\n      action: nova.servers_list\n      override:\n        openstack_context:\n          region_name: region2\n\nAlternatives for \"override\":\n\noverride-context\nwith-variables\nwith-context\ntweak-context\nredefine-context\n\n\nWhat do you think guys?\n\nAgain, the reason I\u0027m so picky about it is because it\u0027s a language, we need to consider all pros and cons of proposed changes and introduce them in a generic form.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"00a6d56b2c0dea78563436121eb322018dfa4ad6","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_8c9bad17","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"in_reply_to":"ba5201f7_5707c91c","updated":"2017-01-11 21:23:32.000000000","message":"So how come openstack context has to be passed at runtime as part of the workflow execution instance and not as part of the workflow definition at design time? By restricting region at design time, the workflow becomes less reusable. \n\n\nSince the mistral workflow language is currently intended to be used apart from openstack, i don\u0027t prefer hard coding any language elements to be provider specific.\n\n\nAs the openstack region information is only relevant to openstack actions, can they be passed as input parameters via the environment.  We allow default action parameters in the environment to be passed at runtime (i.e. https://github.com/openstack/mistral/blob/master/mistral/engine/tasks.py#L238) Have you considered that?","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"227ef0b7a5a669d9dbb00985368a31f30272d7c3","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a57fde8_f8e720aa","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"in_reply_to":"ba5201f7_8248ca5d","updated":"2017-01-12 11:06:56.000000000","message":"@Winson\n\n\u003e\u003e \"Since the mistral workflow language is currently intended to be used apart from openstack, i don\u0027t prefer hard coding any language elements to be provider specific.\"\n\nThat\u0027s exactly what I\u0027m fighting for. Imagine if we, for example, want to add actions for EC2 (IMO, very much likely use case), it\u0027d be awkward if we again had to change our language.\n\n\u003e\u003e \"can they be passed as input parameters via the environment.  We allow default action parameters in the environment to be passed at runtime (i.e. https://github.com/openstack/mistral/blob/master/mistral/engine/tasks.py#L238) Have you considered that?\"\n\nVery good point, it\u0027s worth considering it.\n\n@Dmitri\n\n\u003e\u003e \"Which abstraction the `region` property belongs to?\"\n\nEssentially, it\u0027s part of authentication information like user and password. More specifically, it needs to be passed to Keystone.\n\n\u003e\u003e \"Is the `region` only a pass-through to OpenStack actions?\"\n\nYes, exactly.\n\n\u003e\u003e \"Or we want to make Mistral itself region-aware, and use ‘region’ to instruct an engine to schedule task on executors in a given region? Let’s use “std.ssh” task as an example: how the region applies to it, and what are the expectations from workflow service?  Please clarify, it’d help me cast an educated opinion :)\"\n\nNo, this is much more forward looking use case. At the moment, we\u0027re not considering it. Only for OpenStack actions.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"f83e2b1baca0556e0cefef2f98f43b65ff2570fe","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_5707c91c","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"in_reply_to":"ba5201f7_849a08c4","updated":"2017-01-10 22:07:15.000000000","message":"Actually, \u0027openstack-context\u0027 is not first-class citizen of Mistral workflow. When I first implemented this, the word in my mind was \u0027context\u0027, but it\u0027s not appropriate since only openstack-related information is contained in that context, so I changed to \u0027openstack-context\u0027. By saying it\u0027s not first-class, I mean, it\u0027s not like positional param of function, it\u0027s up to the user to decide if he want to define \u0027openstack-context\u0027 in the workflow. Apparently, if the workflow is designed for openstack world, then it\u0027s much more helpful to use \u0027openstack-context\u0027.\n\nThe changes you suggested does make sense, but it will make thing much more complex and will bring confusion to users. Not sure if it\u0027s a better way.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":9029,"name":"Moshe Elisha","email":"moshe.elisha@nokia.com","username":"MosheElisha"},"change_message_id":"c6745ba1e63157476b8236c742853752781e9846","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a57fde8_58ce6c5b","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"in_reply_to":"ba5201f7_849a08c4","updated":"2017-01-12 11:03:29.000000000","message":"I like this idea because it is more generic and not OpenStack specific.\n\n\nThe thing I would change is how a default context is passed to the tasks. I don\u0027t use workflow inputs for that.\nMy suggestion is:\n\n\nmy_wf:\n  input:\n    - my_region_name: region1\n\n  task-defaults:\n    with-context:\n      openstack_context:\n        region_name: \u003c% $.my_region_name %\u003e\n\n  tasks:\n    task1:\n      action: nova.servers_list\n      with-context:\n        openstack_context:\n          region_name: region2 # override the default\n\n    task2:\n      action: nova.servers_list\n      # This will use the context from the task-defaults\n\n\"with-context\" sounds best to me.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"611fcd8b1bc690f609bc5fcc104f4f649b510513","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_8248ca5d","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"in_reply_to":"ba5201f7_8c9bad17","updated":"2017-01-12 03:32:37.000000000","message":"Hi, Winson, you remind me something, let me dig first before I change the idea, thanks!","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"28d86b65f7ce9a7330212ae3a19d765866f6681f","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    version: \u00272.0\u0027"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    wf:"},{"line_number":51,"context_line":"      openstack_context:"},{"line_number":52,"context_line":"        region_name: region_1"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"      tasks:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_07dcf671","line":51,"range":{"start_line":51,"start_character":6,"end_line":51,"end_character":23},"in_reply_to":"ba5201f7_8c9bad17","updated":"2017-01-11 21:25:02.000000000","message":"Sorry I meant...\n\nHow come openstack context has to be passed at design time as part of the workflow definition?  Why can\u0027t it be passed at runtime as part of the workflow execution? By restricting region at design time, the workflow becomes less reusable.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cc0446525e99d5303644442c07f93a83ff89e52b","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    wf:"},{"line_number":66,"context_line":"      tasks:"},{"line_number":67,"context_line":"        get_servers:"},{"line_number":68,"context_line":"          openstack_context:"},{"line_number":69,"context_line":"            region_name: region_2"},{"line_number":70,"context_line":"          action: nova.servers_list"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_e74afd54","line":68,"range":{"start_line":68,"start_character":10,"end_line":68,"end_character":27},"updated":"2017-01-10 05:27:20.000000000","message":"Same thing here, although I have to admit that it\u0027s not clear to me now how to do it in a different way.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"227ef0b7a5a669d9dbb00985368a31f30272d7c3","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    wf:"},{"line_number":66,"context_line":"      tasks:"},{"line_number":67,"context_line":"        get_servers:"},{"line_number":68,"context_line":"          openstack_context:"},{"line_number":69,"context_line":"            region_name: region_2"},{"line_number":70,"context_line":"          action: nova.servers_list"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_1ee39106","line":68,"range":{"start_line":68,"start_character":10,"end_line":68,"end_character":27},"in_reply_to":"ba5201f7_e74afd54","updated":"2017-01-12 11:06:56.000000000","message":"Done","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"f42ffeb980b1cddc01808cdf486028f0aec08269","unresolved":false,"context_lines":[{"line_number":96,"context_line":"6. OpenStack service endpoints will be retrieved from Keystone according to"},{"line_number":97,"context_line":"   region name."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"7. If region name is specified in sub-workflow task, it will take effect no"},{"line_number":100,"context_line":"   matter how region name is defined in the sub-workflow specification."},{"line_number":101,"context_line":"   Suppose we have a workbook defined as below::"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"      ---"},{"line_number":104,"context_line":"      version: \u00272.0\u0027"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_1e3827d3","line":101,"range":{"start_line":99,"start_character":2,"end_line":101,"end_character":48},"updated":"2017-01-02 13:50:21.000000000","message":"I\u0027m not sure if this is good approach. Every workflow may become a sub-workflow, even if it wasn\u0027t intended to be one. Taking this, I think it may not be a good idea to change the context from outside of the workflow.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cc0446525e99d5303644442c07f93a83ff89e52b","unresolved":false,"context_lines":[{"line_number":96,"context_line":"6. OpenStack service endpoints will be retrieved from Keystone according to"},{"line_number":97,"context_line":"   region name."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"7. If region name is specified in sub-workflow task, it will take effect no"},{"line_number":100,"context_line":"   matter how region name is defined in the sub-workflow specification."},{"line_number":101,"context_line":"   Suppose we have a workbook defined as below::"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"      ---"},{"line_number":104,"context_line":"      version: \u00272.0\u0027"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_47082992","line":101,"range":{"start_line":99,"start_character":2,"end_line":101,"end_character":48},"in_reply_to":"ba5201f7_132f51f7","updated":"2017-01-10 05:27:20.000000000","message":"I tend to agree with Lingxian here with one comment: I think talking about sub workflows here is irrelevant. Defining a context in DSL as a default value sounds OK to me but IMO it doesn\u0027t matter if it\u0027s a sub workflow or a regular workflow. Values of this context can always be redefined from outside.\n\n In case of a regular workflow we should be able to pass openstack context values manually either as part of workflow input (my preferred option) or as a separate parameter. Having that said, I\u0027m coming to conclusion that we probably shouldn\u0027t have any special enforcement rules for openstack context. We can simply define context variable values as expressions, something like \"region_name: \u003c% $.region  or \u0027region_1\u0027 %\u003e\". \n\nIn case of a regular workflow \u0027region\u0027 input parameter will taken from the corresponding input parameter. But, if I as a workflow designer want to protect my workflow from changing a region I can just use a constant.\n\nWhat do you think?","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3687e5f5f36e05399d81204e2687ca11085d3c69","unresolved":false,"context_lines":[{"line_number":96,"context_line":"6. OpenStack service endpoints will be retrieved from Keystone according to"},{"line_number":97,"context_line":"   region name."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"7. If region name is specified in sub-workflow task, it will take effect no"},{"line_number":100,"context_line":"   matter how region name is defined in the sub-workflow specification."},{"line_number":101,"context_line":"   Suppose we have a workbook defined as below::"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"      ---"},{"line_number":104,"context_line":"      version: \u00272.0\u0027"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_47533039","line":101,"range":{"start_line":99,"start_character":2,"end_line":101,"end_character":48},"in_reply_to":"ba5201f7_1e3827d3","updated":"2017-01-06 09:31:51.000000000","message":"Why? It\u0027s just like the input which has default value, if not provided, the default value will be used, otherwise, user input will take higher priority. \u0027Every workflow may become a sub-workflow\u0027 is exactly the reason that openstack-context could be defined outside of workflow spec.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"3b7827873c0ef6f7e51cfe1fd6b3e079827bd275","unresolved":false,"context_lines":[{"line_number":96,"context_line":"6. OpenStack service endpoints will be retrieved from Keystone according to"},{"line_number":97,"context_line":"   region name."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"7. If region name is specified in sub-workflow task, it will take effect no"},{"line_number":100,"context_line":"   matter how region name is defined in the sub-workflow specification."},{"line_number":101,"context_line":"   Suppose we have a workbook defined as below::"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"      ---"},{"line_number":104,"context_line":"      version: \u00272.0\u0027"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_d47673d7","line":101,"range":{"start_line":99,"start_character":2,"end_line":101,"end_character":48},"in_reply_to":"ba5201f7_47082992","updated":"2017-01-10 11:51:19.000000000","message":"If we decided that context is something that can be changed from any place, then I\u0027m OK with proposed change.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"2a300b2de94a773df7249a9a085ec2fe8c056682","unresolved":false,"context_lines":[{"line_number":96,"context_line":"6. OpenStack service endpoints will be retrieved from Keystone according to"},{"line_number":97,"context_line":"   region name."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"7. If region name is specified in sub-workflow task, it will take effect no"},{"line_number":100,"context_line":"   matter how region name is defined in the sub-workflow specification."},{"line_number":101,"context_line":"   Suppose we have a workbook defined as below::"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"      ---"},{"line_number":104,"context_line":"      version: \u00272.0\u0027"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_bfeca32a","line":101,"range":{"start_line":99,"start_character":2,"end_line":101,"end_character":48},"in_reply_to":"ba5201f7_47533039","updated":"2017-01-09 11:19:42.000000000","message":"What I meant is that some workflows may be designed to work only in given openstack_context and therefore it should not be changed from outside of it.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"0ca8fa4d7f349438370d08032fec8e116e66944f","unresolved":false,"context_lines":[{"line_number":96,"context_line":"6. OpenStack service endpoints will be retrieved from Keystone according to"},{"line_number":97,"context_line":"   region name."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"7. If region name is specified in sub-workflow task, it will take effect no"},{"line_number":100,"context_line":"   matter how region name is defined in the sub-workflow specification."},{"line_number":101,"context_line":"   Suppose we have a workbook defined as below::"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"      ---"},{"line_number":104,"context_line":"      version: \u00272.0\u0027"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_132f51f7","line":101,"range":{"start_line":99,"start_character":2,"end_line":101,"end_character":48},"in_reply_to":"ba5201f7_bfeca32a","updated":"2017-01-09 20:18:50.000000000","message":"That\u0027s ok I think, it\u0027s up to workflow designer to decide if the workflow should be executed in particular region, workflow owner can leave some message in workflow description, denoting the workflow can only be running in particular region. BTW, mistral doesn\u0027t support pinning workflow to some region before, adding this feature isn\u0027t meant to break that. We can\u0027t restrain if workflow could be used as sub-workflow or not.","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cc0446525e99d5303644442c07f93a83ff89e52b","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    {"},{"line_number":148,"context_line":"        \u0027workflow_name\u0027: \u0027my_wf\u0027,"},{"line_number":149,"context_line":"        \u0027description\u0027: \u0027Running workflow with openstack context\u0027,"},{"line_number":150,"context_line":"        \u0027params\u0027:{"},{"line_number":151,"context_line":"            \u0027openstack_context\u0027: {"},{"line_number":152,"context_line":"                \u0027region_name\u0027: \u0027region_1\u0027"},{"line_number":153,"context_line":"            }"},{"line_number":154,"context_line":"        }"},{"line_number":155,"context_line":"    }"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"End user impact"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5201f7_074b81b1","line":154,"range":{"start_line":150,"start_character":8,"end_line":154,"end_character":9},"updated":"2017-01-10 05:27:20.000000000","message":"See my previous comment. Do you think it should be part of \"params\"? Why not just pass openstack context as part of workflow input?","commit_id":"2d1ce50d0f8a701b84e28656a8edbeeed6e03e89"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7007fcac296a6b31c0c340b604984ccccc2065db","unresolved":false,"context_lines":[{"line_number":43,"context_line":"The whole idea is to re-use \u0027params\u0027 parameter of creating execution."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"According to current Mistral design, user could pass anything to \u0027params\u0027"},{"line_number":46,"context_line":"when creating execution, Mistral itself will also use \u0027params\u0027 to pass some"},{"line_number":47,"context_line":"information to be used for internal purpose, e.g. \u0027task_execution_id\u0027,"},{"line_number":48,"context_line":"\u0027index\u0027, etc. Users could pass environment variables or the target task name"},{"line_number":49,"context_line":"when dealing with reverse workflows."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Since openstack context is a runtime thing when running workflow, so \u0027params\u0027"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5a3905b3_2a128f09","line":48,"range":{"start_line":46,"start_character":25,"end_line":48,"end_character":13},"updated":"2017-01-23 08:20:05.000000000","message":"Although this is not so important in the context of this spec this info is not quite accurate. Mistral doesn\u0027t use \u0027params\u0027 to pass \u0027task_execution_id\u0027 etc., they are passed to actions via \u0027action_context\u0027.","commit_id":"4b2fc0dc4994f86949a504bae16b11e529de5a4b"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"2bcbc2b0467c28e31e8ef4dbc3b667c96c731168","unresolved":false,"context_lines":[{"line_number":43,"context_line":"The whole idea is to re-use \u0027params\u0027 parameter of creating execution."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"According to current Mistral design, user could pass anything to \u0027params\u0027"},{"line_number":46,"context_line":"when creating execution, Mistral itself will also use \u0027params\u0027 to pass some"},{"line_number":47,"context_line":"information to be used for internal purpose, e.g. \u0027task_execution_id\u0027,"},{"line_number":48,"context_line":"\u0027index\u0027, etc. Users could pass environment variables or the target task name"},{"line_number":49,"context_line":"when dealing with reverse workflows."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Since openstack context is a runtime thing when running workflow, so \u0027params\u0027"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3a461143_e02f153c","line":48,"range":{"start_line":46,"start_character":25,"end_line":48,"end_character":13},"in_reply_to":"5a3905b3_2a128f09","updated":"2017-01-27 01:27:58.000000000","message":"When running sub-workflow, task handler will create sub-workflow with some information in params, please see https://github.com/openstack/mistral/blob/master/mistral/engine/actions.py#L468","commit_id":"4b2fc0dc4994f86949a504bae16b11e529de5a4b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7007fcac296a6b31c0c340b604984ccccc2065db","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"},{"line_number":77,"context_line":"                \"openstack\": {"},{"line_number":78,"context_line":"                  \"region_name\": \"regionThree\""},{"line_number":79,"context_line":"                }"},{"line_number":80,"context_line":"              }"},{"line_number":81,"context_line":"            }"},{"line_number":82,"context_line":"          }"},{"line_number":83,"context_line":"        }"},{"line_number":84,"context_line":"      }"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5a3905b3_aad67fee","line":81,"range":{"start_line":73,"start_character":12,"end_line":81,"end_character":13},"updated":"2017-01-23 08:20:05.000000000","message":"Just thinking loudly..\n\n1. Under \"task_context\" we have task names as keys, under \"action_context\" we don\u0027t have action names as keys.\n2. Under \"task_context\" you specify just \"openstack\" w/o enclosing \"action_context\" although, in fact, this also applies to actions.\n\nNot sure these are real problems, but please comment.","commit_id":"4b2fc0dc4994f86949a504bae16b11e529de5a4b"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"2bcbc2b0467c28e31e8ef4dbc3b667c96c731168","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"},{"line_number":77,"context_line":"                \"openstack\": {"},{"line_number":78,"context_line":"                  \"region_name\": \"regionThree\""},{"line_number":79,"context_line":"                }"},{"line_number":80,"context_line":"              }"},{"line_number":81,"context_line":"            }"},{"line_number":82,"context_line":"          }"},{"line_number":83,"context_line":"        }"},{"line_number":84,"context_line":"      }"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3a461143_e092b54a","line":81,"range":{"start_line":73,"start_character":12,"end_line":81,"end_character":13},"in_reply_to":"5a3905b3_aad67fee","updated":"2017-01-27 01:27:58.000000000","message":"I was thinking the same when I was writing, but didn\u0027t find a better way. For \u0027action_context\u0027, it just like a common thing for all the actions in a workflow, for \u0027task_context\u0027, of course, it\u0027s task specific. \n\n\u0027action_context\u0027 was contained in \u0027task_context\u0027 initially, but I removed that to make the structure simple (too many nested things). \n\nHowever, if we prefer making things detailed, I can add it back.","commit_id":"4b2fc0dc4994f86949a504bae16b11e529de5a4b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7007fcac296a6b31c0c340b604984ccccc2065db","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        }"},{"line_number":84,"context_line":"      }"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"3. The region configuration in workflow takes precedence over the"},{"line_number":87,"context_line":"   \u0027os-region-name\u0027 specified when using CLI."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"4. The region configuration in task takes precedence over that defined in"},{"line_number":90,"context_line":"   workflow."}],"source_content_type":"text/x-rst","patch_set":2,"id":"5a3905b3_1556d8cd","line":87,"range":{"start_line":86,"start_character":3,"end_line":87,"end_character":45},"updated":"2017-01-23 08:20:05.000000000","message":"I don\u0027t understand this phrase. What do you mean by \"in workflow\"? Maybe it\u0027s the obsolete thing from the previous design where we wanted to change DSL?","commit_id":"4b2fc0dc4994f86949a504bae16b11e529de5a4b"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"2bcbc2b0467c28e31e8ef4dbc3b667c96c731168","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        }"},{"line_number":84,"context_line":"      }"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"3. The region configuration in workflow takes precedence over the"},{"line_number":87,"context_line":"   \u0027os-region-name\u0027 specified when using CLI."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"4. The region configuration in task takes precedence over that defined in"},{"line_number":90,"context_line":"   workflow."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3a461143_e0b9d5cc","line":87,"range":{"start_line":86,"start_character":3,"end_line":87,"end_character":45},"in_reply_to":"5a3905b3_1556d8cd","updated":"2017-01-27 01:27:58.000000000","message":"should be \u0027The region configuration when running workflow\u0027, will fix in next patchset.","commit_id":"4b2fc0dc4994f86949a504bae16b11e529de5a4b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7007fcac296a6b31c0c340b604984ccccc2065db","unresolved":false,"context_lines":[{"line_number":86,"context_line":"3. The region configuration in workflow takes precedence over the"},{"line_number":87,"context_line":"   \u0027os-region-name\u0027 specified when using CLI."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"4. The region configuration in task takes precedence over that defined in"},{"line_number":90,"context_line":"   workflow."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"5. The openstack context thing will be passed to sub-workflow also via"},{"line_number":93,"context_line":"   \u0027params\u0027 if it\u0027s specified for parent workflow. The only constraint now"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5a3905b3_f5322ca6","line":90,"range":{"start_line":89,"start_character":71,"end_line":90,"end_character":11},"updated":"2017-01-23 08:20:05.000000000","message":"Same question.","commit_id":"4b2fc0dc4994f86949a504bae16b11e529de5a4b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"7007fcac296a6b31c0c340b604984ccccc2065db","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"5. The openstack context thing will be passed to sub-workflow also via"},{"line_number":93,"context_line":"   \u0027params\u0027 if it\u0027s specified for parent workflow. The only constraint now"},{"line_number":94,"context_line":"   is, in the sub-workflow, there is no way to specify different regions for"},{"line_number":95,"context_line":"   different tasks."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Alternatives"},{"line_number":98,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5a3905b3_f58eac2c","line":95,"range":{"start_line":94,"start_character":7,"end_line":95,"end_character":19},"updated":"2017-01-23 08:20:05.000000000","message":"Practically we can do it. When using \u0027workflow\u0027 instead of \u0027action\u0027 we can also pass \u0027params\u0027 in \u0027input\u0027 sections along with input itself. But, of course, parent workflow needs to know what to pass.","commit_id":"4b2fc0dc4994f86949a504bae16b11e529de5a4b"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"2bcbc2b0467c28e31e8ef4dbc3b667c96c731168","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"5. The openstack context thing will be passed to sub-workflow also via"},{"line_number":93,"context_line":"   \u0027params\u0027 if it\u0027s specified for parent workflow. The only constraint now"},{"line_number":94,"context_line":"   is, in the sub-workflow, there is no way to specify different regions for"},{"line_number":95,"context_line":"   different tasks."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Alternatives"},{"line_number":98,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3a461143_13ce39b4","line":95,"range":{"start_line":94,"start_character":7,"end_line":95,"end_character":19},"in_reply_to":"5a3905b3_f58eac2c","updated":"2017-01-27 01:27:58.000000000","message":"For sub-workflow, if we want to run different tasks in different regions, we have to define the region in workflow spec, which is not what we want according to previous discussion. So, to make things simple, it\u0027s not supported.\n\nActually, when user really use sub-workflow in a multi-region deployment, I believe it\u0027s a good design practise to run a sub-workflow in only one region.","commit_id":"4b2fc0dc4994f86949a504bae16b11e529de5a4b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"b691a30c6b354eacd99ffa8ec03013e1a15c5ebb","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Currently, Mistral end user could specify region name or target region name"},{"line_number":26,"context_line":"when running OpenStack workflow, which means all the tasks inside the workflow"},{"line_number":27,"context_line":"have to be running within that specific region. It\u0027s impossible to run"},{"line_number":28,"context_line":"different tasks in different regions."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Use Cases"},{"line_number":31,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_cf49a390","line":28,"range":{"start_line":27,"start_character":48,"end_line":28,"end_character":37},"updated":"2017-03-17 06:53:52.000000000","message":"If all actions can take the parameter \u0027region\u0027 then it\u0027s not true.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a916954a4284ef64293fd71332a4bcd4a9fcbbd1","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Currently, Mistral end user could specify region name or target region name"},{"line_number":26,"context_line":"when running OpenStack workflow, which means all the tasks inside the workflow"},{"line_number":27,"context_line":"have to be running within that specific region. It\u0027s impossible to run"},{"line_number":28,"context_line":"different tasks in different regions."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Use Cases"},{"line_number":31,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_eeabc472","line":28,"range":{"start_line":27,"start_character":48,"end_line":28,"end_character":37},"in_reply_to":"1a1ced50_2c185c1d","updated":"2017-03-24 05:18:14.000000000","message":"Can you explain why? Is it because of their current implementation or due to more serious reasons? If it\u0027s because of the first then it\u0027s solvable.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"90a6da11b4a0a60d0e7373b77f840cb63ba605e7","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Currently, Mistral end user could specify region name or target region name"},{"line_number":26,"context_line":"when running OpenStack workflow, which means all the tasks inside the workflow"},{"line_number":27,"context_line":"have to be running within that specific region. It\u0027s impossible to run"},{"line_number":28,"context_line":"different tasks in different regions."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Use Cases"},{"line_number":31,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_2c185c1d","line":28,"range":{"start_line":27,"start_character":48,"end_line":28,"end_character":37},"in_reply_to":"1a1ced50_cf49a390","updated":"2017-03-18 11:22:26.000000000","message":"but the truth is, you can not specify \u0027region\u0027 for almost all openstack actions","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"b691a30c6b354eacd99ffa8ec03013e1a15c5ebb","unresolved":false,"context_lines":[{"line_number":30,"context_line":"Use Cases"},{"line_number":31,"context_line":"---------"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"* User with credential in region-1 can specify region-2 for the whole"},{"line_number":34,"context_line":"  workflow."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* User with credential in region-1 can specify different region in different"},{"line_number":37,"context_line":"  tasks."}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_4f5e9346","line":34,"range":{"start_line":33,"start_character":2,"end_line":34,"end_character":10},"updated":"2017-03-17 06:53:52.000000000","message":"Then what credentials will be used for region-2? Please clarify.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a916954a4284ef64293fd71332a4bcd4a9fcbbd1","unresolved":false,"context_lines":[{"line_number":30,"context_line":"Use Cases"},{"line_number":31,"context_line":"---------"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"* User with credential in region-1 can specify region-2 for the whole"},{"line_number":34,"context_line":"  workflow."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* User with credential in region-1 can specify different region in different"},{"line_number":37,"context_line":"  tasks."}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_cea80079","line":34,"range":{"start_line":33,"start_character":2,"end_line":34,"end_character":10},"in_reply_to":"1a1ced50_0cf2c0d2","updated":"2017-03-24 05:18:14.000000000","message":"Yes, true.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"90a6da11b4a0a60d0e7373b77f840cb63ba605e7","unresolved":false,"context_lines":[{"line_number":30,"context_line":"Use Cases"},{"line_number":31,"context_line":"---------"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"* User with credential in region-1 can specify region-2 for the whole"},{"line_number":34,"context_line":"  workflow."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"* User with credential in region-1 can specify different region in different"},{"line_number":37,"context_line":"  tasks."}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_0cf2c0d2","line":34,"range":{"start_line":33,"start_character":2,"end_line":34,"end_character":10},"in_reply_to":"1a1ced50_4f5e9346","updated":"2017-03-18 11:22:26.000000000","message":"Not sure I understand your question, maybe I should add \u0027Keystone is shared between different regions\u0027. Credentials in different regions just have different \u0027OS_REGION_NAME\u0027.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":23271,"name":"Istvan Imre","email":"istvan.imre@nokia.com","username":"istvan.imre"},"change_message_id":"d4fbd817b1b4f0be6e5793150a6ddd998013ab47","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_e2e715e2","line":73,"updated":"2017-01-27 06:04:57.000000000","message":"I think so it is a very bad idea to specify any task name in an execution-create request.\n\nMy opinion is that if you executes a workflow it\u0027s internal tasks shall be black boxed!! So if the implementation of workflow is changed (interface (input-output) stays the same ) the callee shall not notice anything from that!!!","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"90a6da11b4a0a60d0e7373b77f840cb63ba605e7","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_eca00493","line":73,"in_reply_to":"1a1ced50_8ac87976","updated":"2017-03-18 11:22:26.000000000","message":"Renat, if openstack action could support \u0027region\u0027 as parameter out of the box, then the solution should be easy. However, the answer is no. Although we could do hacking in mistral (remove \u0027region\u0027 when doing action input validation and figure out how to tell user \u0027region\u0027 is a supported input param for all openstack actions, etc.), need to discuss if we really want to do it that way.\n\nOne problem my proposal could not solve is how to define region on the fly during the execution (as mentioned in your last example). In this case, we have to define some openstack related stuff in the workflow spec, which was already rejected by most people in my previous patchset.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a916954a4284ef64293fd71332a4bcd4a9fcbbd1","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_0ef6e890","line":73,"in_reply_to":"1a1ced50_eca00493","updated":"2017-03-24 05:18:14.000000000","message":"Ooh, gosh. I really don\u0027t understand why OpenStack actions can\u0027t support region as a param. Please explain it. What is the fundamental problem here that can\u0027t be solved?","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":23271,"name":"Istvan Imre","email":"istvan.imre@nokia.com","username":"istvan.imre"},"change_message_id":"7c736fb9a590b539570c22d0546917b5e5d3cb94","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_3c50e40a","line":73,"in_reply_to":"3a461143_0cb4e532","updated":"2017-01-31 16:33:32.000000000","message":"What do you think could we live with a restriction which allows region (context) change only at sub-wokrflow call?\n\nIf yes than the implementation could be very simple and straight forward and will not break any mistral conception.\n\nExample workflow:\n\ninput:\n  - target_regions: []\ntasks:\n  repeat:\n    with-items: i in \u003c% $.target_regions %\u003e\n    workflow: maintain_region\n    context-patch:\n      openstack: # may we need refactor our context in long term to support multiple clouds.\n        region: \u003c% $.i %\u003e\n\nIn this case target_regions is an ordinary workflow parameter.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"cab54120c565c1a2a0d76f7823e428edbcbc4b98","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_0a7bc97b","line":73,"in_reply_to":"3a461143_0cb4e532","updated":"2017-02-01 01:13:48.000000000","message":"Why we need to execute a workflow as a black-box? What\u0027s the benefit for that?\n\nYes, we have made consensus that won\u0027t include openstack related configuration in workflow definition, so a runtime thing is the only way to do.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"b691a30c6b354eacd99ffa8ec03013e1a15c5ebb","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_b9e5f938","line":73,"in_reply_to":"3a461143_2a5a45f2","updated":"2017-03-17 06:53:52.000000000","message":"Yes, I totally agree with #2. I believe it\u0027s not a solution. A workflow becomes too if complex if it needs to define a separate sub-workflow for lots of individual tasks.\n\nBut that said, I also don\u0027t like the idea to specify regions for each task individually as part of the environment (\u0027env\u0027). I kind of agree with Istvan here.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"cab54120c565c1a2a0d76f7823e428edbcbc4b98","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_2a5a45f2","line":73,"in_reply_to":"3a461143_3c50e40a","updated":"2017-02-01 01:13:48.000000000","message":"1. people are not happy with define openstack things in workflow\n2. think about if i have 10 tasks each of them will call an openstack api, but in different regions, i believe i don\u0027t want to define several different workflows containing just a task in each of them.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":19206,"name":"Dawid Deja","email":"dawdej@gmail.com","username":"ddeja"},"change_message_id":"a8f507833d8eb3413246d283ec7a00df84e81e9a","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_0cb4e532","line":73,"in_reply_to":"3a461143_e2e715e2","updated":"2017-01-31 12:54:03.000000000","message":"It seems like a valid point. But on the previous version of this patch we decided that we don\u0027t want to have information about context inside the workflow definition. By that decision, we broke the black-box.\n\nLingxian, Renat, thoughts on this?","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"8a422fd5dfbeecf37f1b595e42b0ab879baf9ca2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a1ced50_8ac87976","line":73,"in_reply_to":"9a30ddce_b9e5f938","updated":"2017-03-17 07:30:00.000000000","message":"What I\u0027m actually thinking about is: do we really need to have anything special like openstack context set for the entire workflow and/or for individual tasks? I\u0027m probably not convinced on that yet. My suggestion is to step back answer the following questions first:\n\n\n1. Assuming that all OpenStack actions accept \"region\" parameter what else do we need?\n2. Do we need to use \"openstack\" specifically when defining region name or potentially other things related to openstack?\n\n\nMy answers:\n\n\n#1. If we\u0027re trying to address just the impossibility to run different tasks in different regions as stated in the \"Problem description\" section then nothing.\n\nHowever, I think we also need to state that we should be able to simplify workflows by not having to pass \u0027region\u0027 for all individual actions within a workflow and instead just configuring it once either in the environment or somewhere else. And one more thing: we still should be able to configure region for individual actions even if it\u0027s already configured for the entire workflow.\n\n#2. I really don\u0027t see why.\n\n\nExample 1.\n \n replication_wf:\n   input:\n     - source_region: A\n     - dest_region: B\n    \n   tasks:\n     prepare_source:\n       action|workflow: ... region\u003d\u003c% $.source_region %\u003e\n       on-success: replicate\n \n     prepare_dest:\n       action|workflow: ... region\u003d\u003c% $.dest_region %\u003e\n       on-success: replicate\n \n     replicate:\n       join: all\n       action|workflow: ... source_region\u003d\u003c% $.source_region %\u003e dest_region\u003d\u003c% $.dest_region %\u003e\n\n\nIn this example we have defaults region names but if we need we can set different values when providing input. I personally don\u0027t see any issues in this example at all.\n\nExample 2.\n \n provision_user:\n   input:\n     - user\n     - openstack:\n          region: A\n\n   tasks:\n     configure_nova:\n       action|workflow: ... region\u003d\u003c% $.openstack.region %\u003e\n \n     configure_neutron:\n       action|workflow: ... region\u003d\u003c% $.openstack.region %\u003e\n \n     ...\n\nHere we can use some grouping like \"openstack\" simply by defining a workflow input \"openstack\" as a dict. And we can always override it if we need it.\n\nOne issue I see here is that we have to repeat \u0027region\u0027 in every task. However, is it something that we need to address? Is the problem that serious? If we really need to solve it then it seems to be a slightly different topic related to the question \"How do we define default values for action parameters? Per workflow, per sub workflow\".\n\nThe second issue is that we may want to run certain tasks in a different region. For example, \"configure_neutron\" should run in region B. But to me it seems like an aspect related to a specific workflow whose logic needs to take care of this. In our particular example there should be either just another input (e.g. neutron_region) or there could be one extra task before \"configure_neutron\" that publishes a different variable in to the context like this:\n \n determine_neutron_region:\n   action|workflow: ...\n   publish:\n     openstack:\n       region: \u003c% ... %\u003e # determine region name here\n   on-success: configure_neutron\n \n configure_neutron:\n   action|workflow: ... region\u003d\u003c% $.openstack.region %\u003e\n\n\nSo, again, I\u0027m not yet convinced on the idea to manage regions purely on the workflow environment level. I think it purely depends on concrete workflow logic how to define region for specific tasks, and most likely in what regions to call actions will be an important aspect of a workflow rather than just something that we can arbitrarily override by providing different environment variables.\n\nNow I\u0027m ready for tomatoes thrown at me.. (hopefully, not rotten)","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3cf3eda1da550adbca76921b8319fb67a67338aa","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_b082afc7","line":73,"in_reply_to":"ffe62b97_0ef6e890","updated":"2017-03-24 10:41:17.000000000","message":"Hi, Renat, I mean, **BY DEFAULT** openstack actions don\u0027t support region as param. Currently, for an openstack action, the first thing we need to do is to get its params that can be specified in workflow defination, e.g nova.servers_create, mistral will get its params from https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/servers.py#L1302, then record all the things in mistral database. Mistral will validate action input and instantiate action accordingly. Region is not included in any action inputs.\n\nIf we want to support region as action input, we need:\n\n- Insert \u0027region\u0027 to input list after we get params from various service client methods.\n- Use region name to create openstack service client and pop it from input list.\n- Call action method using the remaining inputs.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"e94644a80fb1c445d41b22b406f4491a7c9ba95f","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            }"},{"line_number":71,"context_line":"          },"},{"line_number":72,"context_line":"          \"task_context\": {"},{"line_number":73,"context_line":"            \"task1\": {"},{"line_number":74,"context_line":"              \"openstack\": {"},{"line_number":75,"context_line":"                \"region_name\": \"regionTwo\""},{"line_number":76,"context_line":"              }\"task2\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ffe62b97_6bf9d87e","line":73,"in_reply_to":"ffe62b97_b082afc7","updated":"2017-03-24 11:04:54.000000000","message":"That is totally fine, let\u0027s do this. Of course, it will require some implementation work but conceptually it seems to be the simplest thing we can start with and that is needed for sure. After all, we\u0027re going to rework all openstack actions anyway (for a different reason).","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"},{"author":{"_account_id":23271,"name":"Istvan Imre","email":"istvan.imre@nokia.com","username":"istvan.imre"},"change_message_id":"d4fbd817b1b4f0be6e5793150a6ddd998013ab47","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"This change doesn\u0027t have to influence the data model."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"However, the context information will be stored in workflow"},{"line_number":109,"context_line":"definition (``params`` column) if it\u0027s specified when running the workflow"},{"line_number":110,"context_line":"either via API or sub-workflow."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_a288ad23","line":108,"updated":"2017-01-27 06:04:57.000000000","message":"I have already had a proposal to introduce a customized action context:\nhttps://review.openstack.org/#/c/382782/1/mistral/context.py\n\nMay we could consider to move the existing (target) cloud related headers into body, and use \u0027action_context\u0027 to hold openstack action related stuff, and it could be extended with any hidden parameters for custom actions.\n\nI think now it is a bit bad design that inside the mistral main package we need to list every security parameter for OpenStack actions. If you just thinking about mistral like a generic workflow engine, than OpenStack action pack shall be  only an extension. So in long term it would be nice to move OS actions to a separate pypi package...\n\nIn addition: Currently we have a proprietary action pack, which are needs some hidden authentication parameters to other part of our system, and we use the mentioned user_context (action_context) to pass these parameters to our custom actions.\n\nAnd the action_context may could be changed when you call a sub-workflow.","commit_id":"0414f51ef6262c280addd4a8f34e3efb62514b5b"}],"specs/pike/approved/mistral-multi-region-support.rst":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"86bf3cc7dedc663ec0391024a25b59d475b8bfe8","unresolved":false,"context_lines":[{"line_number":166,"context_line":"Work Items"},{"line_number":167,"context_line":"----------"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"* pass openstack context to actions."},{"line_number":170,"context_line":"* use openstack context in actions."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a1ced50_509aa615","line":169,"updated":"2017-03-17 13:00:48.000000000","message":"The context is being passed to actions as part of the custom action work in mistral-lib already. Is that enough?","commit_id":"89de38887fd1fc134fbf2ed6a838ba3597f11ed4"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"38db0b367c8ff4a2ee6580b5221ed5630a8abb4d","unresolved":false,"context_lines":[{"line_number":166,"context_line":"Work Items"},{"line_number":167,"context_line":"----------"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"* pass openstack context to actions."},{"line_number":170,"context_line":"* use openstack context in actions."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"1a1ced50_4cb678dd","line":169,"in_reply_to":"1a1ced50_509aa615","updated":"2017-03-18 11:23:44.000000000","message":"I need to confirm if they are a same thing :)","commit_id":"89de38887fd1fc134fbf2ed6a838ba3597f11ed4"},{"author":{"_account_id":20863,"name":"Sharat Sharma","email":"sharat.sharma@in.ibm.com","username":"sharat.sharma"},"change_message_id":"233e8b34237bcf3dea389a99d0c7db506301f4f0","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This blueprint intends to support specifying OpenStack context (e.g. region"},{"line_number":16,"context_line":"name) when executing Mistral workflow, so that authorized user could run"},{"line_number":17,"context_line":"OpenStack actions within different OpenStack regions, which is extremely"},{"line_number":18,"context_line":"userful for operators when they want to execute maintainance tasks across"},{"line_number":19,"context_line":"different regions in one workflow."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ffe62b97_167fd067","line":18,"range":{"start_line":18,"start_character":48,"end_line":18,"end_character":60},"updated":"2017-03-27 09:45:36.000000000","message":"\u003d\u003dmaintenance","commit_id":"728ebb0274d2e373fbeed4870051ea543fd9f631"},{"author":{"_account_id":20863,"name":"Sharat Sharma","email":"sharat.sharma@in.ibm.com","username":"sharat.sharma"},"change_message_id":"233e8b34237bcf3dea389a99d0c7db506301f4f0","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This blueprint intends to support specifying OpenStack context (e.g. region"},{"line_number":16,"context_line":"name) when executing Mistral workflow, so that authorized user could run"},{"line_number":17,"context_line":"OpenStack actions within different OpenStack regions, which is extremely"},{"line_number":18,"context_line":"userful for operators when they want to execute maintainance tasks across"},{"line_number":19,"context_line":"different regions in one workflow."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"ffe62b97_56855859","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":7},"updated":"2017-03-27 09:45:36.000000000","message":"\u003d\u003duseful","commit_id":"728ebb0274d2e373fbeed4870051ea543fd9f631"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4c14a3f86722d9e9f9e71683f2d69b7cb12ab7c2","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This blueprint intends to support specifying region name for OpenStack"},{"line_number":16,"context_line":"actions, so that authorized user could run OpenStack actions within different"},{"line_number":17,"context_line":"OpenStack regions in one workflow, which is extremely userful for operators"},{"line_number":18,"context_line":"when they want to execute maintainance tasks across different regions within"},{"line_number":19,"context_line":"one workflow."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"dfeb2761_e1e34233","line":17,"range":{"start_line":17,"start_character":54,"end_line":17,"end_character":61},"updated":"2017-04-05 08:09:28.000000000","message":"useful","commit_id":"ceb0ee5d20af8ee5cb5174390f950f37377b550a"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4c14a3f86722d9e9f9e71683f2d69b7cb12ab7c2","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This blueprint intends to support specifying region name for OpenStack"},{"line_number":16,"context_line":"actions, so that authorized user could run OpenStack actions within different"},{"line_number":17,"context_line":"OpenStack regions in one workflow, which is extremely userful for operators"},{"line_number":18,"context_line":"when they want to execute maintainance tasks across different regions within"},{"line_number":19,"context_line":"one workflow."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"dfeb2761_613e128c","line":18,"range":{"start_line":18,"start_character":26,"end_line":18,"end_character":38},"updated":"2017-04-05 08:09:28.000000000","message":"maintenance","commit_id":"ceb0ee5d20af8ee5cb5174390f950f37377b550a"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4c14a3f86722d9e9f9e71683f2d69b7cb12ab7c2","unresolved":false,"context_lines":[{"line_number":43,"context_line":"The basic idea is simple, support \u0027region\u0027 as an extra input param for all"},{"line_number":44,"context_line":"OpenStack actions."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"1. Add a config option called ``modules_support_region``, the value will be"},{"line_number":47,"context_line":"   list of module names for which the \u0027region\u0027 input param will be add to each"},{"line_number":48,"context_line":"   of its actions. The reason for adding this option is, there may be some"},{"line_number":49,"context_line":"   OpenStack services (e.g. Keystone) already support region(or similar"},{"line_number":50,"context_line":"   concept) in action input params, we should not add a param with same"},{"line_number":51,"context_line":"   meaning, e.g. if Keystone is shared between regions in OpenStack"},{"line_number":52,"context_line":"   deployment, \u0027keystone\u0027 should be excluded from the list."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"2. Insert \u0027region\u0027 as an optional input param when registering OpenStack"},{"line_number":55,"context_line":"   actions."}],"source_content_type":"text/x-rst","patch_set":8,"id":"dfeb2761_41df8e39","line":52,"range":{"start_line":46,"start_character":3,"end_line":52,"end_character":59},"updated":"2017-04-05 08:09:28.000000000","message":"I understand your reasoning, that\u0027s fine. But it seems like it should not be a config option available to users. If something is available to users they can potentially change it, in this case though it doesn\u0027t make any sense because we, as Mistral developers, always know what services support \u0027region\u0027 or not\u0027.\n\nSo I think that should be hidden from users.","commit_id":"ceb0ee5d20af8ee5cb5174390f950f37377b550a"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"cde8c530ed0628b0d779bbefcee487606a551f05","unresolved":false,"context_lines":[{"line_number":43,"context_line":"The basic idea is simple, support \u0027region\u0027 as an extra input param for all"},{"line_number":44,"context_line":"OpenStack actions."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"1. Add a config option called ``modules_support_region``, the value will be"},{"line_number":47,"context_line":"   list of module names for which the \u0027region\u0027 input param will be add to each"},{"line_number":48,"context_line":"   of its actions. The reason for adding this option is, there may be some"},{"line_number":49,"context_line":"   OpenStack services (e.g. Keystone) already support region(or similar"},{"line_number":50,"context_line":"   concept) in action input params, we should not add a param with same"},{"line_number":51,"context_line":"   meaning, e.g. if Keystone is shared between regions in OpenStack"},{"line_number":52,"context_line":"   deployment, \u0027keystone\u0027 should be excluded from the list."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"2. Insert \u0027region\u0027 as an optional input param when registering OpenStack"},{"line_number":55,"context_line":"   actions."}],"source_content_type":"text/x-rst","patch_set":8,"id":"dfeb2761_dbda6276","line":52,"range":{"start_line":46,"start_character":3,"end_line":52,"end_character":59},"in_reply_to":"dfeb2761_41df8e39","updated":"2017-04-05 11:57:50.000000000","message":"The option is actually supposed to be used by mistral deployers rather than end users. Mistral users only can see if \u0027region\u0027 is supported or not via \u0027mistral action-get \u003caction-name\u003e\u0027, if \u0027region\u0027 is in the input list then user knows he can define that in the workflow, otherwise the input validation will fail.\n\nI beleive we only want to add \u0027region\u0027 to the actions which are really need it rather than adding it everywhere, the option provides a chance to filter and bring us flexibility if there are more openstack projects added no matter they support \u0027region\u0027 or not.","commit_id":"ceb0ee5d20af8ee5cb5174390f950f37377b550a"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"873c6552e717f3fe6eabfe4fa4000ca8cdc50aa3","unresolved":false,"context_lines":[{"line_number":49,"context_line":"   OpenStack services (e.g. Keystone) already support region(or similar"},{"line_number":50,"context_line":"   concept) in action input params, we should not add a param with same"},{"line_number":51,"context_line":"   meaning, e.g. if Keystone is shared between regions in OpenStack"},{"line_number":52,"context_line":"   deployment, \u0027keystone\u0027 should be excluded from the list."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"2. Insert \u0027region\u0027 as an optional input param when registering OpenStack"},{"line_number":55,"context_line":"   actions."}],"source_content_type":"text/x-rst","patch_set":8,"id":"bff0334d_a1faf1b9","line":52,"in_reply_to":"dfeb2761_dbda6276","updated":"2017-04-10 08:50:05.000000000","message":"I agree with Renat I think, it seems like a strange config option.","commit_id":"ceb0ee5d20af8ee5cb5174390f950f37377b550a"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"873c6552e717f3fe6eabfe4fa4000ca8cdc50aa3","unresolved":false,"context_lines":[{"line_number":52,"context_line":"   deployment, \u0027keystone\u0027 should be excluded from the list."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"2. Insert \u0027region\u0027 as an optional input param when registering OpenStack"},{"line_number":55,"context_line":"   actions."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Alternatives"},{"line_number":58,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":8,"id":"bff0334d_8b96ee92","line":55,"updated":"2017-04-10 08:50:05.000000000","message":"I have concerns about this.\n\nMany actions accept **kwargs (or **params etc.) (I just tested on my env, 350 accept them, that is around 26%) - so it will be hard for us to determine which actions already use region. I feel like it is a bit of a hack - would it make more sense to have a different way to pass this information to the actions? I don\u0027t have any ideas yet, but I will give it some thought.","commit_id":"ceb0ee5d20af8ee5cb5174390f950f37377b550a"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"cf55f562dc3163ee17a9eca43905009bd98ffe70","unresolved":false,"context_lines":[{"line_number":52,"context_line":"   deployment, \u0027keystone\u0027 should be excluded from the list."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"2. Insert \u0027region\u0027 as an optional input param when registering OpenStack"},{"line_number":55,"context_line":"   actions."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Alternatives"},{"line_number":58,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":8,"id":"bff0334d_5c054a13","line":55,"in_reply_to":"bff0334d_8b96ee92","updated":"2017-04-10 09:32:04.000000000","message":"For now, I think only some keystone related actions may have \u0027region\u0027 as a parameter, in theory, any service that is shared between regions could have \u0027region\u0027 as function param, that\u0027s why I want to add a config option to identify these services manually.\n\nOf all the possible ways I can think of, adding an optional param (\u0027region\u0027) is the easiest and most non-intrusive way to mistral.","commit_id":"ceb0ee5d20af8ee5cb5174390f950f37377b550a"}]}
