Feature #2469

support filebucket to use the puppetmaster as default remote server

Added by Till Maas almost 3 years ago. Updated almost 3 years ago.

Status:Closed Start date:07/29/2009
Priority:Normal Due date:
Assignee:James Turnbull % Done:

0%

Category:file
Target version:0.25.0
Affected Puppet version:0.24.8 Branch:
Keywords:
Votes: 0

Description

The patch I attach adds the parameter “remote” to the filebucket type, which makes it possible to use the puppetmaster that is specified in the config as the default puppetmaster.

It should not disrupt existing configurations, but allows to use the filebucket from the remote puppetmaster server by default with this manifest:

filebucket { main: remote => true }

A more elegant solution would probably be to make the values of Puppet[:server] available as a fact/pre defined variable for the client, but I do not now how to do this and the only hints for predefined variables (servername, serverip) seem to be generated at the host. So if it is easily possible to create such a variable, e.g. $puppter_config_server that has the value of Puppet[:server] for puppetd.

0001-introduce-filebucket-parameter-remote.patch (2.8 kB) Till Maas, 07/30/2009 12:31 am

puppet-rake-failure.txt - output of rake --trace mail_patches (1.9 kB) Till Maas, 07/30/2009 08:03 am

0001-default-server-in-remote-filebuckets.patch - default server if path is not specified (4.2 kB) Till Maas, 07/30/2009 08:42 am

0001-default-server-in-remote-filebuckets.patch (5.5 kB) Till Maas, 08/02/2009 09:24 am

History

Updated by Luke Kanies almost 3 years ago

  • Category set to file
  • Status changed from Unreviewed to Code Insufficient

I like the idea, but the fix isn’t quite right.

Can you email the patch to the dev list using the ‘mail_patches’ rake target? See the DevelopmentLifecycle page for more info.

Mostly, 0.25 doesn’t have the class-level [] methods any more, so that won’t work. But it’d also be good to have some tests.

Updated by Till Maas almost 3 years ago

I called the branch ticket/master/2469 and ran rake —trace mail_patches, but this fails, because lib/puppet.rb contains already 0.25.0 as version. I use rubygem-rake-0.8.7-1.fc10. Is this maybe currently broken?

Updated by Till Maas almost 3 years ago

Here is another approach that does not need a new parameter. Now the server defaults to Puppet[:server] if path is false, so this is now possible:

filebucket { main: path => false }

Updated by Luke Kanies almost 3 years ago

  • Status changed from Code Insufficient to Tests Insufficient

I like this much better; having a nil path makes sense. Are there existing tests for the filebucket type? My assumption is no. Could you add a couple of simple tests just to verify the settings propagate correctly?

Updated by Luke Kanies almost 3 years ago

And, um, I have no idea on the problem with ‘rake mail_patches’….

Updated by Till Maas almost 3 years ago

Here is an updated version with some basic specs. I do not know how I can check which arguments the filebucket used for the dipper, therefore the spec only check, whether or not the filebucket is remote. Strangely I also needed to add require ‘test/unit’ to test/lib/puppettest/testcase.rb, to make the test run.

Updated by Luke Kanies almost 3 years ago

  • Status changed from Tests Insufficient to Ready For Checkin
  • Assignee set to James Turnbull
  • Target version set to 0.25.0

Pushed Till’s code and a modification of it in the tickets/master/2469 branch in my repo.

Updated by James Turnbull almost 3 years ago

  • Status changed from Ready For Checkin to Closed

Pushed in commit:266aafa6efa9dff5fb0b49ffdafc9372edcafdfe in branch master.

Also available in: Atom PDF