When I attempt to run a script on all servers in an environment via the Script Console, if the script fails on one server, it doesn’t even attempt to execute on any remaining servers. I’ve had this occur when one of the tentacle servers is offline or if the script just fails on the server.
Version: 3.2.6
Hi Robert,
Thanks for getting in touch! This is by design. The script console does not behave anyway similar to a deployment - it’s not rolling and any failure will stop the process completely.
It doesn’t do any form of machine online check and assumes that users with access accept the power of what they will be doing.
I do have to ask if a script failed on the first server why would you want it to run on the others?
If you wanted to run a script repeatedly and in a rolling fashion you would need to setup a project. But I don’t think this is behavior we would want to change in the script console.
Sorry if its not the news you were expecting,
Vanessa
We tend to use the Script Module in a few different ways but the manner that raised this issue is when we use it as an “administration console” of sorts. Occasionally we want to run an administrative script against all the servers in an environment. For example, prior to upgrading from Octopus 2.6 to 3.0, I ran a PowerShell script against all servers to determine the OS version. Or when I was working to add an AD group to a local group on all the servers in an environment. In both of these examples, I need the script to execute on all servers and not stop if/when it fails on one.
Hi Robert,
I have a chat to a bunch of people including a customer who heavily uses the script console, and the general consensus was that for a complex script that would be reused and needed a much higher level of control a project would be created, but having the script console simply ‘skip offline machines’ would be really handy and I think would also help in your situation.
So I have created a UserVoice suggestion for this: http://octopusdeploy.uservoice.com/forums/170787-general/suggestions/11374575-skip-offline-machines-feature-for-script-console
Feel free to comment and vote, or even create your own suggestion if it just isn’t enough.
I do still think this has issues, as if you were running something very important, and we skipped some machines, how would you know what machines in the end had the change/update/process run on them if some were skipped?
Vanessa