Jira (BOLT-1429) Inconsistent behavior in Boltspec::Run.run_command on Windows
Title: Message Title Alex Dreyer commented on BOLT-1429 Re: Inconsistent behavior in Boltspec::Run.run_command on Windows It was specifically about saving the runspace between commands on winrm if we're going to on local. If we're not doing that I don't have any concerns. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.314131.1561529132000.76411.1567005480317%40Atlassian.JIRA.
Jira (BOLT-1429) Inconsistent behavior in Boltspec::Run.run_command on Windows
Title: Message Title Glenn Sarti commented on BOLT-1429 Re: Inconsistent behavior in Boltspec::Run.run_command on Windows Yasmin Rajabi I feel it's still important. Having a different shell between local and remote commands is annoying (at best) and confusing. Also adding "powershell.exe -noprofile -NoLogo -ExecutionPolicy Bypass -Command" as a workaround is far from a great UX. Also using -Command has known peculiarities with regards to exit codes, double quoting, multiline commands etc. etc. Using the PowerShell Process sharing gem (which powers the IIS, DSC, DSC_Lite and PowerShell Puppet module) is a much much better idea. Note that while it "shares" the same process, each execution is in it's own sandbox (PowerShell Runspace to be exact) So I think this addresses Alex Dreyer's concern about "state" being left around. As for Alex's comment about "Would that be implemented for winrm too?" I don't understand the question. WinRM is a transport not a shell. What state in WinRM are you worried about? Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.314131.1561529132000.76013.1566961560266%40Atlassian.JIRA.
Jira (BOLT-1429) Inconsistent behavior in Boltspec::Run.run_command on Windows
Title: Message Title Alex Dreyer commented on BOLT-1429 Re: Inconsistent behavior in Boltspec::Run.run_command on Windows Would that be implemented for winrm too? I'm concerned about state being left around in some cases but not others. We also originally had concerns about us not being able to manage that state reliably, Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.314131.1561529132000.75037.1566935940292%40Atlassian.JIRA.
Jira (BOLT-1429) Inconsistent behavior in Boltspec::Run.run_command on Windows
Title: Message Title William Hurt commented on BOLT-1429 Re: Inconsistent behavior in Boltspec::Run.run_command on Windows Yasmin Rajabi I think Michael Lombardi is zeroing in on a ruby gem based solution that you might like. His solution would allow multiple powershell commands in the same run utilizing the same PowerShell process that is kept running between commands so that the process only needs to go through startup once per Bolt startup. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.314131.1561529132000.74891.1566932221023%40Atlassian.JIRA.
Jira (BOLT-1429) Inconsistent behavior in Boltspec::Run.run_command on Windows
Title: Message Title Yasmin Rajabi commented on BOLT-1429 Re: Inconsistent behavior in Boltspec::Run.run_command on Windows Thomas Honey William Hurt Glenn Sarti hey is this something you find important and want to take on? Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.314131.1561529132000.74844.1566931560673%40Atlassian.JIRA.
Jira (BOLT-1429) Inconsistent behavior in Boltspec::Run.run_command on Windows
Title: Message Title Alex Dreyer commented on BOLT-1429 Re: Inconsistent behavior in Boltspec::Run.run_command on Windows This feels like a bug, we should verify in slack that no one is relying on this behavior though. If not I don't think we need to expose a shell-command option yet. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.314131.1561529132000.61802.1561562520484%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (BOLT-1429) Inconsistent behavior in Boltspec::Run.run_command on Windows
Title: Message Title William Hurt commented on BOLT-1429 Re: Inconsistent behavior in Boltspec::Run.run_command on Windows I think I could live with an option like this as long as the powershell command is the default option, with cmd /c configurable as needed for a specific use case. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.314131.1561529132000.61738.1561560420314%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (BOLT-1429) Inconsistent behavior in Boltspec::Run.run_command on Windows
Title: Message Title Cas Donoghue updated an issue Puppet Task Runner / BOLT-1429 Inconsistent behavior in Boltspec::Run.run_command on Windows Change By: Cas Donoghue Sprint: Bolt Ready for Grooming Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.314131.1561529132000.61713.1561560061364%40Atlassian.JIRA. For more options, visit https://groups.google.com/d/optout.
Jira (BOLT-1429) Inconsistent behavior in Boltspec::Run.run_command on Windows
Title: Message Title Cas Donoghue commented on BOLT-1429 Re: Inconsistent behavior in Boltspec::Run.run_command on Windows Perhaps we need an option where this is a setting in the local transport? For example something like config: transport: local local: shell-command: powershell.exe -noprofile -command Similar to what we have done for the docker transport. https://puppet.com/docs/bolt/latest/bolt_configuration_options.html#docker-transport-configuration-options Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Jira (BOLT-1429) Inconsistent behavior in Boltspec::Run.run_command on Windows
Title: Message Title William Hurt updated an issue Puppet Task Runner / BOLT-1429 Inconsistent behavior in Boltspec::Run.run_command on Windows Change By: William Hurt When the WinRM transport is used with the run_command method, Bolt leverages the WinRM gem and deliberately chooses to create a [PowerShell session on the remote host|https://github.com/puppetlabs/bolt/blob/master/lib/bolt/transport/winrm/connection.rb#L54].Using the local_windows transport to execute commands on the local host however is different. A simple [call to Open3.capture3|https://github.com/puppetlabs/bolt/blob/master/lib/bolt/transport/local_windows.rb#L71] is made.The effect on the end user is that the behavior of commands given to run_command is inconsistent.Litmus for instance exposes a method called ` run_shell ` that ends up leveraging ` run_command ` . Users that want to test their module using Litmus would be forced to detect within their test suite which scenario they are in at run time, local or remote, and if local, wrap their own commands in ` ' powershell.exe -noprofile -command #{ < blah }` >' boilerplate on their own.Instead, since the better default choice has already been made for WinRM transport commands, it seems like it could solve the issue closer to the source if the local transport were made to implement it's own wrapper, so that all consumers of the `run_command` method in Bolt spec, whether they be end users or frameworks, could enjoy consistency in the behavior of their commands.As an example of users already affected see [this PR comment|https://github.com/puppetlabs/puppetlabs-dsc/pull/414#discussion_r297455284] in which we are already faced with this difficulty while converting a module's test suite to Litmus. Add Comment
Jira (BOLT-1429) Inconsistent behavior in Boltspec::Run.run_command on Windows
Title: Message Title William Hurt created an issue Puppet Task Runner / BOLT-1429 Inconsistent behavior in Boltspec::Run.run_command on Windows Issue Type: Bug Assignee: Unassigned Components: bolt, Windows Created: 2019/06/25 11:05 PM Labels: bolt windows Priority: Normal Reporter: William Hurt When the WinRM transport is used with the run_command method, Bolt leverages the WinRM gem and deliberately chooses to create a PowerShell session on the remote host. Using the local_windows transport to execute commands on the local host however is different. A simple call to Open3.capture3 is made. The effect on the end user is that the behavior of commands given to run_command is inconsistent. Litmus for instance exposes a method called `run_shell` that ends up leveraging `run_command`. Users that want to test their module using Litmus would be forced to detect within their test suite which scenario they are in at run time, local or remote, and if local, wrap their own commands in `powershell.exe -noprofile -command # {blah} ` boilerplate on their own. Instead, since the better default choice has already been made for WinRM transport commands, it seems like it could solve the issue closer to the source if the local transport were made to implement it's own wrapper, so that all consumers of the `run_command` method in Bolt spec, whether they be end users or frameworks, could enjoy consistency in the behavior of their commands. As an example of users already affected see this PR comment in which we are already faced with this difficulty while converting a module's test suite to Litmus.