summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Maint: move puppet resource --helpJesse Wolfe2011-02-031-89/+0
| | | | | |
| * | | | | Maint: move puppet kick --helpJesse Wolfe2011-02-031-126/+0
| | | | | |
| * | | | | Maint: move puppet queue --helpJesse Wolfe2011-02-031-53/+0
| | | | | |
| * | | | | Maint: move puppet doc --helpJesse Wolfe2011-02-031-67/+0
| | | | | |
| * | | | | Maint: move puppet cert --helpJesse Wolfe2011-02-031-110/+0
| | | | | |
| * | | | | Maint: move puppet apply --helpJesse Wolfe2011-02-031-69/+0
| | | | | |
| * | | | | Maint: move puppet describe --helpJesse Wolfe2011-02-031-48/+0
| | | | | |
| * | | | | Maint: move puppet filebucket --helpJesse Wolfe2011-02-031-97/+0
| | | | | |
| * | | | | Maint: move puppet master --helpJesse Wolfe2011-02-031-74/+0
| | | | | |
| * | | | | Maint: move puppet agent --helpJesse Wolfe2011-02-031-188/+0
| |/ / / /
| * / / / (#4139) hook log autoflush into global defaultsDaniel Pittman2011-02-032-0/+8
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We previously had an ordering dependency in the autoflush option, which was statically read from defaults when the log destination was configured. We add a hook in the defaults to update the log subsystem, which in turn updates log destinations, when autoflush is changed. This would work as desired: puppet agent --autoflush --logdest=file This would not work, as autoflush would be false: puppet agent --logdest=file --autoflush Now those changes propagate correctly. Paired-with: matt@puppetlabs.com
* | | | Merge branch '2.6.x' into nextMatt Robinson2011-02-027-22/+36
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (46 commits) Augmentation of tests for prior commit Fix to fix for #5755 -- backref serialization issues in zaml Fixed #5564 - Added some more fqdn_rand documentation Fixed #4968 - Updated list of options turned on by --test in documentation (#5061) - allow special hostclass/define variables to be evaluated as defaults. (#6107) Fix an error when auditing a file with empty content Remove already initialized constant warning from file_spec.rb tests (#5566) Treat source only File checksums as syntax errors when used with content Rename variable used in File type validation to be more clear Remove invalid "timestamp" and "time", and add missing "ctime" File checksum types. Remove order dependency when specifying source and checksum on File type Bug #5755 -- ZAML generates extra newline in some hash backreferences. bug #5681 -- code fix to handle AIX mount output Bug #5681 -- parse AIX mount command output. Spec for #5681 to allow parsing of AIX mount output in mount provider Fixed #6091 - Changed POSIX path matching to allow multiple leading slashes Bug #6091 -- test leading double-slash in filenames are allowed. Fixed #6071 - Fixed typo and improved exec path error message Fixed #6061 - Allowed -1 as password min/max age Bug #6061 -- verify that negative {min,max}_password_age are accepted. ... Manually Resolved Conflicts: lib/puppet/util/zaml.rb spec/unit/util/zaml_spec.rb
| * | | Merge branch '2.6.next' of git://github.com/puppetlabs/puppet into 2.6.nextMarkus Roberts2011-02-015-20/+12
| |\ \ \
| | * \ \ Merge remote branch 'james/tickets/2.6.x/5916' into 2.6.nextJesse Wolfe2011-02-012-12/+3
| | |\ \ \
| | | * | | Fixes #5916 - Cleanup of unused doc methods and documentationJames Turnbull2011-01-172-12/+3
| | | | | |
| | * | | | Merge remote branch 'james/tickets/2.6.x/5914' into 2.6.nextJesse Wolfe2011-02-011-1/+1
| | |\ \ \ \
| | | * | | | Fixed #5914 Removed genconfig = true from genconfig outputJames Turnbull2011-01-201-1/+1
| | | |/ / /
| | * | | | Merge remote branch 'jamtur01/tickets/2.6.x/5736' into 2.6.nextJacob Helwig2011-02-011-2/+2
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jamtur01/tickets/2.6.x/5736: Modified rubydoc in lib/puppet/util/command_line/puppetca to fix inaccurate description of --clean.
| | | * | | | Modified rubydoc in lib/puppet/util/command_line/puppetca to fix inaccurate ↵nfagerlund2011-01-171-2/+2
| | | |/ / / | | | | | | | | | | | | | | | | | | description of --clean.
| | * | | | Merge remote branch 'james/tickets/2.6.x/5742' into 2.6.nextJesse Wolfe2011-02-011-5/+6
| | |\ \ \ \
| | | * | | | Fixed #5742 - Removed legacy fqdn option from documentationJames Turnbull2011-01-171-5/+6
| | | |/ / / | | | | | | | | | | | | | | | | | | Patch from: Nick Fagerlund
| * | / / / Fix to fix for #5755 -- backref serialization issues in zamlMarkus Roberts2011-02-011-27/+25
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit addresses the original issue that the change reverted in the previous commit for #5755 was intended to fix by removing the special case on labels in emit (lables, even if they are never generated, are not "new lines" and thus @recent_nl should always be set to false when one is emitted). It also partially addresses a related issue wherein temporary strings generated when field names are constructed recycle their object_id (they are temporary) and thus cause incorrect back references. This commit "fixes" the problem by never generating backrefs to strings (treating them as immutable). It does not address other suspected issues such as thread safety durring serialization due to the use of class variables to store the seen-object hash or the use of object ids as "permanently unique" identifiers. Paired with: Daniel Pittman Advice & Commiseration: Jesse Wolfe
| * | | | Merge commit 'f279f2c24ad1c87940eca3592f4c6e2f5676c694' into 2.6.nextJacob Helwig2011-02-011-1/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f279f2c24ad1c87940eca3592f4c6e2f5676c694': Fixed #4968 - Updated list of options turned on by --test in documentation
| | * | | | Fixed #4968 - Updated list of options turned on by --test in documentationJames Turnbull2011-02-011-1/+2
| | |/ / / | | | | | | | | | | | | | | | | | | | | Reviewed-by: Jacob Helwig <jacob@puppetlabs.com> Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
| * | | | Merge branch 'issues/2.6.next/5566' into 2.6.nextJacob Helwig2011-02-011-1/+13
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * issues/2.6.next/5566: (#5566) Treat source only File checksums as syntax errors when used with content Rename variable used in File type validation to be more clear Remove invalid "timestamp" and "time", and add missing "ctime" File checksum types. Remove order dependency when specifying source and checksum on File type
| | * | | | (#5566) Treat source only File checksums as syntax errors when used with contentJacob Helwig2011-02-011-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain checksum types (ctime, mtime) only make sense when used with the 'source' File parameter, since there is no way to check them on raw strings. Given the limitations of the current checksumming implementations, it is likely to introduce unexpected behavior when using the 'none' checksum type and either one of the 'source', and 'content' File parameters. Because of this, it is now a syntax error to use a checksum of 'none' with either parameter. Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
| * | | | | Merge remote branch 'jamtur01/tickets/2.6.x/3646' into 2.6.nextPaul Berry2011-02-011-0/+9
| |\ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | * jamtur01/tickets/2.6.x/3646: Fixed #3646 - Added documentation for compile and apply to man page
| | * | | | Fixed #3646 - Added documentation for compile and apply to man pageJames Turnbull2011-01-211-0/+9
| | |/ / /
| * / / / Bug #5755 -- ZAML generates extra newline in some hash backreferences.Daniel Pittman2011-01-311-4/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This data structure generates YAML with an extra newline that violates the syntax rules and all: list = [1] { :a => list, :b => list }.to_yaml This breaks real client use of the YAML catalogs, not to mention our own use of cached catalogs...
* | | | Merge branch '2.6.x' into nextNick Lewis2011-01-065-5/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Rakefile lib/puppet/resource/type_collection.rb lib/puppet/simple_graph.rb lib/puppet/transaction.rb lib/puppet/transaction/report.rb lib/puppet/util/metric.rb spec/integration/indirector/report/rest_spec.rb spec/spec_specs/runnable_spec.rb spec/unit/configurer_spec.rb spec/unit/indirector_spec.rb spec/unit/transaction/change_spec.rb
| * | | (#5715) Changed the type of metric names to always be strings.Paul Berry2010-12-301-0/+1
| | | |
| * | | (#5715) Removed Puppet::Util::Log#version.Paul Berry2010-12-303-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | This attribute was only relevant in reports, and in reports it was redundant with Puppet::Transaction::Report#configuration_version and Puppet::Transaction::Report#puppet_version.
| * | | Merge branch 'ticket/2.6.4/5566' into 2.6.nextJesse Wolfe2010-12-161-0/+11
| |\ \ \
| | * | | Fix #5566 none, mtime, and ctime checksum types can write file contentsJesse Wolfe2010-12-161-0/+11
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | The #write method in lib/puppet/type/file/content.rb relies on the block passed to #sum_stream getting executed. "none", "mtime", and "ctime" aren't real checksums, so they violated that assumption and just returned empty results. This patch causes that block to get executed.
* | | | Merge branch '2.6.x' into nextNick Lewis2010-12-161-5/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually Resolved Conflicts: lib/puppet/resource/type_collection.rb spec/unit/configurer_spec.rb spec/unit/indirector/catalog/active_record_spec.rb spec/unit/resource/type_collection_spec.rb spec/unit/transaction/resource_harness_spec.rb
| * | | (#5408) Attributes can be both audited and managedJesse Wolfe2010-12-101-5/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes it possible to both audit and manage an attribute. It introduces a new field on Event objects "historical_value", which is the value from state.yaml. The value from the RAL is written to state.yaml, and then the RAL is updated with the desired value. Paired-With: Nick Lewis <nick@puppetlabs.com> Paired-With: Matt Robinson <matt@puppetlabs.com>
* | | Merge branch '2.6.x' into nextMatt Robinson2010-12-0210-11/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (#5304) Use internal_name rather than real_name for maillist provider Updated CHANGELOG and version for 2.6.4 Revert "(#5304) Use internal_name rather than real_name for maillist provider" Disable remote ralsh by default (#5424) Ship auth.conf as part of installing from source (#5304) Use internal_name rather than real_name for maillist provider Renamed Reductive to Puppet Manually Resolved Conflicts: lib/puppet/provider/maillist/mailman.rb
| * | Renamed Reductive to PuppetJames Turnbull2010-11-2910-11/+11
| | | | | | | | | | | | I swear I've done this before. *confused*
* | | Merge remote branch 'masterzen/feature/master/4339' into nextPaul Berry2010-11-221-5/+3
|\ \ \ | | | | | | | | | | | | | | | | Manually resolved conflicts: spec/unit/configurer_spec.rb
| * | | Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yamlBrice Figureau2010-11-131-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: Added assertion to make sure Log.close_all succeedsPaul Berry2010-11-181-0/+1
| | | | | | | | | | | | | | | | | | If the hash containing log destinations gets corrupted, Log.close_all could fail silently. This change adds an exception to make these failures easier to debug should they ever happen again.
* | | Maint: Switched spec tests to use a class rather than Array as the log ↵Paul Berry2010-11-181-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | destination. Using an Array as a log destination is unreliable because Puppet's log mechanism stores log destinations in a hash whose key is the destination itself. Since arrays can change their hash when they are modified, this was causing the log destination hash to become corrupted, producing sporadic spec test failures.
* | | Merge commit '2.6.3' into nextPaul Berry2010-11-178-19/+25
|\ \ \ | | |/ | |/| | | | | | | | | | Resolved conflicts manually: spec/integration/indirector/bucket_file/rest_spec.rb spec/integration/indirector/certificate_revocation_list/rest_spec.rb
| * | (#4726) Fix RRD legacy supportMatt Robinson2010-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There was a section of code that didn't take the legacy RRD library into account. This caused a unit test failure, but only if you have the RRD legacy library installed, which I did. Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
| * | Fix for #4299 -- Don't require whichMarkus Roberts2010-11-122-9/+2
| | | | | | | | | | | | | | | | | | We already had an internal implementation of which hiding under an assumed name (Puppet::Util.binary); this commit calls it out of hiding and uses it consisantly.
| * | Fix for #4955 -- Race condition & memory leak in Puppet::UtilMarkus Roberts2010-11-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Puppet::Util.sync method was not thread safe and also leaked memory. I'm not certain, but I believe the first is ironic and the second is merely a bug. This patch addresses the problem by 1) refactoring so the sync objects are never returned (and thus no one can cache a reference to one) 2) adding reference counting 3) deleting them when they are no longer needed 4) doing the thread safty dance. It wasn't the first (or even second) solution considered, but it's the one that I was able to make work in a way that I'm convinced is correct. Its main advantage is that it puts all the tricky bits in one place.
| * | Fix #4923 - close process race when truncating existing fileBrice Figureau2010-11-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using File.open(file, "w") calls open(2) with O_CREAT|O_TRUNC which means when the file exists it is immediately truncated. But the file is not locked yet, so another process can either write or read to the file, leading to file corruption. The fix is to truncate only when the file is exclusively locked. This can be done on some operating system with O_EXLOCK open(2) flag. I chose the more portable option of: * open * flock * truncate * write * close It might also be good to flush and fsync the file after writing it, otherwise in case of crash an incomplete file can stay on disk. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | capture stderr from exec resourcesNigel Kersten2010-11-101-1/+1
| | |
| * | Fix #3808 - puppetdoc should use --force-update only if RDoc supports itBrice Figureau2010-11-101-4/+5
| | | | | | | | | | | | | | | | | | This should allow to run puppetdoc on ruby 1.8.5. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | Fix #4911 - Do not generate doc for standard RDoc parser generated objectBrice Figureau2010-11-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | RDoc has some standard parsers for .c,.cc or fortran files (don't ask why). Unfortunately our html generator doesn't support the data structures generated by those parsers and we were bombing on unknown methods. This patch makes sure we generate html only for our own top level objects. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>