Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puppet not found on Windows VM when installed from MSI #101

Closed
ringods opened this issue Sep 24, 2013 · 17 comments
Closed

puppet not found on Windows VM when installed from MSI #101

ringods opened this issue Sep 24, 2013 · 17 comments

Comments

@ringods
Copy link

ringods commented Sep 24, 2013

Environment:

  • vagrant 1.3.1
  • vagrant-windows 1.2.1
  • vagrant-librarian-puppet-plugin 0.1.2

I have a Win2008R2 VM with Puppet 3.3.0 installed from the official MSI. When trying to vagrant provision the VM, I get this error:

#< CLIXML
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><S S="Error">The term 'puppet' is not recognized as the name of a cmdlet, function, script f_x000D__x000A_</S><S S="Error">ile, or operable program. Check the spelling of the name, or if a path was incl_x000D__x000A_</S><S S="Error">uded, verify that the path is correct and try again._x000D__x000A_</S><S S="Error">At line:38 char:51_x000D__x000A_</S><S S="Error">+ cd /tmp/vagrant-puppet/manifests; if($?) {  puppet &lt;&lt;&lt;&lt;  apply --modulepath '_x000D__x000A_</S><S S="Error">/ProgramData/PuppetLabs/puppet/etc/modules;/tmp/vagrant-puppet/modules-0' init._x000D__x000A_</S><S S="Error">pp }_x000D__x000A_</S><S S="Error">    + CategoryInfo          : ObjectNotFound: (puppet:String) [], CommandNotFo _x000D__x000A_</S><S S="Error">   undException_x000D__x000A_</S><S S="Error">    + FullyQualifiedErrorId : CommandNotFoundException_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>

The MSI installs the Puppet Agent as a Windows service, but if you want to run it interactively, you have to open a Start Command Prompt with Puppet shell. It starts a shell with the required paths correctly set up. The paths are not added system wide.

@sneal
Copy link
Member

sneal commented Sep 24, 2013

Can you send a gist of your Vagrantfile?

@ferventcoder
Copy link
Contributor

We don't add puppet to the path with the msi installer. I'm not completely
sure why, let me check with @joshcooper.

On Tuesday, September 24, 2013, Shawn Neal wrote:

Can you send a gist of your Vagrantfile?


Reply to this email directly or view it on GitHubhttps://github.com//issues/101#issuecomment-25047497
.


Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@ringods
Copy link
Author

ringods commented Sep 25, 2013

Here is my Vagrantfile:

https://gist.github.com/ringods/6695889

@sneal
Copy link
Member

sneal commented Sep 26, 2013

Vagrant and vagrant-windows make the assumption that "puppet" is in your PATH. We could update vagrant-windows to be more accommodating and default to the default install location, but I'd prefer not to do that until I have the time to rewrite the provisioners to be Windows specific rather than the monkey patches mess they are today.

This has pointed out a bug in the WinRMCommunicator. The execute/sudo method should be throwing an exception when 'which puppet' fails. Currently it only returns an exit status of 1, but the Vagrant puppet provisioner excepts an exception to be thrown. Added #106 for this.

@ferventcoder
Copy link
Contributor

As a link back to track our progress on putting puppet on the PATH - http://projects.puppetlabs.com/issues/22700

This would not apply until the 3.4 release though, so perhaps some support there earlier would be good.

@ferventcoder
Copy link
Contributor

@ringods
Copy link
Author

ringods commented Sep 27, 2013

Rob, thanks a lot for the fully functional workaround!

@sneal
Copy link
Member

sneal commented Sep 27, 2013

👍 @ferventcoder

@sneal sneal closed this as completed Sep 27, 2013
@ringods
Copy link
Author

ringods commented Oct 7, 2013

@ferventcoder I tested with Puppet 3.3.1-rc3 and it works without the workaround of adding Puppet to the system path myself. Tnx!

@ferventcoder
Copy link
Contributor

@ringods I guess we got that one in a little early. :)

@jdub
Copy link

jdub commented Oct 16, 2014

This appears to have regressed with Puppet 3.6.2 and 3.7.1. Testing other versions at the moment.

@ferventcoder
Copy link
Contributor

@jdub We had this report recently, can you verify or reproduce? https://tickets.puppetlabs.com/browse/PUP-3471

cc @joshcooper @Iristyle

@jdub
Copy link

jdub commented Oct 16, 2014

Sorry, I was so pleased to have found a relevant bug report, I barely paid attention to the project I was reporting it against. :-) Will pop over there now.

@ferventcoder
Copy link
Contributor

@jdub I am not sure yet, but I think your case may be slightly different. See the bug report.

@iDVB
Copy link

iDVB commented Jun 15, 2015

I'm still seeing this issue in the latest version of https://github.com/ferventcoder/vagrant-windows-puppet and using Vagrant 1.7.2

Things seem to bomb out on the installing puppet step of the win7x64pro-vagrant Vagrantfile
Installing Puppet

Now I'm still very new to Vagrant, and it seems to me that the latest version of Vagrant prompts you to remove and not use vagrant-windows. Can anyone point me in the right direction here?

D

@cregev
Copy link

cregev commented Sep 22, 2015

Is there any ETA for this feature? ?

@ferventcoder
Copy link
Contributor

@cregev vagrant-windows is deprecated. What feature are you looking for an ETA on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants