summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'ticket/next/5375' into nextPaul Berry2010-11-234-38/+19
|\
| * (#5375) Rework puppet apply to use configurer.runPaul Berry2010-11-234-38/+19
| | | | | | | | | | | | | | 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 'maint/next/make_upstart_tests_more_robust' into nextPaul Berry2010-11-231-2/+1
|\ \
| * | Maint: made upstart tests more robust.Paul Berry2010-11-231-2/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | The tests for the upstart provider were attempting to stub Process::Status.exitstatus. However, this doesn't work (presumably because Process::Status is implemented in C). As a result, the upstart spec tests were failing if the most recent exit code was nonzero. Changed the tests so that instead of stubbing Process::Status.exitstatus to return zero, they execute a command that is known to succeed (`true`). Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
* | Merge branch 'ticket/next/2866' into nextMatt Robinson2010-11-232-1/+75
|\ \ | |/ |/| | | | | | | * ticket/next/2866: (#2866) yum should support downgrade. (#4711) Provide unit tests for yum package provider.
| * (#2866) yum should support downgrade.Dan Bode2010-11-232-8/+21
| | | | | | | | | | | | | | | | | | | | patch originally from Grzegorz Nosek with contributions on the test from Oliver Hookins. checks if the current version is greater than the should version, if so, calls yum downgrade. Reviewed-by: Matt Robinson
| * (#4711) Provide unit tests for yum package provider.Dan Bode2010-11-231-0/+61
|/
* Merge branch 'ticket/2.6.x/5261' into nextJesse Wolfe2010-11-222-22/+16
|\
| * Fix #5261 Don't escape Unicode characters in PSONJesse Wolfe2010-11-222-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint/next/all_tests_run_on_their_own' into nextMatt Robinson2010-11-2213-0/+13
|\ \ | | | | | | | | | | | | * maint/next/all_tests_run_on_their_own: maint: Fix tests that don't run on their own
| * | maint: Fix tests that don't run on their ownMatt Robinson2010-11-2213-0/+13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'maint/next/fix_missing_require_test_failure' into nextMatt Robinson2010-11-221-0/+1
|\ \ | | | | | | | | | | | | * maint/next/fix_missing_require_test_failure: maint: Fix a test that was missing a require
| * | maint: Fix a test that was missing a requireMatt Robinson2010-11-221-0/+1
|/ / | | | | | | Paired-with: Nick Lewis
* | Merge remote branch 'masterzen/feature/master/4339' into nextPaul Berry2010-11-2213-25/+228
|\ \ | | | | | | | | | | | | Manually resolved conflicts: spec/unit/configurer_spec.rb
| * | Fix #4339 - Locally save the last report to $lastrunreportBrice Figureau2010-11-137-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | Using the cache terminus system, when --report is on, we are now caching the last report as a yaml file in the $lastrunreport file (which by default is $statedir/last_run_report.yaml). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | Fix #4339 - Allow puppet apply to save last run summaryBrice Figureau2010-11-132-0/+12
| | | | | | | | | | | | | | | | | | | | | Puppet apply inconditionally saves its last run summary like puppet agent. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yamlBrice Figureau2010-11-137-25/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge branch 'next'Paul Berry2010-11-1025-193/+568
| |\ \ | | | | | | | | | | | | This marks the end of the agile iteration from 11/3-11/10.
| * \ \ Merge branch 'next'Jesse Wolfe2010-11-0326-1113/+495
| |\ \ \ | | | | | | | | | | | | | | | This marks the end of our first agile iteration.
* | \ \ \ Merge branch 'ticket/2.6.x/5370' into nextPaul Berry2010-11-221-1/+1
|\ \ \ \ \
| * | | | | (#5370) Made metrics and --summarize work with Puppet applyPaul Berry2010-11-221-1/+1
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Puppet apply and Puppet agent use different code paths to run the transaction. In the code path for Puppet apply, we weren't passing the report to catalog.apply, and as a result catalog.apply was creating its own report to store metrics in; this report was then discarded. As a result, reports generated using "puppet apply" had no metrics, and the "--summarize" option didn't work at all. Fixed by modifying the "puppet apply" code path to pass the report to catalog.apply. In the future it would be nice to refactor the two code paths to be the same. Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
* | | | | Merge branch 'maint/next/log_refactoring' into nextPaul Berry2010-11-186-20/+30
|\ \ \ \ \
| * | | | | 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-184-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Maint: Improved spec testsPaul Berry2010-11-182-15/+12
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | In configurer_spec.rb, replaced some mock classes with actual Puppet::Transaction::Report objects. In log_spec.rb, stopped using the Array type as a log destination, since doing so was unreliable.
* | | | | Merge branch 'maint/next/rake_spec_backtraces' into nextPaul Berry2010-11-181-1/+1
|\ \ \ \ \
| * | | | | Maint: Modified "rake spec" so that it prints full backtraces.Paul Berry2010-11-181-1/+1
|/ / / / /
* | | | | Merge branch 'ticket/next/5274' into nextPaul Berry2010-11-181-3/+6
|\ \ \ \ \
| * | | | | (#5274) Fixed some "rake unit" tests that were inadvertently broken byPaul Berry2010-11-181-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | commit:ee7d2f92f9d3ec45b5c3a9cd3fe2f5832b17f23b
* | | | | | Merge branch 'maint/next/fix-intermittent-parser-spec-failure' into nextNick Lewis2010-11-171-21/+21
|\ \ \ \ \ \
| * | | | | | maint: Fix intermittent parser spec failuresNick Lewis2010-11-171-21/+21
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variable 'ast' was being used as shorthand for Puppet::Parser::AST, but a test was also trying to use it as a local variable, causing problems.
* | | | | | Merge branch 'ticket/next/5274' into nextNick Lewis2010-11-175-72/+330
|\| | | | |
| * | | | | (#5274) New tests for new hosttype/parsedproviderStefan Schulte2010-11-173-3/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just a few additional tests for the new property "comment" of the host type.
| * | | | | (#5274) New comment property for the hosttypeStefan Schulte2010-11-172-72/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the parsefile provider for host parses /etc/hosts, it throws any inlinecomment away. As a result they are also purged in /etc/hosts after a puppetrun that detects a change. That could be dangerous because you will lose information even about unmanaged resources. So if you have something like 192.168.0.1 hostentry_not_managed_by_puppet # Important comment in /etc/hosts the endresult will be 192.168.0.1\thostentry_not_managed_by_puppet This patch introduces a new property "comment" for the host type. The provider is nearly a complete rewrite and a lot shorter and hopefully easier to understand.
| * | | | | (#5274) Tests for hostprovider removes commentsStefan Schulte2010-11-173-0/+251
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed that the hostprovider will remove all inline comments from the /etc/hosts file, when puppet updates at least one entry. Puppet will also remove comments from entries, the user doesnt want to manage with puppet. To split up changes a bit this commit will only introduce tests for the host type and the hostprovider. A few will fail, indicating the bug: The hostprovider parses all entries and builds a hash. When building the recordhash all comments are discarded. When puppet has to update at least one entry it uses the to_line function to convert the record hash back to a file. Because the comments are not stored in the hash, they cannot be written back to the file.
* | | | | Merge branch 'ticket/next/5288' into nextNick Lewis2010-11-171-2/+2
|\ \ \ \ \
| * | | | | Fixed #5288 - Changed report default to trueJames Turnbull2010-11-141-2/+2
| | |_|_|/ | |/| | |
* | | | | Merge branch 'ticket/next/5304' into nextNick Lewis2010-11-171-6/+5
|\ \ \ \ \
| * | | | | (#5304) Use internal_name rather than real_name for maillist providerNigel Kersten2010-11-171-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>
* | | | | Merge commit '2.6.3' into nextPaul Berry2010-11-1760-420/+549
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | Resolved conflicts manually: spec/integration/indirector/bucket_file/rest_spec.rb spec/integration/indirector/certificate_revocation_list/rest_spec.rb
| * | | | Incremented CHANGELOG for 2.6.3James Turnbull2010-11-171-0/+16
| | | | |
| * | | | [#5322] (#5322) Remove spec file that adds little value and causes failuresMatt Robinson2010-11-161-533/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | spec/integration/indirector/rest_spec.rb has been deleted in puppet’s next branch because it was found that the things being tested were already covered in spec/unit/network/http/*. Also, the tests being deleted were so overly mocked they weren’t testing much, and firing up webrick as part of the tests was slow and causes intermittent failures on Hudson. This was discussed on the dev mailing list in the really long thread "No puppet developer patches to the puppet-dev list". Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
| * | | | Fix test failures that fixing #4726 exposed.Jesse Wolfe2010-11-163-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch for #4726 causes old unit tests of the rrd reporting infrastructure to run on my machine. These tests were calling the old report api, which does not succeed. Also, the rrd settings had unintentionally been moved out of the :metrics section, making it possible that the rrd report directory would fail to get created during testing.
| * | | | (#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 #4279 -- mount detection on HP-UXMarkus Roberts2010-11-162-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | This is based on the discussion on ticket, simplified slightly and with test adjustment.
| * | | | Fix for #5055 -- adding to_sym to Puppet::Node::EnvironmentMarkus Roberts2010-11-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The currious part is that this wasn't noticed before since it appears to block server-first migration to 2.6.x and doesn’t appear to be the consequence of a recent (2.6.3) change (unless, as is quite possible, I’m missing something).
| * | | | Fix for #5298 -- Collections need to do type lookupMarkus Roberts2010-11-162-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the responsibility for type-name resolution was moved to the AST nodes in commit 449315a2c705df2396852462a1d1e14774b9f117, at least one instance was missed: the space ship operator Myclass <<| tag == foo |>> fails unless Myclass has been previously loaded. This commit adds the lookup to AST::Collection nodes in the same way it was added to the other node types. Note that I haven't audited the other note types for similar cases.
| * | | | Step towards [5298] -- cleanup indentation, etc. in AST::CollectionMarkus Roberts2010-11-161-51/+33
| | | | | | | | | | | | | | | | | | | | My code smell routines bobbled this one, so I'm fixing it manually.
| * | | | Fixed #5287 - Schedule documentation is incorrectJames Turnbull2010-11-161-5/+5
| | | | |
| * | | | Fixed #5296 - test warnings messagesJames Turnbull2010-11-165-14/+14
| | | | |