[BOLT-234] Avoid sharing runspace across powershell commands Created: 2017/11/22  Updated: 2019/08/26  Resolved: 2019/08/26

Status: Closed
Project: Puppet Task Runner
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: Michael Smith Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: closed-github-move
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relates to BOLT-72 Don't invoke new powershell instances Closed
Team: Bolt
QA Risk Assessment: Needs Assessment


After BOLT-72, variables set when running a script or task over the winrm transport will be preserved across sessions (and expire after some period of no activity). This can lead to some unpredictable behavior, and is inconsistent with how powershell scripts/tasks will be executed via Orchestrator.

Update the winrm transport to use a unique runspace for each script/task.

Comment by Ethan Brown [ 2017/11/22 ]

Some quick notes I had from chat:

[11:58 AM] Ethan J Brown: I think starting with the "don't share state" concept is right.. we just need to make sure "command", "script" and "task" all behave that way
[12:00 PM] Ethan J Brown: and you'll have to make a decision on where that isolation lives or is enforced
[12:01 PM] Ethan J Brown: i.e. does the "node" guarantee it for each "_run_command" / "_run_script" / "_run_task" (which probably makes it easier to understand / test)... or is it guaranteed higher up in the chain?

Comment by Lucy Wyman [ 2019/08/26 ]

This issue was automatically closed when the Bolt team moved to using Github Issues for ticket management (August 2019). If you'd like to reopen the issue or discuss it further please open a github issue at http://github.com/puppetlabs/bolt/issues.

Generated at Tue Jan 28 09:38:18 PST 2020 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.