Jira (PUP-10842) Issue with puppet creating production folder when multiple environment paths are set

30 views
Skip to first unread message

Elaine McCloskey (Jira)

unread,
Dec 21, 2020, 7:07:04 AM12/21/20
to puppe...@googlegroups.com
Elaine McCloskey updated an issue
 
Puppet / Bug PUP-10842
Issue with puppet creating production folder when multiple environment paths are set
Change By: Elaine McCloskey
Summary: When environmentpath is set Issue with puppet creates creating production folder under first path when multiple environment paths are set
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Elaine McCloskey (Jira)

unread,
Dec 21, 2020, 7:08:03 AM12/21/20
to puppe...@googlegroups.com
Elaine McCloskey updated an issue
*Tested on the below but likely occurs in every version since PUP-2519 was added*

*Puppet Version:* 5.5.22**
*Puppet Server Version: 2018.1.18*
*OS Name/Version: centos7*

Add environmentpath setting to puppet.conf with multiple paths set.

E.g:

environmentpath = /home/puppet/appli/bdf/projects:/etc/puppetlabs/code/environments

Puppet will create an empty folder production under /home/puppet/appli/bdf/projects resulting in /etc/puppetlabs/code/environments/production getting ignored and no classes getting picked up for production

*Desired Behavior:*

Puppet should check all environment paths for a production folder before creating one.

*Actual Behavior:*

 


Puppet creates a production folder the first environment path and ignores the 2nd

Elaine McCloskey (Jira)

unread,
Dec 21, 2020, 7:08:03 AM12/21/20
to puppe...@googlegroups.com

Elaine McCloskey (Jira)

unread,
Dec 21, 2020, 7:09:03 AM12/21/20
to puppe...@googlegroups.com
Elaine McCloskey updated an issue
*Tested on the below but likely occurs in every version since PUP-2519 was added*

*Puppet Version:* 5.5.22**
*Puppet Server Version: 2018.1.18*
*OS Name/Version: centos7*

Add environmentpath setting to puppet.conf with multiple paths set.

E.g:

environmentpath = /home/puppet/ appli/bdf/ projects:/etc/puppetlabs/code/environments

Puppet will create an empty folder production under /home/puppet/
appli/bdf/ projects resulting in /etc/puppetlabs/code/environments/production getting ignored and no classes getting picked up for production


*Desired Behavior:*

Puppet should check all environment paths for a production folder before creating one.

*Actual Behavior:*

 Puppet creates a production folder the first environment path and ignores the 2nd

zendesk.jira (Jira)

unread,
Dec 21, 2020, 7:11:03 AM12/21/20
to puppe...@googlegroups.com
zendesk.jira updated an issue
Change By: zendesk.jira
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 42471

zendesk.jira (Jira)

unread,
Dec 21, 2020, 7:11:04 AM12/21/20
to puppe...@googlegroups.com

Nick Walker (Jira)

unread,
Dec 21, 2020, 12:04:03 PM12/21/20
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Jan 5, 2021, 6:07:02 AM1/5/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Jan 5, 2021, 6:07:05 AM1/5/21
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Jan 6, 2021, 4:23:03 AM1/6/21
to puppe...@googlegroups.com

Luchian Nemes (Jira)

unread,
Jan 6, 2021, 11:06:02 AM1/6/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jan 11, 2021, 9:23:04 PM1/11/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10842
 
Re: Issue with puppet creating production folder when multiple environment paths are set

Some background on the "production" directory. When directory environments were introduced in puppet 3.x, "production" was a hardcoded default, and had to exist on the filesystem somewhere, so PUP-2519 and https://github.com/puppetlabs/puppet/commit/8e70dd65a5d5d57b97ca1ae0ff588a232e06bb21#diff-feceffda334b8cc3287b33394350b4ec29a27ae6efad4bbd188e9c892f7107acR1089-R1102 created it.

However, puppet could run into problems when running puppet config and other CLI applications that don't need an environment directory. In PUP-6739, we introduced the idea of an environment_mode, so that applications could opt-out, e.g. puppet help, puppet agent, puppet plugin, etc. See also PUP-10796.

I think ideally we would never create the "production" directory. but I don't know what assumptions may be built up around that.

Josh Cooper (Jira)

unread,
Jan 13, 2021, 12:23:04 PM1/13/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Fix Version/s: PUP 7.2.0
Fix Version/s: PUP 6.20.0

Luchian Nemes (Jira)

unread,
Jan 15, 2021, 7:58:04 AM1/15/21
to puppe...@googlegroups.com
Luchian Nemes updated an issue
Change By: Luchian Nemes
Release Notes: Bug Fix
Release Notes Summary: The `production` environment folder used to be automatically created, at every Puppet run, in the first search path (given in the 'environmentpath' setting) if it did not already exist there. This fix makes sure to search through all the given paths before creating any new `production` environment folder.

Josh Cooper (Jira)

unread,
Jan 15, 2021, 5:52:04 PM1/15/21
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Jan 20, 2021, 5:27:02 AM1/20/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages