summaryrefslogtreecommitdiffstats
path: root/lib/puppet
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | (#5715) Made the report "calculate" methods strictly functional.Paul Berry2010-12-301-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These methods previously stored the metrics as a side effect; now they simply compute the metrics and return them.
| * | | | | | | | | (#5715) Made the changes/total and events/total metrics always presentPaul Berry2010-12-301-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously these metrics were omitted when their values were zero.
| * | | | | | | | | (#5715) Refactor in preparation for adding a status attribute to reports.Paul Berry2010-12-304-30/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renamed Puppet::Transaction::Report#calculate_metrics to finalize_report, in preparation for adding more functionality to this method. Removed Puppet::Transaction#send_report and Puppet::Transaction#generate_report. The former was never used, and the latter was unnecessary.
| * | | | | | | | | (#5715) Added total time to inspect reports and made inspect metrics more ↵Paul Berry2010-12-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | consistent. Inspect reports now contain all the metrics that apply reports do, and use the same code path for creating them.
| * | | | | | | | | (#5715) Removed Puppet::Transaction::Report#external_times from YAML output.Paul Berry2010-12-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This attribute was never intended to be serialized to YAML; it exists merely as temporary storage for metrics that have not yet been placed in the report's metrics attribute.
| * | | | | | | | | (#5715) Added total time metric to apply reports.Paul Berry2010-12-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a feature that was present in 0.25.x and was inadvertently dropped from 2.6.x.
| * | | | | | | | | (#5715) Removed redundant attribute Transaction::Event#versionPaul Berry2010-12-302-2/+2
| | | | | | | | | |
| * | | | | | | | | (#5715) Removed redundant attribute Resource::Status#versionPaul Berry2010-12-301-2/+2
| | | | | | | | | |
| * | | | | | | | | (#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.
| * | | | | | | | | (#5715) Removed the unused attribute Puppet::Transaction::Event#nodePaul Berry2010-12-301-1/+1
| | | | | | | | | |
| * | | | | | | | | (#5715) Removed Resource::Status#skipped_reason. It was never used.Paul Berry2010-12-301-1/+1
| |/ / / / / / / /
| * | | | | | | | Implement #5168 and #5169 ctime and mtime are propertiesJesse Wolfe2010-12-204-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | File ctime and mtime are now implemented as read-only properties, so they can be examined with audit.
| * | | | | | | | Modified the behavior of Puppet::Resource::Status as follows:Paul Berry2010-12-171-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - #change_count now only counts events that represent successful changes. It does not count failures, audits, or noops. - #changed is equivalent to #change_count > 0. - #out_of_sync_count (a new attribute) counts all events except audits. - #out_of_sync is equivalent to #out_of_sync_count > 0. This should hopefully make the summary statistics in reports more useful.
| * | | | | | | | (#5408) Reworked ResourceHarness so that code is clearer and all behaviors ↵Paul Berry2010-12-174-130/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are tested This patch removes the Puppet::Transaction::Change class and replaces it with a method, Puppet::Transaction::ResourceHarness#apply_parameter. The new code is shorter, more thoroughly unit tested, and addresses known bugs in the interaction between auditing and performing changes. This code does not address drawbacks in the report output (for example a resource is still flagged as changed even if it merely contains audit information); those will be addressed in a follow-up patch.
| * | | | | | | | (#5493) Add report_format, puppet_version, and configuration_version to ReportsNick Lewis2010-12-164-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current report formats are: 0: 0.25 reports and earlier 1: 0.26.1 - 0.26.4 reports 2: 0.26.5 and beyond Paired-With: Jesse Wolfe
| * | | | | | | | (#5375) Rework puppet apply to use configurer.runPaul Berry2010-12-162-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Puppet apply used to contain code that duplicated the functionality of configurer.run. Refactored to share code. Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
| * | | | | | | | 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.
| * | | | | | | maint: Fix tests that don't run on their ownMatt Robinson2010-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the spec directory I found all the specs that fail when run on their own. for TEST in `find . -name "*.rb" -type f`; do spec $TEST > /dev/null 2>&1 if [[ $? != 0 ]]; then echo $TEST fi done All of them were cases of missing requires. Paired-with: Nick Lewis <nick@puppetlabs.com>
* | | | | | | | Merge branch '2.6.x' into nextNick Lewis2010-12-1612-119/+156
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | | Merge branch 'ticket/2.6.next/4487' into 2.6.nextNick Lewis2010-12-131-1/+1
| |\ \ \ \ \ \ \
| | * | | | | | | (#4487) Fix environment column in hosts tableNick Lewis2010-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An entire environment object was being stored in a string field, causing the ZAML form of the environment to be stored. This was over-ridden to return just the ZAML serialized version of the name. Since the hosts model didn't know how to interpret a serialized value, it just returned the ZAML string as the environment. This patch stringifies the environment before putting it in the hosts table, which stores it properly. This patch also introduces a new method of testing using Tableless ActiveRecord models, which emulate their database schema. This helps to eliminate some stubbing, but it is still impossible to fully and accurately test all ActiveRecord interactions without a real database. Paired-With: Matt Robinson
| * | | | | | | | maint: restore plugin handler safetyJesse Wolfe2010-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous maintenance patch for this file didn't provide as strong of a guarantee of loading plugins as the code it replaced. This patch restores the extremely broad exception catching, but prevents mocha exceptions from being silently ignored.
| * | | | | | | | (#5408) Attributes can be both audited and managedJesse Wolfe2010-12-104-63/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | | maint: broken test not failing due to over-eager exception catchingJesse Wolfe2010-12-101-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A test was not testing what it claimed, but the failure exception was getting swallowed by an unnecessarily broad rescue match. Paired-With: Nick Lewis <nick@puppetlabs.com>
| * | | | | | | | Merge branch 'ticket/2.6.next/1757' into 2.6.nextJesse Wolfe2010-12-083-46/+13
| |\ \ \ \ \ \ \ \
| | * | | | | | | | Fix #1757 Change file mode representation to octalJesse Wolfe2010-12-083-46/+13
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the internal representation of a file's mode to a string instead of an integer. This simplifies the problem of displaying the value consistently throughout all of puppet.
| * / / / / / / / Bug #5423: This moves the home directory property before the uid property, ↵Jonathan Boyett2010-12-061-5/+5
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | thus minimizing room for damage when usermod is in use.
| * | | | | | | Merge branch 'ticket/2.6.next/4943' into 2.6.nextNick Lewis2010-12-022-2/+83
| |\ \ \ \ \ \ \
| | * | | | | | | (#4943) Add puppet inspect applicationNick Lewis2010-12-022-2/+83
| | | |/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "puppet inspect" will load the locally stored YAML catalog and record the current state of the audited properties in the catalog. It uses settings specified in the [agent] configuration section, and will send its inspect report to the specified server. Paired-With: Jesse Wolfe
| * | | | | | | (#5261) Fix #5261 Don't escape Unicode characters in PSONJesse Wolfe2010-12-021-22/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the escaping of valid UTF-8 sequences as "\uXXXX". This code was unreliable, as it relied on Iconv's ability to convert those codepoints between UTF-8 and UTF-16, but some versions of Iconv barf on some valid codepoints. Invalid UTF-8 sequences are still passed through unchanged. We believe that this is fine; if you are concerned about complience with the JSON standard, what we are doing is equivalent to: * interpreting binary files as Latin-1 encoded character sequences * JSON-encoding those characters according to RFC 4627 * outputting the JSON as Latin-1 This allows all raw binary files to be transmitted losslessly. Paired-With: Paul Berry <paul@puppetlabs.com>
| * | | | | | | [#5081] Revert "Fix #4349 - Parsing with ignoreimport=true was always ↵Matt Robinson2010-12-011-1/+0
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loading site.pp" The fix for #4349 caused --parse-only not to detect syntax errors when --ignore-import was used by adding a return statement that bypassed the initial import: commit 760e418d254a8d2198d2c6eb466d783a5930ef47 def perform_initial_import + return if Puppet.settings[:ignoreimport] The problem that #4349 fixed was more generally fixed in commit 99c1019e1d3402ec8e476dc859d5aaef82ec4f69 for ticket #4798 so the return statement is no longer needed, so reverting the commit for #4349 does not reintroduce the problem of an import loop error when running puppet doc. Paired-with: Jesse Wolfe
* | | | | | | (#5427) Using Propery::OrderedList for host_aliasStefan Schulte2010-12-142-29/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses the propertyclass Puppet::Property::OrderedList to represent the list of host_aliases. This lets us remove the in_sync, should_to_s etc overrides. In the provider class the list is represented by a string (=no array) so there were a few changes necessary as well. Because Puppet::Property::List uses the specified delimiter when converting should values to strings, I changed the delimiter to a simple space instead a tab. This keeps messages produced by puppet in a nice format. The tests had to be changed to work with the new behaviour of host_aliases. There are a few additional tests as well.
* | | | | | | (#5393) Add "dataset" parameter to the zone providerDerek Olsen2010-12-072-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends the zone provider to support the inclusion of one or more datasets in a solaris zone. A dataset is an zfs filesystem that has been delegated from the global zone to the non global zone.
* | | | | | | Merge remote branch 'someword/feature/master/5391' into nextPaul Berry2010-12-062-1/+21
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * someword/feature/master/5391: (#5391) Include additional zfs properties
| * | | | | | | (#5391) Include additional zfs propertiesDerek Olsen2010-11-242-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We added the following zfs properties to the zfs provider :recordsize, :aclmode, :aclinherit, :primarycache, :secondarycache Currently zfs users have to chain an exec to the zfs filesystem creation and the inclusion of these properties would allow puppet to set them natively.
* | | | | | | | Merge branch '2.6.x' into nextMatt Robinson2010-12-0212-18/+16
|\ \ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | | | (#5304) Use internal_name rather than real_name for maillist providerNigel Kersten2010-12-011-5/+3
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've switched to using list_lists --bare which shows the internal_name rather than "real_name", which is the authoritative identifier. Doing this also means we have less output to scrub, so the code is simpler. Modified by Markus as-per discussion with Nigel. Signed-off-by: Nigel Kersten <nigel@puppetlabs.com>
| * | | | | | Revert "(#5304) Use internal_name rather than real_name for maillist provider"James Turnbull2010-12-021-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 779fea867a9e23ad48cd877a88756cc5792e9e0c.
| * | | | | | Disable remote ralsh by defaultPaul Berry2010-12-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the default auth.conf so that accesses to "/resource" are no longer allowed. This means that to use "puppet resource -H" you will need to configure the target machine to enable access to the "/resource" URLs.
| * | | | | | (#5304) Use internal_name rather than real_name for maillist providerNigel Kersten2010-11-301-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've switched to using list_lists --bare which shows the internal_name rather than "real_name", which is the authoritative identifier. Doing this also means we have less output to scrub, so the code is simpler. Signed-off-by: Nigel Kersten <nigel@puppetlabs.com>
| * | | | | | Renamed Reductive to PuppetJames Turnbull2010-11-2910-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I swear I've done this before. *confused*
* | | | | | | Merge branch 'ticket/next/5211' into nextMatt Robinson2010-12-021-1/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/next/5211: (#5211) Added patch and tests for checking the size of the arrary which is returned
| * | | | | | | (#5211) Added patch and tests for checking the size of the arrary which is ↵Steve Nielson2010-12-021-1/+6
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | returned
* | | | | | | (#2495) Better value validation for sshkeyStefan Schulte2010-11-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned in the ticket it is not obvious that aliases do not belong in the resourcename but have to be specified with the property "host_aliases". On the puppet-user list I saw someone using this as a resource @@sshkey {"$fqdn,$hostname,$ipaddress": type => rsa, key => $sshrsakey, } Puppet will now write a correct entry to the know_hosts file, but when it rereads the file, the field $fqdn,$hostname,$ipaddress is split into name ($fqdn) and host_aliases ([$hostname,$ipaddress]). Since we dont find the resource the user specified, puppet will put the same key in the file over and over again. This patch adds a simple validation on resourcename.
* | | | | | | Maint: Modified uses of indirector.save to call the indirection directly.Paul Berry2010-11-3014-23/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change replaces calls to <model object>.save with calls to <model class>.indirection.save(<model object>). This makes the use of the indirector explicit rather than implicit so that it will be easier to search for all indirector call sites using grep. This is an intermediate refactor on the way towards allowing indirector calls to be explicitly routed to multiple termini. This patch affects production code.
* | | | | | | Maint: Add a default value for key in Facts::NodeExpirer#savePaul Berry2010-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed to match the signature of the method being overridden. This will allow code to call Facts.indirection.save() without a key.
* | | | | | | Maint: Moved auto-signing logic into an indirector extensionPaul Berry2010-11-301-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autosigning was previously accomplished by overriding CertificateRequest#save. This meant that it wouldn't work if certificate requests were saved via a direct call to Indirection#save. Changed it to use the indirector :extend mechanism, which works no matter how the save is invoked.
* | | | | | | Maint: Swap the order of arguments to Indirection#savePaul Berry2010-11-303-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The first argument was often nil, and the second was mandatory.
* | | | | | | Maint: Make http handler code call the indirector through ".indirection"Paul Berry2010-11-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 71ecad9904c8c48c023e90e5fbea5b26b180c9cf we removed the delegation from model class to indirection for the "find", "search", "destroy", and "expire" methods. When we did this we neglected to modify http handler code to call the indirector directly. This patch makes the appropriate changes to http handler code.