Feature #2935

Settings should use 'agent' and 'server' in addition to executable names

Added by Luke Kanies about 2 years ago. Updated over 1 year ago.

Status:Closed Start date:12/15/2009
Priority:High Due date:
Assignee:Jesse Wolfe % Done:

0%

Category:settings
Target version:2.6.0
Affected Puppet version:0.25.1 Branch:http://github.com/jes5199/puppet/tree/ticket/master/2935-settings-mode
Keywords:
Votes: 0

Description

There’s a lot of reasonable confusion around the fact that executable names are used for searching for settings. It makes more sense to basically split into client/server setting groups.

We should add a new search path, ‘client’ and ‘server’, and have them sit between the defaults and the executable names.

So, the search path would be something like:

cli => environment => executable => client/server => default

Then each executable just declares whether it’s an agent executable or a server-side one.


Related issues

related to Puppet - Bug #2808: puppetqd doesn't give an error when no config is given Closed 11/12/2009
related to Puppet - Feature #2276: Most Puppet functionality should be available via a singl... Closed 05/18/2009

History

Updated by Luke Kanies almost 2 years ago

  • Priority changed from Normal to High

This just got a lot more important.

The single executable work breaks all of the search path stuff, or at least enough of it to make things complicated.

The right answer is something along the lines of:

  • Explicitly model a ‘mode’, or maybe ‘run_mode’, with values for ‘agent’, ‘master’, and ‘user’
  • Modify all all of the executables to explicitly set a ‘mode’
  • Add backward compatibility for searching through puppet.conf for settings based on executable names, but it has to use the old executable names, yay.

The thing that’s complicated here is that a lot of the settings determine their values based on this value. I think the reason that the value is currently auto-determined is so that it happens before any of the other settings are determined.

I think, unfortunately, that the only way to really fix this is to have code as the value for those settings whose values are determined in this way.

That is, Puppet[:vardir] should determine automatically (when not overriden) whether you want /var/puppet or ~/.puppet/var depending on the value of Puppet[:mode] (or whatever it’s called).

Unfortunately (sorry Jesse!) I think the only way to do this is to add… duh duh duh… per-mode defaults.

Updated by Jesse Wolfe over 1 year ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Branch set to http://github.com/jes5199/puppet/tree/ticket/master/2935-settings-mode

Updated by Markus Roberts over 1 year ago

Added to master in:

commit:631552c58c9658780d0618c6b2fdfdc5a95465ea Feature #2935: Applications should declare modes commit:8f4d644210e7a6afc9e08d65a0c60987171747c6 Feature #2935: lazify require graph for applications commit:6b26a7c0f1793a74ca778383125b7e4618fcc9e2 Feature #2935: Puppet::Mode

Updated by Markus Roberts over 1 year ago

  • Status changed from In Topic Branch Pending Review to Closed

Also:

commit:a32381e822779b56030f6bd7009cd978970cecd2 Feature #2935 remove misleading comment commit:5937af412234354382902b80f9f38c6e328ac0a8 Feature #2935 Unify the codepaths for setting settings commit:b7d387e3e71f6af1b2967098b67440f8daa53e7d Feature #2935 Puppet[:mode] and Puppet[:name] are read-only commit:342298c4f9fcb2874d4017219a472ddf37dbfc6b Bug: Broken codepath in util/settings commit:6d5566a715c0b757480b1d321d5801b795470552 Feature #2935 settings are in Mode sections instead of executable names commit:9536723c95c5b9deff4c6c6d6423b23a7025e58b Feature #2935: method extract require_application commit:c338fef73a4d8d8dbd1500f0c6bb0e37c6eba8bb Feature #2935: Test for if we’re “puppet cert” commit:37a55306aa08e2004103e9a4a2a94bba18ffa61d Feature #2935 Modes: root? predicate commit:ac7efc8f0284d6b35f5428da06ba371cf94998ec Feature #2935 Puppet::Mode#master?

Also available in: Atom PDF