Bug #2654
closedsmart-proxy detects "master" as valid environment
Description
If [master] section of puppet.conf contains a modulepath, smart-proxy detects "master" as an environment, causing Foreman to attempt to delete the "production" environment and import "master" instead.
Updated by Dominic Cleal over 11 years ago
- Category set to Puppet
Which version of the proxy do you have installed?
Updated by Jared Nelson over 11 years ago
I'm using the Debian nightly builds. Currently 9999+debian1~nightlybuild1370929161
Updated by Dominic Cleal over 11 years ago
- Priority changed from Normal to High
- Target version set to 1.2.0
Ok, thanks.
Updated by Greg Sutcliffe over 11 years ago
- Status changed from New to Assigned
- Assignee set to Greg Sutcliffe
Updated by Greg Sutcliffe over 11 years ago
I can replicate this if there's no production environment specified - obviously if you have a modulepath for both [master] and [production] it just adds master to the environment list. I assume we want to make some kind of hardcoded mapping that if there is only master, it should be named production?
Updated by Greg Sutcliffe over 11 years ago
- Status changed from Assigned to Ready For Testing
Updated by Jared Nelson over 11 years ago
Puppet documentation says that [main], [master], [agent], and [user] are forbidden environment names. Wouldn't it make sense for smart-proxy to simply ignore modulepaths within these blocks, as they don't/can't specify environments?
Updated by Greg Sutcliffe over 11 years ago
They're not valid for static definitions, that's true, but it's perfectly allowable to have:
[master]
modulepath = /path/to/my/stuff/$environment
and then in your filesystem
/path/to/my/stuff/master
/path/to/my/stuff/production
/path/to/my/stuff/development
This is especially true when using git, where 'master' is the default branch. Worse, Puppet will assume that a static path in [master] is actually an environment called 'production' so we can't just ignore it.
I've added a specific remapping for master->production under certain logic which should fix the issue at hand - if not we can come back and make the logic more complex (again, sigh :P)
Updated by Anonymous over 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 1c60be634d26163cc7fe43f5adad1f9f75c3309d.