summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | (#1204) Reformat help text for puppet doc and puppet agent.nfagerlund2011-02-172-149/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Markdown changes for compatibility with Ronn, in the interest of better manpages.
* | | | | | | | | | Merge branch '2.6.x' into nextNick Lewis2011-02-032-1/+2
|\ \ \ \ \ \ \ \ \ \ | | |_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/util/zaml.rb
| * | | | | | | | | Updated CHANGELOG and version for 2.6.5rc1Nick Lewis2011-02-031-1/+1
| | | | | | | | | |
| * | | | | | | | | 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 'feature/next/2597-better-cycle-reporting' into nextDaniel Pittman2011-02-031-28/+166
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Feature #2597 -- generate a DOT graph of cycles on request.Daniel Pittman2011-02-031-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the '--graph' option is specified, generate a new 'cycles.dot' file and report the location of that to the user. This contains only the cycles, in dot format, allowing a visual representation of the cycle to be obtained quickly. This will include up to 10 paths through the cycle in the graph, and only one in the display to the user, to reduce information overload.
| * | | | | | | | | | | Feature #2597 -- eliminate OpenStruct for performance...Daniel Pittman2011-02-031-40/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A bit of profiling shows that most of the time spent in clustering is spent trolling around through OpenStruct. Replacing this with a hash or, where sane, an array for the stack frame in our non-recursive implementations makes performance significantly faster. (3 seconds to .65 seconds faster.) I guess those developer niceties do have some cost after all. Better to take the hit on readability and prefer performance here.
| * | | | | | | | | | | Feature #2597 -- use O(1) methods as often as possible.Daniel Pittman2011-02-031-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses a separate hash and array to track the visited path and the seen vertex data; while that is less efficient than using a single data structure, it avoids on O(n) operation on the stack to determine if we have previously visited a vertex.
| * | | | | | | | | | | Feature #2597 -- improve names and whitespace in the code.Daniel Pittman2011-02-031-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This renames a few cryptic variables to have more human-friendly names, and aligns a bit of whitespace; there are no functional changes in the code.
| * | | | | | | | | | | Feature #2597 -- report all paths in each cycle found.Daniel Pittman2011-02-031-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than reporting the cluster of vertexes in the dependency graph, which is interesting but not entirely informative, we now calculate and report the paths through the graph that form cycles. This returns the most useful information, which is the exact path that the dependency cycle has, allowing the user to (hopefully) immediately target it and start to work out why the cycle has formed there. We strongly prefer short paths through the dependency graph within the cycle, which should report the most useful loops to target first; extended loops involving more items will show up later if they are independently created. We also limit the number of paths reported (default: 10) to avoid overwhelming the error report with the combinatorial explosion that can easily result from a large scale cycle. (eg: Package => User => Package or something.)
| * | | | | | | | | | | Feature #2597 -- remove obsolete licensing comment...Daniel Pittman2011-02-031-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The header at the top of the file is long obsolete; simple_graph.rb is licensed under the GPLv2 like the rest of puppet. Removed.
| * | | | | | | | | | | Feature #2597 -- use iterative DFS in Tarjan clustering.Daniel Pittman2011-02-031-35/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to bypass the limitations of the C stack, which is also the Ruby stack, we replace the simple and clear recursive Trajan implementation with an iterative version that uses the heap as the stack. This is somewhat harder to read, but can now run a 10,000 vertex deep linear dependency relationship where, previously, 1,250 was about the limit on my machine. This should now be bounded by the size of the heap rather than the stack on all platforms -- though it would be nice to get rid of the magic and return to the recursive version if Ruby ever follows Perl down the sensible path of essentially unlimited recursion by writing that code for us in the interpreter...
| * | | | | | | | | | | Feature #2597 -- really find and report cycles.Daniel Pittman2011-02-031-31/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements Tarjan's algorithm for finding strongly connected components in a directed graph, and leverages that to find cycles. This allows us to report the minimum set of nodes in each cycle, as well as reporting each cycle discretely if there are multiple of them. While this can still produce overwhelming and/or unhelpful output, it represents a large step forward in delivering useful information when a cycle is detected. This presently reports the set of nodes that contain the cycle, in no particular order, rather than the set of edges connecting those nodes. Sadly, it also suffers a limitation: the implementation of Tarjan's algorithm used to find strongly connected components is recursive, so is limited by the maximum Ruby stack depth to dependency chains less than 1,000 nodes deep. While this is probably not a limit in practice, it is a nasty limitation, and other considerations (like Ruby stack consumption across versions) could trigger this much sooner than is desirable.
| * | | | | | | | | | | Feature #2597 -- nicer reporting of relationships.Daniel Pittman2011-02-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split out the reporting from a single line (often with literally hundreds or thousands of items) into a multi-line report. This is still nasty, but at least it is easier to use as input to other systems. This will also auto-join to a single line when sent to targets such as syslog that do not approve of newlines in messages; this preserves the utility of the message without needing to lose console utility.
| * | | | | | | | | | | Feature #2597 -- fix cycle relationship notification format.Daniel Pittman2011-02-031-3/+5
| | |_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SimpleGraph class was reporting duplicate data when printing cycles: Notify[c]Notify[c] => Notify[d] Notify[a]Notify[a] => Notify[b] This was caused by throwing the array representation of the edge into a string, rather than just the relationship data; we only care about the later, so now we only emit that later and have the correct text in the error.
* | | | | | | | | | | Merge branch 'maint/2.6.next/help' into nextJesse Wolfe2011-02-0326-949/+1100
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | |
| * | | | | | | | | | Maint: move puppet resource --helpJesse Wolfe2011-02-032-89/+104
| | | | | | | | | | |
| * | | | | | | | | | Maint: move puppet kick --helpJesse Wolfe2011-02-032-126/+131
| | | | | | | | | | |
| * | | | | | | | | | Maint: move puppet queue --helpJesse Wolfe2011-02-032-53/+59
| | | | | | | | | | |
| * | | | | | | | | | Maint: move puppet doc --helpJesse Wolfe2011-02-032-67/+84
| | | | | | | | | | |
| * | | | | | | | | | Maint: move puppet cert --helpJesse Wolfe2011-02-032-110/+111
| | | | | | | | | | |
| * | | | | | | | | | Maint: move puppet apply --helpJesse Wolfe2011-02-032-69/+76
| | | | | | | | | | |
| * | | | | | | | | | Maint: move puppet describe --helpJesse Wolfe2011-02-032-48/+53
| | | | | | | | | | |
| * | | | | | | | | | Maint: move puppet filebucket --helpJesse Wolfe2011-02-032-97/+98
| | | | | | | | | | |
| * | | | | | | | | | Maint: move puppet master --helpJesse Wolfe2011-02-032-74/+77
| | | | | | | | | | |
| * | | | | | | | | | Maint: move puppet agent --helpJesse Wolfe2011-02-032-188/+206
| | | | | | | | | | |
| * | | | | | | | | | Maint: remove puts and exit from inspect --helpJesse Wolfe2011-02-031-1/+1
| | | | | | | | | | |
| * | | | | | | | | | Maint: remove rdoc/usage dependencyJesse Wolfe2011-02-031-18/+3
| |/ / / / / / / / /
| * | | | | | | | | Merge branch 'docs/2.6.next/inspect-help' into 2.6.nextJesse Wolfe2011-02-031-0/+53
| |\ \ \ \ \ \ \ \ \
| | * | | | | | | | | (#6018) Nick F's --help text for puppet inspect.Jesse Wolfe2011-02-031-0/+53
| | | | | | | | | | |
| * | | | | | | | | | (#5823) document the not-an-API status of set_run_modeDaniel Pittman2011-02-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this is totally not API, document that in big, threatening letters so that folks actually know what is going on. Include promises so they don't feel too unhappy with us. Paired-with: matt@puppetlabs.com
| * | | | | | | | | | Merge branch 'bug/2.6.next/5823-allow-run-mode-to-cut-your-hand-off' into ↵Daniel Pittman2011-02-031-3/+6
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.6.next
| | * | | | | | | | | | (#5823) run mode can now be set dynamically...Daniel Pittman2011-02-031-3/+6
| | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Third party scripts, and complex command line tools, depend on being able to configure the run_mode value at runtime, not just when they fire up. For better or worse we used to allow this sort of thing to work, but stopped, and we have no sane, safe and consensual alternative, so we broke a bunch of client code. This enables the feature again, but does not add any safety catch; you can now happily slice off your own feet with this, if you really want to.
| * / / / / / / / / / (6114) Update the audit metaparameter for 2.6.5.nfagerlund2011-02-031-6/+19
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The audit metaparameter has some new behavior, its old behavior has changed, and the previous description was incomplete at any rate. This patch replaces its description string.
| * / / / / / / / / (#4139) hook log autoflush into global defaultsDaniel Pittman2011-02-033-1/+13
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0244-191/+216
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-0112-35/+43
| |\ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ Merge remote branch 'bodepd/feature/2.6.4/5910' into 2.6.nextPaul Berry2011-02-011-2/+7
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bodepd/feature/2.6.4/5910: (#5910) Improved logging when declared classes cannot be found:
| | | * | | | | | | | (#5910) Improved logging when declared classes cannot be found:Dan Bode2011-01-121-2/+7
| | | | |_|/ / / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when a class could not be found, it was displaying the same error message as when a resource type could not be found. This resulted in confusing error message: Invalid resource type class, when really it should display the name of the class that could not be found. My patch changes the error message to: Could not find declared class #{title}
| | * | | | | | | | Merge branch 'ticket/2.6.x/5913' of git://github.com/mitchellh/puppet into ↵Jacob Helwig2011-02-011-2/+9
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.6.next * 'ticket/2.6.x/5913' of git://github.com/mitchellh/puppet: (#5913) Fix Puppet::Application.find constant lookup behavior
| | | * | | | | | | | (#5913) Fix Puppet::Application.find constant lookup behaviorMitchell Hashimoto2011-01-161-2/+9
| | | | |_|_|_|_|/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Puppet::Application.find now only looks in the Puppet::Application namespace for the given constant.
| | * | | | | | | | Merge remote branch 'james/tickets/2.6.x/5916' into 2.6.nextJesse Wolfe2011-02-013-16/+4
| | |\ \ \ \ \ \ \ \
| | | * | | | | | | | Fixes #5916 - Cleanup of unused doc methods and documentationJames Turnbull2011-01-173-16/+4
| | | |/ / / / / / /
| | * | | | | | | | 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/6071' into 2.6.nextJacob Helwig2011-02-011-2/+2
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jamtur01/tickets/2.6.x/6071: Fixed #6071 - Fixed typo and improved exec path error message
| | | * | | | | | | | Fixed #6071 - Fixed typo and improved exec path error messageJames Turnbull2011-01-301-2/+2
| | | | |_|_|_|/ / / | | | |/| | | | | |
| | * | | | | | | | Merge branch 'tickets/2.6.x/5564' into 2.6.nextPaul Berry2011-02-011-3/+6
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tickets/2.6.x/5564: Fixed #5564 - Added some more fqdn_rand documentation
| | | * | | | | | | | Fixed #5564 - Added some more fqdn_rand documentationJames Turnbull2011-02-011-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Paul Berry <paul@puppetlabs.com>