summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
Commit message (Collapse)AuthorAgeFilesLines
...
* | (#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
| * (#5466) Monkey patch Symbol so that you can sort themMatt Robinson2011-02-281-0/+3
| | | | | | | | | | | | | | | | It turns out that the ability to sort symbols comes in the preinit section of application run when we load Facter and hit the code that adds the <=> method for symbols in lib/facter/util/plist/generator.rb Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| * Merge remote branch 'brice/tickets/2.6.x/6267' into 2.6.nextJesse Wolfe2011-02-252-0/+57
| |\
| | * Fix #6267 - puppetdoc embedded links to puppet entities are not hyperlinkedBrice Figureau2011-02-122-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Puppetdoc was relying on RDoc to provide the puppet entity (class, definition node, etc...) hyperlinking in comments. Unfortunately, RDoc was assuming namespaces are capitalized like Ruby namespaces and that definition would use the # or . separator. This change adds on top of RDoc puppet namespace format for classes and definition. This will make sure the comment hyperlinking will work as intented. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | (#6499) Make puppet respond identically to -h and --helpnfagerlund2011-02-251-1/+1
| | | | | | | | | | | | lib/puppet/util/command_line.rb had a special case for puppet --help to return generic help instead of the puppet apply help, but it would return puppet apply help when you gave it -h.
| * | Maint: Add an assertion mechanism to PuppetPaul Berry2011-02-231-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows us to make C-style "assertions" in Puppet code, e.g.: assert_that { condition } assert_that(message) { condition } These methods will raise an exception if the environment variable PUPPET_ENABLE_ASSERTIONS is set to a non-empty value, and the the condition evaluates to false. If the environment variable PUPPET_ENABLE_ASSERTIONS is not set, then the condition is not even checked. Switching the assertions on with PUPPET_ENABLE_ASSERTIONS carries three advantages: 1. It makes it possible to put potentially expensive checks in assertions without degrading the performance of the code in production environments. 2. It allows strict assertions to catch Puppet bugs early in development, without increasing the risk of a crash in production environments. 3. It allows a simple command-line mechanism to run any Puppet command with assertions enabled.
| * | Merge branch '2.6.x' into 2.6.nextJacob Helwig2011-02-142-6/+5
| |\ \ | | | | | | | | | | | | | | | | | | | | * 2.6.x: Updated CHANGELOG for 2.6.5rc4 (#3646) Fix the documentation fix for `puppet apply --apply`
| | * | (#3646) Fix the documentation fix for `puppet apply --apply`Jacob Helwig2011-02-142-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | --apply is actually off of `puppet apply`, not off of `puppet agent` (nor `puppet master`), so move the documentation accordingly. Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
| * | | Merge branch '2.6.x' into 2.6.nextJacob Helwig2011-02-142-8/+9
| |\| | | | | | | | | | | | | | | | | | | | | | * 2.6.x: Updated CHANGELOG for 2.6.5rc3 Updated fix for #3646 - apply / compile documentation
| | * | Updated fix for #3646 - apply / compile documentationJames Turnbull2011-02-142-8/+9
| | | |
| * | | Merge branch 'masterzen/tickets/2.6/5720' into ↵Daniel Pittman2011-02-121-3/+5
| |\ \ \ | | |/ / | |/| | | | | | bug/2.6.next/5720-puppetdoc-fails-on-parameterized-class
| | * | Fix #6281 - Make sure puppetdoc analyzes all filesBrice Figureau2011-02-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can happen that when parsing a file puppet parses other manifests if they get imported (this is at least true for site.pp, even in ignoreimport=true). Thus those files are now "watched". But puppetdoc needs to analyze all files, and since 99c101 we are now checking if the file was already parsed to not reparse it again. If that was the case, though, we weren't analyzing the produced code. Thus it was possible to not produce documentation for the site.pp content. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| | * | Fix #6280 - puppetdoc crashing on string interpolationBrice Figureau2011-02-111-2/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following manifest was crashing puppetdoc: class test { include "test::$operatingsystem" } Because the quoted string is "rendered" as a concat AST, which in turn ended being an array when entering RDoc. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | Merge remote branch 'dan/ticket/2.6.4/5977' into 2.6.nextJesse Wolfe2011-02-081-2/+6
| |\ \ | | |/ | |/|
| | * (5977) Puppet::Applications can be loaded from multiple paths.Dan Bode2011-01-141-2/+6
| | | | | | | | | | | | | | | | | | | | | - previously, Puppet would search $LOAD_PATH and just load applications in the first $LOAD_PATH to have the directory puppet/application. Now multiple paths can contain applications.
* | | Revert #5691 "Merge remote branch 'brice/feature/process-instrumentation' ↵Jesse Wolfe2011-03-012-141/+0
| | | | | | | | | | | | | | | | | | | | | | | | into next" This reverts commit 448a439f5abc3d51accececb678e9c5f547f7615, reversing changes made to 06939c51a3f675137b53fac8a521132a4c9cfcbe. As per discussion in http://projects.puppetlabs.com/issues/5691#note-5
* | | Merge remote branch 'brice/feature/process-instrumentation' into nextJesse Wolfe2011-02-252-0/+141
|\ \ \
| * | | Process name instrumentation infrastructureBrice Figureau2010-12-182-0/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is special feature that changes the process name of the running puppet entity to display its current activity. It is disabled by default, and can be enabled by sending the QUIT signal to the process in question (or calling enable through the code). This system can work only if some "probes" are integrated in the core puppet codebase. Since tools to visualize process names have a large refresh time (ie more than 1s) it only makes sense to track long activities (like compilation, transaction or file serving). Those probes are the subject of a subsequent patch. This system tracks every thread activity and form a strings which will be used as the process name. Due to the way it is implemented it is possible that it doesn't work on all platforms (I tested successfully on osx and linux). On some systems the space available is dependent on the original size of the full command. That's why if this string is longer than a 50 characters, the string is scrolled (like stock market tickers). Note: This is not intended to be a generic instrumentation system. Also, being block based means that it can reduce performance if the instrumentation probes are used in tight inner loops. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | | | Merge branch '2.6.x' into nextNick Lewis2011-02-031-0/+1
|\ \ \ \ | | |/ / | |/| | | | | | | | | | Conflicts: lib/puppet/util/zaml.rb
| * | | Merge branch 'bug/2.6.next/5755-gc-issue' into 2.6.nextPaul Berry2011-02-031-0/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * bug/2.6.next/5755-gc-issue: Fix for #5755 -- making zaml serialization robust over projected objects
| | * | | Fix for #5755 -- making zaml serialization robust over projected objectsMarkus Roberts2011-02-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The core problem arose when the fix for #5048 in 31118fe85aca4 introduced a hook to replace objects dynamically durring serialization so that they could be projected / rewritten to a different form for backward compatability. The serialization code assumed that all objects being serialized would remain valid until the serialization was complete, but nothing retained a copy of the temporary objects created in the hook. To resolve this, the serialization layer now maintains a ref to each such object and clears them (to allow GC) after serialization is complete. Paired-with: Jesse Wolfe <jesse@puppetlabs.com> Paired-with: Paul Berry <paul@puppetlabs.com>
* | | | | Merge branch 'maint/2.6.next/help' into nextJesse Wolfe2011-02-0312-921/+8
|\ \ \ \ \