shell-local provisioner in packer version 1.2.5

82 views
Skip to first unread message

Scott M

unread,
Aug 16, 2018, 10:03:53 AM8/16/18
to Packer
In packer versions before 1.2.4, I was able to do the following provisioner and have it work on both Windows and Linux:

  "provisioners": [
   {
      "type": "shell-local",
      "command": "chef install chefstuff.rb"
   }

 In newer packer versions, I get packer-shell395903719' is not recognized as an internal or external command
 
 In packer version 1.2.5, I have not been able to come up with a solution that will work on both Windows and Linux.
 
 Any ideas?

Megan Marsh

unread,
Aug 16, 2018, 5:11:09 PM8/16/18
to packe...@googlegroups.com
I don't think we made any changes to the shell-local provisioner between 1.2.4 and 1.2.5, but we did make a lot of changes to the provisioner in v1.2.4.  The docs for how to run it on windows vs. linux are here: https://www.packer.io/docs/provisioners/shell-local.html

I don't think I can help more specifically without a bigger chunk of the logs to look at.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/8344ca8a-6dd7-4ccf-a57a-bef9419cb792%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott M

unread,
Aug 17, 2018, 9:21:50 AM8/17/18
to Packer
Let me clarify, the packer change happened with version 1.2.4, in packer version 1.2.3, I could run the above provisioner on both Window 10 and Linux as is.  In Packer version 1.2.4, I would need to modify it to get it working on Windows 10, I only needed one packer json file for running on both Linux and Windows 10 in version 1.2.3  Now, it seems like I need one for Windows 10 and one for Linux

Megan Marsh

unread,
Aug 17, 2018, 2:39:18 PM8/17/18
to packe...@googlegroups.com
Yes, I understand. I'm sorry for this regression, but before this refactor, the vast majority of shell-local cases on windows didn't work, period. It's basically dumb luck that it worked for you at all. 

On windows 10, I assume you were using the Windows Linux Subsystem?  

That said, I have an idea for how I can make this usable for you in a future release -- can you open a bug report on Packer's github with steps to reproduce, information about how you were running this on Windows, and full debug output?

Aaron Job

unread,
Aug 20, 2018, 11:21:20 PM8/20/18
to Packer
Hello,

I am experiencing this issue also. Windows 10 not using the Windows Linux Subsystem.

Any thoughts regarding a workaround?

Thanks

Megan Marsh

unread,
Aug 21, 2018, 4:59:31 PM8/21/18
to packe...@googlegroups.com
Open a bug report with steps to reproduce. Any workaround is going to be very specific.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.

Aaron Job

unread,
Aug 24, 2018, 1:17:53 AM8/24/18
to Packer


On Wednesday, August 22, 2018 at 6:59:31 AM UTC+10, Megan Marsh wrote:
Open a bug report with steps to reproduce. Any workaround is going to be very specific.
On Mon, Aug 20, 2018 at 8:21 PM, Aaron Job <Aa...@gravypower.net> wrote:
Hello,

I am experiencing this issue also. Windows 10 not using the Windows Linux Subsystem.

Any thoughts regarding a workaround?

Thanks


On Saturday, August 18, 2018 at 4:39:18 AM UTC+10, Megan Marsh wrote:
Yes, I understand. I'm sorry for this regression, but before this refactor, the vast majority of shell-local cases on windows didn't work, period. It's basically dumb luck that it worked for you at all. 

On windows 10, I assume you were using the Windows Linux Subsystem?  

That said, I have an idea for how I can make this usable for you in a future release -- can you open a bug report on Packer's github with steps to reproduce, information about how you were running this on Windows, and full debug output?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.

Megan Marsh

unread,
Aug 24, 2018, 12:55:46 PM8/24/18
to packe...@googlegroups.com
Scott -- can you take a look at the issue https://github.com/hashicorp/packer/issues/6620 and it's associated PR and build? I think the PR linked there will also solve your problem. 

Scott M

unread,
Aug 27, 2018, 5:51:39 AM8/27/18
to Packer
yes, that resolved the issue. Thanks
Reply all
Reply to author
Forward
0 new messages