Provision to disable the workflows from UI/CLI so that ST2 can stop taking actions when we want it to.
There are certain occasions where in we do not want ST2 to take actions on production servers. Tried to find out some options and could see that we can disable the rules individually , but that is something manuall enough that going to every single rule and disabling it. Can we have the provision of disabling a single workflow or all workflows at one go according to our requirement from shell/UI?
You can override pack settings as per the documentation https://docs.stackstorm.com/packs.html#overriding-pack-defaults
Thanks @nzlosh i will take a look into it. But i believe there should be an option on UI as well where a button should be there where in we can go to that particular workflow and and can disable it . Infact additionally there can be an option to select the time period as well till when we want to disable it.
Our main requirement is to stop ST2 from taking actions on some occassions when we have some other parallel activities going on in our environment. So, do we have any option to kind of mute ST2 for sometime?
To restrict an action from running, you could use policies. Today, you'll need one policy per action.
So, you could write a workflow/action that runs on a cron schedule at one time to remove all the policies and at another time to add the policies again.
I have an action that does something similar. To distinguish between the dynamically created policies and policies created via files distributed in a pack, I like to use this convention: __pack_name__ where pack_name contains the action that created the dynamic policies. Look at an older copy of the action here: https://github.com/cognifloyd/st2-pack-lifecycle/blob/main/actions/delay_new_pack_executions.py
Docs about policies here: https://docs.stackstorm.com/reference/policies.html
Thanks @cognifloyd
I will give a try to both the mentioned options, but i still feel the need to have this option available in GUI wherein we can set the time frame for which we want to disable the workflow on demand basis.
Have just thought upon these idea but these are not going to help as i am having a lot of different workflows in place. I would really want this feature where in we can go ahead and disable the workflow entirely for sometime that we want.
Hi @nzlosh
I tried the method that you suggested and created a pack override file but it is not picking up any overrides on reloads .
I created the global file as mentioned in the documentation. https://docs.stackstorm.com/packs.html#overriding-pack-defaults
Hi Team,
Checking on this again. We had an issue where we required to disable a particular workflow and the only option that we could see was to remove the rule.
Can not we have a simple toggle off/on button in UI to accomplish this? This can by default disable the workflow whenever required.
This is the ask for a good to have / require to have feature.
@zsmanjot That's an interesting idea. I think the feature to disable/enable an action/workflow from UI would be helpful. At least there's a meta for it: https://github.com/StackStorm/st2/blob/d374b92f0dbf6b26c5dfdcffd594ecbd0800d635/contrib/examples/actions/orquesta-ask-consecutive.yaml#L4-L6 If you or your team has development cycles to contribute this feature to https://github.com/stackStorm/st2web, - we'll be happy to accept a PR.
StackStorm Open Source community works as a self-service. Orgs who're interested in a particular enhancement usually contribute it upstream. Alternatively, you can collaborate with one of the StackStorm partners (https://stackstorm.com/partners/) who can implement it for you.
Hope that helps. Either way, this would be a nice addition to stackstorm web ui.
Sure @armab
Will follow the next steps ahead after some analysis and discussions. Thanks !