-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
manifestdir is deprecated in Puppet 3.6.0 #3740
Comments
@zaphod42 this sum it up? |
Alternatively, it could stay the same and the options merge to provide manifest as one setting. |
Yeah I think the options staying the same works. I think internally we can just continue to share that folder and then just change the way that we are calling Puppet. |
👍 the |
A fix for this will be great |
+1 |
1 similar comment
+1 |
Same problem here, and I'm only using config.vm.provision "puppet" |
I'm stuck with this problem. Can you submit a patch for this please ? ++1 |
+1 |
2 similar comments
+1 |
+1 |
+1 |
1 similar comment
👍 |
I can take a look at patching this. We can add a new setting to simply pass in environmentpath directly from vagrant, which will override the manifest and modulepath settings. We could also allow folks to pass in an environment. If environmentpath is not passed in was thinking we could create a temp environment dir with an environment.conf in it which is generated using the passed-in from Vagrantfile modulepath and manifestfile settings. |
Can't use the puppet provisioner anymore so I've been using this workaround until this issue is addressed: config.vm.provision :shell, inline: 'sudo puppet apply --environment dev \
--pluginsync --hiera_config /etc/puppet/hiera.yaml \
/etc/puppet/environments/dev/manifests \
--environmentpath /etc/puppet/environments' ...along with some synced_folders to put the manifests and hiera files in the right folders. |
What? Why can't you use the puppet provisioner anymore? A deprecation On Wednesday, August 6, 2014, Kenny Rasschaert [email protected]
Rob http://devlicio.us/blogs/rob_reynolds |
Oh, I think I wanted to post that comment under issue 3402. I had a couple of tabs open with open puppet privisoner issues. My bad. |
Is this already merged? to 1.6.3? |
@rasschaert no worries. :) |
@lmayorga1980 as far as i know no one's implemented this yet. I planned to take a look at it soon if no one else does. |
+1 |
1 similar comment
+1 |
Deprecation warnings should be fixed so we can upgrade before it breaks. |
So Vagrant 1.7.4 still calls puppet with --manifestdir, yet newer boxes like centos-7.0-64-puppet 1.0.2 include a version of Puppet that no longer supports this parameter. Seems like that needs fixing. |
This helped me at least get up and running without needing to do much work on updating a lot of things. I added this to my Vagrantfile after the |
+1 |
For what it's worth, I have worked around this issue by using a script provisioner to invoke puppet apply directly. This not only has the benefit of working, but also more closely replicates how puppet will actually be used in a production environment to apply my config. Still, I'm looking forward to having this issue resolved. This has been a long time coming. |
I have been working around this by placing the contents of https://github.com/benh57/vagrant/tree/environments_wip/plugins/provisioners/puppet into |
With puppet 4 you need to switch your Vagrantfile to use puppet environments, instead of the manifest file setting. This is documented in the vagrant docs. I'm not sure how that premade box is set up, but i can try it out. |
I suppose i could, if an environment file is not specified, make a 'fake' environment file, pointing at the specified manifest file. However, that would only work going back a couple versions of puppet, i think it would work on 3 or later? We have no autodetection of puppet version, but that could potentially be added. |
@ball-hayden I think all of that branch ('environments_wip' ) made it into Vagrant 1.7.4, didn't it? Maybe it was broken later by another change? |
@jbeard6 It was fixed. If you're using puppet 4, pass your environment. This will put it into environments mode.
(and optionally, the path to a manifest - which will override the environment's manifest if you set it!)
If you JUST to the last 2 settings, we assume that you are on puppet <4, and pass --manifestdir. In other words -- this bug is not a bug anymore.
|
@benh57 This solution assumes that you are in fact using puppet environments with a puppet master, which isn't the case for those of us operating puppet masterless. |
For the record I managed to workaround this issue by using symlinks. Given the following folder tree:
I created a new folder
Then in my Vagrantfile, as suggested by @benh57 I added the following:
Its a somewhat dirty hack but it works for now. |
As can be seen by the removal of manifestdir (following the original deprecation notice), environments are intended for both puppet apply and agent. vagrant has support for this now, so I agree with @benh57 that this is no longer a bug. See BREAK: Directory Environments Replace Config File Environments here: http://docs.puppetlabs.com/puppet/4.0/reference/release_notes.html |
@adamcstephens From reading Directory Environments Replace Config File Environments and the linked documentation I don't see how it's possible to use environments with masterless Puppet. Some relevant quotes:
What if I don't have a master at all, even less a separate server? There doesn't seem to be any mention of masterless Puppet in this article.
Again, what about masterless Puppet?
No mention of Can you please reopen this bug, or else direct the 30+ people who are interested in this to some documentation on how to do the transition to masterless Puppet environments, if possible? |
I use vagrant with my environments all day with no puppet master, to test It's just a named folder, with an environment.conf file in it. I'm not sure Maybe it would be 'cleaner' if vagrant would detect your puppet version and On Wed, Sep 9, 2015 at 6:36 AM, Victor Engmark [email protected]
|
Necessary to work around Vagrant issues with Puppet 4 <hashicorp/vagrant#3740 (comment)>.
@adamcstephens @benh57 It would seem @l0b0 may have a valid point. I agree the intended Puppet 4 way would be to use directory environments instead of dynamic environments.
Source: Directory Environments Replace Config File Environments I just fail to see why the environment needs to be specified when using
Source: Directories: The Main Manifest(s) So Vagrantfile's without the environment specified in a masterless setup should still work as expected? |
As a workaround, I've set the following in my Vagrantfile to force environments mode without having to change the folder structure.
|
Suleman -- I chose to have it default to using the old system, so that pre Vagrant currently has no mechanism to detect your puppet version. If you're on the older puppet versions, no changes need be made. Changes to Ideal would probably be if the mode flipped automatically depending on your -Ben On Wed, Oct 14, 2015 at 2:19 AM, Suleman Chikhalia <[email protected]
|
Vagrant prolly could query Puppet to see what version it is and adjust accordingly. |
Ok I missed the whole environments / Puppet 4 thing (should've read the changelog). I'm going to try it out but I assume that fixes the issue. Thanks for clarifying @benh57 |
The documentation currently says (https://www.vagrantup.com/docs/provisioning/puppet_apply.html):
I read this and thought that since I was using only a single manifest, I wouldn't use the environments configuration as it's just extra things to do, when all I want is to apply a single file. If Vagrant is actually using environment configuration as a flag to decide whether to use Puppet 4-style calling, then this needs to be changed to "must" or at least "should". An alternative would be to add a "manifest" configuration that also makes Vagrant use v4-style calls to Puppet but can take a path and filename together. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
manifest now has the ability to take a directory or fully qualified path to a manifest file. If it is a directory it will parse all files in there and run the result.
Heads up what you are going to start seeing issues on:
==> default: Running provisioner: puppet...
')Running Puppet with /tmp/vagrant-puppet-4/manifests/site.pp...
Warning: Setting manifestdir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
(at c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/settings.rb:260:in
block (2 levels) in parse_global_options'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line/puppet_option_parser.rb:81:in
call'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line/puppet_option_parser.rb:81:inblock in pass_only_last_value_on_to'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line/trollop.rb:432:in
call'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line/trollop.rb:432:inblock in parse'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line/trollop.rb:393:in
each'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line/trollop.rb:393:inparse'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line/puppet_option_parser.rb:74:in
parse'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/settings.rb:270:inparse_global_options'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/settings.rb:239:in
initialize_global_settings'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet.rb:150:indo_initialize_settings_for_run_mode'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet.rb:136:in
initialize_settings'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line.rb:86:inblock in execute'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:479:in
exit_on_fail'; c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line.rb:85:inexecute'; c:/Program Files/Puppet Labs/Puppet/puppet/bin/puppet:4:in
I'm thinking we can change the provisioner from this:
to this:
or try something else? Thoughts?
From my comments below, leave the Ux the same and merge the options together and provide them to puppet as one setting.
The text was updated successfully, but these errors were encountered: