Project

General

Profile

Actions

Bug #2654

closed

smart-proxy detects "master" as valid environment

Added by Jared Nelson over 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Category:
Puppet
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.

Actions #1

Updated by Dominic Cleal over 11 years ago

  • Category set to Puppet

Which version of the proxy do you have installed?

Actions #2

Updated by Jared Nelson over 11 years ago

I'm using the Debian nightly builds. Currently 9999+debian1~nightlybuild1370929161

Actions #3

Updated by Dominic Cleal over 11 years ago

  • Priority changed from Normal to High
  • Target version set to 1.2.0

Ok, thanks.

Actions #4

Updated by Greg Sutcliffe over 11 years ago

  • Status changed from New to Assigned
  • Assignee set to Greg Sutcliffe
Actions #5

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?

Actions #6

Updated by Greg Sutcliffe over 11 years ago

  • Status changed from Assigned to Ready For Testing
Actions #7

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?

Actions #8

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)

Actions #9

Updated by Anonymous over 11 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #10

Updated by Greg Sutcliffe over 6 years ago

  • Target version deleted (1.2.0)
Actions

Also available in: Atom PDF