[PUP-3174] After enabling directory environments the manifestdir setting is still required to be valid Created: 2014/09/02  Updated: 2019/04/04  Resolved: 2014/09/15

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: PUP 3.6.2
Fix Version/s: PUP 3.7.1

Type: Bug Priority: Normal
Reporter: Andrew Parker Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: customer, support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
Relates
relates to ENTERPRISE-279 Default manifestdir value should be i... Closed
relates to ENTERPRISE-280 Error message when manifestdir doesn'... Closed
Template:
Story Points: 1
Sprint: Platform 2014-09-17
QA Contact: Kurt Wall

 Description   

PE gives a stack trace if the manifestdir does not exist. When setting up directory environments we recommend moving the $confdir/manifest folder into your environment which is guaranteed to break your install.

https://docs.puppetlabs.com/puppet/latest/reference/environments.html

Steps to reproduce:

1. Install PE3.3 on your platform of choice ( customer had Ubuntu 12.04, I tried centos 6.4)
2. Edit puppet.conf

  • add environmentpath = /etc/puppetlabs/puppet/environments

3. mkdir -p /etc/puppetlabs/puppet/environments/production
4. service pe-httpd restart
5. Complete a successful puppet agent -t run
6. mv /etc/puppetlabs/puppet/manifests/ /etc/puppetlabs/puppet/environments/production/
7. service pe-httpd restart



 Comments   
Comment by Andrew Parker [ 2014/09/02 ]

I think we can create a fix for 3.7 by just skipping manifestdir when constructing the settings catalog when environmentpath is set.

Comment by Henrik Lindberg [ 2014/09/05 ]

PR added that skips manifestdir when environmentpath is set.

Comment by Andrew Parker [ 2014/09/09 ]

Merged into stable in 8ffaa4

Comment by Andrew Parker [ 2014/09/11 ]

A note on reproducing this. The problem doesn't show up with puppet apply for some reason. I was able to reproduce the problem with puppet master, however.

Suggestions for FR:

  • Behavior under passenger
  • environmentpath in [master] but running a [user] subcommand (most of the others). This should still have the problem, since environmentpath would only apply to master
Comment by Eric Thompson [ 2014/09/15 ]

verified in FOSS on fedora20 at SHA: 7a10309

before PR:

# puppet master --no-daemonize --environmentpath /etc/puppet/environments/ --manifestdir /does/not/exist
Warning: Setting manifestdir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
  (at /usr/local/share/ruby/site_ruby/puppet/settings.rb:1110:in `issue_deprecation_warning')
Error: Cannot create /does/not/exist; parent directory /does/not does not exist
Error: /File[/does/not/exist]/ensure: change from absent to directory failed: Cannot create /does/not/exist; parent directory /does/not does not exist
Error: Could not prepare for execution: Got 1 failure(s) while initializing: File[/does/not/exist]: change from absent to directory failed: Cannot create /does/not/exist; parent directory /does/not does not exist

after PR:

puppet master --no-daemonize --environmentpath /etc/puppet/environments/ --manifestdir /does/not/exist
Warning: Setting manifestdir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
   (at /usr/local/share/ruby/site_ruby/puppet/settings.rb:1117:in `issue_deprecation_warning')
Notice: Starting Puppet master version 3.7.1

Comment by Andrew Parker [ 2014/09/15 ]

Released in Puppet 3.7.1

Generated at Tue Jan 28 08:25:03 PST 2020 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.