summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
Commit message (Collapse)AuthorAgeFilesLines
* (#7746) Fix bootstrap issues from #7717 fix.Daniel Pittman2011-06-011-9/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So, turns out the fix in #7717 introduced a failure when starting the Puppet master on some versions of Ruby. Weird stuff. I figured it out, eventually. You see, the process of bootstrapping Puppet is ... complex. This file, like many of our early initialization files, has an incestuous relationship between the order of files loaded, code executed at load time, and code executed in other files at runtime. When we construct this object we have not yet actually loaded the global puppet object, so we can't use any methods in it. That includes all the logging stuff, which is used by the deprecation warning subsystem. On the other hand, we can't just load the logging system, because that depends on the top level Puppet module being bootstrapped. It doesn't actually load the stuff it uses, though, for hysterical raisins. Finally, we can't actually just load the top level Puppet module. This one is precious: it turns out that some of the code loaded in the top level Puppet module has a dependency on the run mode values. Run mode is set correctly *only* when the application is loaded, and if it is wrong when the top level code is brought in we end up with the wrong settings scattered through some of the defaults. Which means that we have a dependency cycle that runs: 1. The binary creates an instance of P::U::CL. 2. That identifies the application to load. 3. It does, then instantiates the application. 4. That sets the run-mode. 5. That then loads the top level Puppet module. 6. Finally, we get to where we can use the top level stuff So, essentially, we see a dependency between runtime code in this file, run-time code in the application, and load-time code in the top level module. Which leads me to our current horrible hack: we stash away the message we wanted to log about deprecation, then send it to our logging system once we have done enough bootstrapping that it will, y'know, actually work. I would have liked to fix this, but that is going to be a whole pile of work digging through and decrufting all the global state from the local state, and working out what depends on what else in the product. Oh, and we use a global because we have *two* instances of a P::U::CL object during the startup sequence. I don't know why. Reviewed-By: Nigel Kersten <nigel@puppetlabs.com> Reviewed-By: Nick Lewis <nick@puppetlabs.com> Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
* (#7177) Deprecate implicit 'puppet apply' for 2.7.0Daniel Pittman2011-06-011-2/+24
| | | | | | | | | | | | | | | | | | | | Back in prehistory (eg: 0.25 era), 'puppet' was the name for the agent, and could be used directly to apply a manifest as well as to communicate with the puppet master process. During the 2.6 series we moved to a single binary, but continued to support older scripts by detecting invocations that looked like the traditional scripting uses and implicitly turning those into a call to 'puppet apply'. Now, with the 2.7.0 release, we are moving to deprecate that behaviour. We still do the same detection, and still run the old manifests, but we now emit a deprecation warning directing people to use 'puppet apply' directly. We intend to remove the behaviour entirely in the 2.8 release, which also paves the way to nicer handling of the command line. Reviewed-By: Randall Hansen <randall@puppetlabs.com> Reviewed-By: Nick Fagerlund <nick.fagerlund@puppetlabs.com>
* (#7717) Layout cleanup for subcommand extraction.Daniel Pittman2011-06-011-5/+11
| | | | | | This transforms the layout of the code, to make it easier to work with, but makes no functional changes. Done separately to make clearer the functional changes vs the non-functional changes.
* (#7690) Don't blow up when listing terminuses available for facesMatt Robinson2011-05-261-13/+15
| | | | | | | | | | | | | | | Previously, in order to list the available terminuses for an indirected face we loaded all the the terminuses in order to list them. This meant that if a terminus like active_record didn't have the dependencies it needed, the documentation would raise errors and not list terminuses. <Puppet::Error: Could not autoload filename uninitialized constant Object::ActiveRecord> Now we just list the terminuses available in the load path without trying to load them. The terminus will still raise an error if you try to use it without its dependencies being met. Paired-with: Max Martin <max@puppetlabs.com>
* maint: Dedup the loadpath so we don't have to walk it multiple timesMatt Robinson2011-05-261-1/+1
| | | | | | | | | | If the user's path has duplicate entries, we end up looking at them multiple times. This has bitten people in the past in that if you get a lot of duplication it can make autloading a lot slower. Really the user shouldn't be duplicating their path, but since we can't control that, this is a safe fix to prevent them from having autoload slowness. Paired-with: Max Martin <max@puppetlabs.com>
* (#7291) Fix issues with instance_methods in Ruby 1.9Matt Robinson2011-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | instance_methods in Ruby 1.8.7 returns an array of strings, but returns an array of symbols in 1.9.2. This manifested itself when running the tests because in 1.9.2 we were trying to call sub on a sybmol. The original proposed solution was to monkey patch symbols to have a sub method, but this didn't deal with the real issue of need to check whether a method was defined, and actually made it worse. Turns out that checking for the presence of a method in an array that may contain symbols and may contain strings is better done by just calling method_defined? instead. This patch addresses all the places ack turned up the code doing this include? check instead of directly calling method_defined?. Thanks to Alex Sharp ajsharp@gmail.com for pointing out the Ruby 1.9 problems and working toward a solution. Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* Prevent spec failure caused by network device mock leakBrice Figureau2011-05-071-0/+5
| | | | | | | We were leaking some mocks in the network device singleton from tests to tests. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #7299 - do not require net/ssh for running rake specBrice Figureau2011-05-071-1/+3
| | | | | | | This is a different fix than the one proposed by Stefan Schulte, based on Luke comments. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* (#7304) Remove full puppet help output when subcommand cannot be foundNigel Kersten2011-05-041-6/+1
| | | | | | | | In order to make the error message more visible to the user, we tell them about the puppet help command but don't automatically run it, so the error doesn't scroll off the screen. Reviewed-By: Daniel Pittman <daniel@puppetlabs.com>
* (#7304) Improve help from `puppet foo`Daniel Pittman2011-05-021-1/+1
| | | | | | | This addresses two of the four points: we now quote the subcommand name, and emit 'Usage: ' before the usage information on the puppet command line. Reviewed-By: Nick Lewis <nick@puppetlabs.com>
* (#6928) Don't blow up when the method is undefined...Daniel Pittman2011-04-211-6/+4
| | | | | | Use the same model for testing instance methods as the rest of the code. Reviewed-By: Max Martin <max@puppetlabs.com>
* (#6928) backport Symbol#to_proc for Ruby < 1.8.7Daniel Pittman2011-04-211-0/+9
| | | | | | | | We use the &:foo symbol-to-proc syntax in some of our code, so to avoid problems on Ruby earlier than 1.8.7 we should backport the support in our monkey-patch file. Reviewed-By: Max Martin <max@puppetlabs.com>
* Fixed #7166 - Replaced deprecated stomp "send" method with "publish"James Turnbull2011-04-192-3/+3
| | | | | | | | | | | The "send" method in the stomp gem has been deprecated since: http://gitorious.org/stomp/mainline/commit/d542a976028cb4c5badcbb69e3383e746721e44c It's been replaced with the "publish" method. Also renamed the send_message method to publish_message more in keeping with language used in queuing.
* Merge remote-tracking branch 'community/feature/puppet-device' into 2.7.xPieter van de Bruggen2011-04-188-22/+208
| | | | Reviewed-By: Mike Stahnke
* Revert "(#6928) Removed --ignoreimport"Nick Lewis2011-04-131-0/+3
| | | | | | | This reverts commit 24a277c5e805ce16e0b86e17e6cb2fbe1945ae07. Despite not needing --ignoreimport as an option anymore, it's still used internally and has to stay.
* (#6928) Removed --ignoreimportNick Lewis2011-04-131-3/+0
| | | | | | This was only used with --parseonly, which is gone. Paired-With: Jesse Wolfe
* (#7056) Use 'face' rather than 'faces' in the production code.Daniel Pittman2011-04-132-3/+3
| | | | | | | | | After some discussion we decided that most uses of the Puppet Face infrastructure were about single faces on their own, not about the collection, and so we were better referring to Puppet::Face[...] in code. This implements that by translating names and references in the Ruby code to the new, s-less, name.
* maint: whitespace cleanup for puppet/util/command_line.Daniel Pittman2011-04-121-5/+5
| | | | | | This brings bracket spacing in line with our usual coding conventions. Reviewed-By: Matt Robinson <matt@puppetlabs.com>
* (#6962) delegate global usage to the help face.Daniel Pittman2011-04-121-10/+13
| | | | | | | | | | | | The global --help handler (also invoked when puppet is run without any other command line options at all) used to spit out a brief and generally not so helpful message. Now that we have a help face that can provide the same information in a much more user-friendly form, we should delegate the function to that when required. Reviewed-By: Matt Robinson <matt@puppetlabs.com>
* (#6992) Expose available_subcommands as a class method.Daniel Pittman2011-04-121-2/+9
| | | | | | | | | | | | We previously treated the list of legacy commands as an instance property of Puppet::Util::CommandLine. This made it difficult to obtain that information outside the context of the instantiated application. In the longer term this should wither and die as we eliminate the legacy applications entirely, but until then exposing that on the class is the lightest mechanism for making that useful. Paired-With: Matt Robinson <matt@puppetlabs.com>
* (#5027) Use Puppet#warning for deprecation_wanring instead of Kernel#warnNick Lewis2011-04-121-1/+1
| | | | | | Using warning, the deprecation warnings will appear in logs and in color. Paired-With: Jesse Wolfe
* (#5027) Spell deprecation correctlyNick Lewis2011-04-121-5/+5
| | | | Paired-With: Jesse Wolfe
* Step towards #5027 -- add Logging#deprication_warning facilityMarkus Roberts2011-04-121-0/+11
| | | | | | | | | This commit adds a method analogous to Puppet.warn which 1) only logs each message the first time it is received and 2) only logs the first 100 messages it receives. Messages are logged via warn. This could easily be made more flexible by making the hard limit and effective log level user settable, if desired.
* Merge branch 'tickets/master/7021' into nextJames Turnbull2011-04-1210-0/+619
|\ | | | | | | | | | | | | | | | | | | | | | | * tickets/master/7021: Updated confine in Spec test for RSpec 2 Add management of router/switchs global vlans Cisco Switch/Router Interface management Base class for network device based providers Ssh transport for network device management Telnet transport to connect to remote network device Remote Network Device transport system Introduce a module for some IP computations
| * Add management of router/switchs global vlansBrice Figureau2011-04-081-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to manage the global device list of vlans. Currently supports only cisco IOS devices. This is as easy as: Vlan { device_url => "ssh://user:pass@switch.domain.com/" } vlan { "200": description => "R&D"; "99": description => "Management"; } The device_url conforms to the same specs as for the interface type. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Cisco Switch/Router Interface managementBrice Figureau2011-04-085-0/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces managing remotely cisco IOS network devices through ssh or telnet with a puppet type/provider. This patch allows to manage router/switch interface with the interface type: interface { "FastEthernet 0/1": device_url => "ssh://user:pass@cisco2960.domain.com/", mode => trunk, encapsulation => dot1q, trunk_allowed_vlans => "1-99,200,253", description => "to back bone router" } It is possible with this patch to set interface: * mode (access or trunk) * native vlan (only for access mode) * speed (auto or a given speed) * duplex (auto, half or full) * trunk encapsulation * allowed trunk vlan * ipv4 addresses * ipv6 addresses * etherchannel membership The interface name (at least for the cisco provider) can be any shorthand interface name a switch or router can use. The device url should conform to: * scheme: either telnet or ssh * user: can be absent depending on switch/router line config * pass: must be present * port: optional * an optional enable password can be mentioned in the url query string Ex: To connect to a switch with a line password and an enable password: "telnet://:letmein@cisco29224XL.domain.com/?enable=letmeinagain" To connect to a switch/router through ssh and a privileged user: "ssh://brice:letmein@cisco1841L.domain.com/" Note: This patch only includes a Cisco IOS provider. Also terminology adopted in the various types are mostly the ones used in Cisco devices. This patch was tested against: * (really old) Cisco switch 2924XL with ios 12.0(5)WC10 * Cisco router 1841 with ios 12.4(15)T8 * Cisco router 877 with ios 12.4(11)XJ4 * Cisco switch 2960G with ios 12.2(44)SE Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Ssh transport for network device managementBrice Figureau2011-04-081-0/+115
| | | | | | | | | | | | | | It is an adapatation of net-ssh-telnet, so that net-ssh conforms to a saner interface for consumer. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Telnet transport to connect to remote network deviceBrice Figureau2011-04-081-0/+42
| | | | | | | | | | | | It is based on net/telnet. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Remote Network Device transport systemBrice Figureau2011-04-082-0/+31
| | | | | | | | | | | | | | This is the base for upcoming telnet and ssh transport mechanism to send commands to network devices. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Introduce a module for some IP computationsBrice Figureau2011-04-081-0/+68
| | | | | | | | | | | | | | Those will be used to parse IPs, compute netmaks or prefix length. Unfortunately ruby IPAddr doesn't support those directly. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | maint: Add Array combinations methodMatt Robinson2011-04-081-0/+14
|/ | | | | | | | | | | | Ruby < 1.8.7 doesn't have this method and we're using it in a test, so tests won't run on 1.8.6 until this is in place. It's probably a good thing to use much in implementation since it's written in pure Ruby when using < 1.8.7 and in C when in > 1.8.7, but then if you're using older Rubies you're probably not expecting much for performance anyway. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* Merge branch '2.6.x' into nextMax Martin2011-04-072-12/+97
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (maint) Indentation fixes (#6490) Add plugin initialization callback system to core Fix #4339 - Locally save the last report to $lastrunreport Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yaml Fixed #3127 - removed legacy debug code Fixed #3127 - Fixed gem selection regex (#5437) Invalidate cached TypeCollection when there was an error parsing (#6937) Adjust formatting of recurse's desc (#6937) Document the recurse parameter of File type. (#6893) Document the cron type in the case of specials. (#5670) Don't trigger refresh from a failed resource Fixed #6554 - Missing $haveftool if/else conditional in install.rb breaking Ruby 1.9 Conflicts (Manually resolved): lib/puppet/application/agent.rb lib/puppet/application/apply.rb lib/puppet/configurer.rb lib/puppet/resource/type_collection.rb lib/puppet/type/file.rb spec/integration/configurer_spec.rb spec/unit/application/agent_spec.rb spec/unit/application/apply_spec.rb spec/unit/configurer_spec.rb spec/unit/indirector/report/yaml_spec.rb spec/unit/resource/type_collection_spec.rb Paired-with: Nick Lewis
| * Merge branch '2.6.next' into 2.6.xMax Martin2011-04-071-5/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.next: Fix #4339 - Locally save the last report to $lastrunreport Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yaml Fixed #3127 - removed legacy debug code Fixed #3127 - Fixed gem selection regex (#5437) Invalidate cached TypeCollection when there was an error parsing (#6937) Adjust formatting of recurse's desc (#6937) Document the recurse parameter of File type. (#6893) Document the cron type in the case of specials. (#5670) Don't trigger refresh from a failed resource Fixed #6554 - Missing $haveftool if/else conditional in install.rb breaking Ruby 1.9
| | * Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yamlBrice Figureau2011-04-051-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once a configuration run is done, puppetd will save on the node a yaml summary report roughly akin to: --- time: notify: 0.001025 last_run: 1289561427 schedule: 0.00071 config_retrieval: 0.039518 filebucket: 0.000126 resources: changed: 1 total: 8 out_of_sync: 1 events: total: 1 success: 1 changes: total: 1 This is almost an hash version of the current --summarize output, with the notable exception that the time section includes the last run unix timestamp. The whole idea is to be able to monitor locally if a puppetd does its job. For instance this could be used in a nagios check or to send an SNMP trap. The last_run information might help detect staleness, and this summary can also be used for performance monitoring (ie time section). The resource section can also show the number of failed resources. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | (maint) Indentation fixesMarkus Roberts2011-04-061-11/+9
| | |
| * | (#6490) Add plugin initialization callback system to coreMarkus Roberts2011-04-062-1/+88
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recurring pattern "drop-in code needs to have something done at startup" is presently being solved with a variety of ad-hock mechanism. This commit adds a general, extensible, centralized system for adding such hooks and manages an extensible set of metadata about plugins which it collects by searching for files named "plugin_init.rb" in a series of directories. Initially, these are simply the $LOAD_PATH. Applications can add more places to look for plugins without risk of adding duplicates or changing the order of ones that have already been found with: Puppet::Plugins.look_in(*paths) The contents of each file found is executed in the context of a Puppet::Plugins object (and thus scoped). An example file might contain: ------------------------------------------------------- @name = "Greet the CA" @description = %q{ This plugin causes a friendly greeting to print out on a master that is operating as the CA, after it has been set up but before it does anything. } def after_application_setup(options) if options[:application_object].is_a?(Puppet::Application::Master) && Puppet::SSL::CertificateAuthority.ca? puts "Hey, this is the CA! Hi everyone!!!" end end ------------------------------------------------------- Note that the instance variables are local to this Puppet::Plugin (and so may be used for maintaining state, etc.) but the plugin system does not provide any thread safety assurances, so they may not be adequate for some complex use cases. Presently supported hooks: before_application_preinit( :application_object => ... ) after_application_preinit( :application_object => ... ) before_application_parse_options( :application_object => ... ) after_application_parse_options( :application_object => ... ) before_application_setup( :application_object => ... ) after_application_setup( :application_object => ... ) before_application_run_command( :application_object => ... ) after_application_run_command( :application_object => ... ) on_commandline_initialization(:command_line_object => ... ) on_application_initialization(:appliation_object => ... ) Paired-with: Daniel Pitman
| * (#5477) Allow watch_file to watch non-existent files, especially site.ppJesse Wolfe2011-03-251-5/+1
| | | | | | | | | | | | | | | | | | | | | | The watch_file mechanism would refuse to monitor paths to files that didn't exist. This patch makes it possible to watch a file that hasn't been created yet, so when it is created, you manifests will get reparsed. Backported this change to 2.6.x Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| * Merge branch 'tickets/2.6.x/6562' into 2.6.nextJames Turnbull2011-03-221-1/+0
| |\ | | | | | | | | | | | | * tickets/2.6.x/6562: Fixed #6562 - Minor kick documentation fix
| | * Fixed #6562 - Minor kick documentation fixJames Turnbull2011-03-221-1/+0
| | |
* | | (#5477) Allow watch_file to watch non-existent files, especially site.ppJesse Wolfe2011-03-251-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The watch_file mechanism would refuse to monitor paths to files that didn't exist. This patch makes it possible to watch a file that hasn't been created yet, so when it is created, you manifests will get reparsed. Paired-With: Max Martin <max@puppetlabs.com> Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
* | | (#6820) Fix RDOC parser to work with Ruby 1.9Matt Robinson2011-03-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | Lovely RDOC changed where it put everything in Ruby 1.9. Now there's some conditional logic depending on Ruby version to determine which files to requrie. The tests still fail, but at least they run now. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | | (#2782) Fix constant_defined?Matt Robinson2011-03-231-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Al Hoang for the bit of code for choosing how to use constant_defined? depending on the version of Ruby. In Ruby 1.9 const_defined? has a new parameter for inherit (from Ruby docs) mod.const_defined?(sym, inherit=true) -> true or false Returns true if a constant with the given name is defined by mod, or its ancestors if inherit is not false. Unfortunately, the documentation isn't terribly clear about the behavior if inherit=false. In Ruby 1.8 the inherit parameter doesn't exist. It appears that setting inherit=false makes it behave like it used to in Ruby 1.8, but there may be sublties of autoloading that prove this wrong or ways in which were setting constants that changed and cause problems regardless of the behavior of const_defined? Ruby 1.8.7: irb(main):001:0> module Foo irb(main):002:1> end => nil irb(main):003:0> A = 'find_me?' => "find_me?" irb(main):004:0> Foo.const_defined?('A') => false Ruby 1.9.2: ruby-1.9.2-p136 :001 > module Foo ruby-1.9.2-p136 :002?> end => nil ruby-1.9.2-p136 :003 > A = 'find_me?' => "find_me?" ruby-1.9.2-p136 :004 > Foo.const_defined?('A') => true ruby-1.9.2-p136 :005 > Foo.const_defined?('A', false) => false Also noteworthy is that something about constants behavior changed between 1.9.1 and 1.9.2, though not in regard to the little test above, but we should only be testing against 1.9.2 anyway. At least with this change in we'll be able to start debugging test failures instead of just getting failures at the level of syntax errors. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | | Fixed #6555 - Ruby 1.9.x warning: class variable access from toplevelJames Turnbull2011-03-221-3/+3
| | | | | | | | | | | | | | | | | | This came from the use of the @@colormap class variable. The variables has been changed to a constant.
* | | Merge branch '2.6.x' into nextMatt Robinson2011-03-183-6/+31
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (36 commits) Updated CHANGELOG for 2.6.7rc1 (#5073) Download plugins even if you're filtering on tags Fix #5610: Prevent unnecessary RAL lookups Revert "Merge branch 'ticket/2.6.x/5605' of git://github.com/stschulte/puppet into 2.6.next" (#6723) Fix withenv environment restoration bug (#6689) Remove extraneous include of Puppet::Util in InventoryActiveRecord Remove extra trailing whitespace from lib/puppet/resource.rb (#5428) More fully "stub" Puppet::Resource::Reference for use with storedconfigs (#6707) Fix typo in rest_authconfig.rb (#6689) Make inventory_active_record terminus search quickly (#5392) Give a better error when realizing a non-existant resource (#2645) Adding a less-stubby test to verify the "system" attribute's behavior Update CHANGELOG for 2.6.6 maint: Remove serialization of InventoryFact values maint: Rename InventoryHost to InventoryNode Fixed #2645 - Added support for creating system users maint: Remove spec run noise maint:Refactor of mount provider integration tests (#6338) Support searching on metadata in InventoryActiveRecord terminus (#6338) Implement search for InventoryActiveRecord facts terminus ... This merge includes essentially reverting #4904's change to the mount type since tests that came in from 2.6.x specified different behavior and what's correct is not clear to me. I've reopened #4904 and added it to our backlog, and talked to Nigel about the RFC that's currently out on the puppet-users mailing list for a bigger refactor of how the mount provider works. Manually Resolved Conflicts: spec/spec_helper.rb spec/unit/indirector/queue_spec.rb
| * | (#6723) Fix withenv environment restoration bugMax Martin2011-03-151-5/+4
| |/ | | | | | | | | | | Ensured that withenv properly restores the environment after it runs a block and added testing for the method. Reviewed-by: Matt Robinson and Daniel Pittman
| * (#6513) Propagate the environment when doing variable lookup in settingsJacob Helwig2011-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example with the following: test.conf: [master] rrddir = /var/lib/puppet/rrd templatedir = /var/lib/puppet/templates [env_a] templatedir = $rrddir/templates rrddir = /tmp/env_a/ The command: RUBYLIB=lib bin/puppet master --config ./test.conf --environment env_a --configprint templatedir originally produced '/var/lib/puppet/rrd/templates' instead of the expected '/tmp/env_a/templates' Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
| * Maint: Added the ability to replace the behavior ofPaul Berry2011-03-071-0/+26
| | | | | | | | | | | | | | Puppet::Util.execute with an arbitrary code block for ease in spec testing. Reviewed-by: Max Martin <max@puppetlabs.com>
* | (#4798) Make rdoc work if moduledir & manifestdir overlapMatt Robinson2011-03-082-1/+4
| | | | | | | | | | | | | | Merging 2.6.next into next caused a regression; this commit fixes that regression. Paired-with:Max Martin <max@puppetlabs.com>
* | maint: Fix rdoc when documenting manifest filesMatt Robinson2011-03-081-10/+3
| | | | | | | | | | | | | | | | | | | | The structure of the AST has changed from 2.6.x to master, so the code to generate documentation from the AST had to change. Generating documentation for resources other than classes, nodes and defines is still broken, see ticket #6634 Paired-with: Daniel Pittman <daniel@puppetlabs.com>
* | Merge branch '2.6.next' into nextMatt Robinson2011-03-075-7/+87
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a particularly nasty merge, so rather than hold up merges into next any longer, I'm going to push this merge with a few outstanding problems. The tests that were failing in the following areas have been marked pending, and will be addressed separately, immediately following this push. TODO: Verify that brice's rdoc change is still valid: tests to show that line numbers from class, define and node get into the ast Fix mount parsed_spec spec/unit/provider/mount/parsed_spec.rb * 2.6.next: (85 commits) (#5148) Fix failing spec due to timezone (#5148) Add support for PSON to facts (#6338) Remove inventory indirection, and move to facts indirection (#6445) Fix inline docs: puppet agent does not accept --mkusers Update CHANGELOG and version for 2.6.6rc1 (#6541) Fix content with checksum truncation bug (#6418) Recursive files shouldn't be audited (#6541) maint: whitespace cleanup on the file integration spec (#6541) Fix content with checksum truncation bug (#5466) Write specs for output of puppet resource (#5466) Monkey patch Symbol so that you can sort them (#5466) Fixed puppet resource bug with trailing , Update CHANGELOG for 2.6.5 (#4922) Don't truncate remotely-sourced files on 404 (#6338) Remove unused version control tags Maint: Align tabs in a code block in the Augeas type. (#6509) Inline docs: Fix erroneous code block in directoryservice provider for computer type Maint: Rewrite comments about symlinks to reflect best practice. (#6509) Inline docs: Fix broken lists in Launchd provider. (#6509) Inline docs: Fix broken code blocks in zpool type ... Manually Resolved Conflicts: lib/puppet/application/inspect.rb lib/puppet/defaults.rb lib/puppet/file_bucket/dipper.rb lib/puppet/network/http/handler.rb lib/puppet/node/facts.rb lib/puppet/parser/parser.rb lib/puppet/parser/parser_support.rb lib/puppet/util/command_line/puppet lib/puppet/util/command_line/puppetd lib/puppet/util/command_line/puppetmasterd lib/puppet/util/monkey_patches.rb lib/puppet/util/rdoc/parser.rb spec/unit/application/agent_spec.rb spec/unit/file_bucket/file_spec.rb spec/unit/indirector/file_bucket_file/file_spec.rb spec/unit/network/http/handler_spec.rb spec/unit/parser/parser_spec.rb spec/unit/provider/mount/parsed_spec.rb