| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The usestring parameter to lookupvar was objectionable for several reasons;
first, it performed a function orthogonal to the main purpose of the method,
second its default was the least common value, and third it was causing other
code to work for reasons that were not obvious (extlookup).
This refactor breaks the value-transforming function out into a seperate
method which allows the user to specify the value to be used in lieu of :undef
and removes the parameter. The function, Scope#undef_as(default,exp) is
written so that it can be used in user code (templates, functions, etc.) if
needed.
This refactor will introduce a user-visible behaviour change in the case where
users were counting on lookupvar to return "" for undefined variables. The
best solution is to have them use undef_as, replacing:
lookupvar('myvar')
with
undef_as('',lookupvar('myvar'))
(with the option to specify another default value if desired). If this is too
objectionable, we could rename the existing lookupvar as raw_lookupvar and
define
def lookupvar(v)
undef_as('',raw_lookupvar(v))
end
to restore the present behaviour.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For details of why we're moving please see:
https://groups.google.com/d/topic/puppet-users/NuspYhMpE5o/discussion
Removed explicit GPL licenses where appropriate
Replaced selected GPL licenses with Apache 2.0
Replaced LICENSE with Apache 2.0
Updated README
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes the last remaining use of topsort (in SimpleGraph#splice!) by
fixing #5200 in a way that is compatible with graph fontiers. Instead of replacing
containers with many-to-many relationships, we now replace them with a pair of
sentinals (whits) that bracket them.
Thus a graph consisting of two containers, each containing ten resources, and a
dependency between the containers, which would have gone from 21 edges to 100
edges will instead have only 43, and a graph consisting of two containers (e.g.
stages) each containing a similar graph, which would have gone from 45 edges to
400 will only go to 95.
This change had minor consequences on many parts of the system and required lots
of small changes for consistancy, but the core of it is in Catelog#splice! (which
replaces SimpleGraph#splice!) and Transaction#eval_generate. Everything else is
just adjustments to the fact that some one-step edges are now two-step edges and
tests, event propagation, etc. need to reflect that.
Paired-with: Jesse Wolfe
|
|
|
|
|
|
|
|
|
|
| |
In 2.6.x, this was upgraded from "info" to "warning". This change for
Statler escalates the warning to an exception which will abort the
compile. This makes compiling fail consistently when you try to use an
undefined class from any of: node classifiers, the class keyword, and the
include function.
Paired-with: Jacob Helwig <jacob@puppetlabs.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 2.6.next:
Fixed #6562 - Minor kick documentation fix
(#6658) Propagate ENC connection errors to the agent
(#4884) Remove typo from spec test
(#4884) Modify tests to pass on non-OS X systems
(#4884) Revise new exec tests, add a few more
(#4884) Add an shell provider for execs
(#4884) Fix Test::Unit exec tests
(#4884) Break the exec type out to have a posix provider
(#4884) Add consistent path validation and behavior
(#4884) Add expand_path to requiring the spec_helper
(#4884) Autorequire shared behaviors and method to silence warnings
(#4884) Fix whitespace
(#4884) Get rid of open3 require since it wasn't being used
(#5814) Improved cron type specs
(#5814) cron_spec shouldn't depend on cron provider
Manually Resolved Conflicts:
lib/puppet/util/command_line/puppetrun
spec/spec_helper.rb
spec/unit/type/exec_spec.rb
spec/unit/type_spec.rb
test/ral/type/exec.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Mostly this is whitespace cleanup, but other than that it's changing a
couple method names and calling run on the new exec providers instead of
the types.
We started moving these tests into spec, but they weren't very self
contained so were hard to map over cleanly. For now leaving them since
they serve as a more integration level set of tests.
Paired-with: Max Martin
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* ticket/2.6.next/4914:
Revert "(#6309) Ensure the correct device is mounted when managing mounts"
(#4914) Improved stubbing in mount/parsed_spec tests.
(#4914) Improved parsed_spec for mount
(#4914) Remove mount specs
(#4914) Specs for mounted? match new behaviour
(#4914) Add specs for modified mount provider
(#4914) Add specs for modified mount type
(#4914) Update property blocks
(#4914) Query property_hash for mountstate
(#4914) Prefetch mountstate
(#4914) Join lines for better readability
|
| | |\
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* ticket/2.6.x/4914:
(#4914) Improved stubbing in mount/parsed_spec tests.
(#4914) Improved parsed_spec for mount
(#4914) Remove mount specs
(#4914) Specs for mounted? match new behaviour
(#4914) Add specs for modified mount provider
(#4914) Add specs for modified mount type
(#4914) Update property blocks
(#4914) Query property_hash for mountstate
(#4914) Prefetch mountstate
(#4914) Join lines for better readability
Conflicts:
lib/puppet/provider/mount.rb
lib/puppet/provider/mount/parsed.rb
spec/unit/provider/mount/parsed_spec.rb
spec/unit/provider/mount_spec.rb
spec/unit/type/mount_spec.rb
|
| | |/
| | |
| | |
| | |
| | | |
Add specs for the new prefetching and the correct parsing of vfstab on
Solaris and fstab on other systems
|
| |/
| |
| |
| |
| |
| |
| | |
Older version control systems like CVS and SVN used to use these $Id$
tags for version information.
Paired-with: Nick Lewis
|
| |
| |
| |
| |
| |
| | |
We deprecated this back in 0.24, so we can eliminate it in the next release.
We ran through our deprecation period full of constant complaints to the
users. Now we just fail.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Due to changes in the spec_helper, some of the specs that use puppettest were
failing when run individually. In the future, it would be nice to remove
puppettest from the specs entirely, as it's old, crufty, and only used for a
couple of things.
Paired-With: Matt Robinson
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The test in question (test_parse_line) was nondeterministic because it
was relying on the sort order of a Hash whose keys were symbols. When
the sort order caused a blank line to appear at the end of the file
under test, the blank line was elided by the crontab parser, causing a
failure.
Modified the test to execute in a deterministic order that doesn't
place the blank line at the end.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
Why test that mongrel responds to daemonize? EVERYTHING responds to
daemonize thanks to activesupport.
Paired-with: Paul Berry
|
| |
| |
| |
| |
| |
| | |
These tests are now better tested in the specs.
Paired-with: Nick Lewis
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Doing a require to a relative path can cause files to be required more
than once when they're required from different relative paths. If you
expand the path fully, this won't happen. Ruby 1.9 also requires that
you use expand_path when doing these requires.
Paired-with: Jesse Wolfe
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| | |
I swear I've done this before. *confused*
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 tests only; the next patch will make the
corresponding change to the code.
|
| |
| |
| |
| |
| |
| | |
Replaced uses of the find, search, destroy, and expire methods on
model classes with direct calls to the indirection objects. This
change affects tests only.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \ |
|
| | |
| | |
| | |
| | | |
commit:ee7d2f92f9d3ec45b5c3a9cd3fe2f5832b17f23b
|
|\| | |
|
| | |
| | |
| | |
| | |
| | | |
Just a few additional tests for the new property "comment" of the
host type.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\|
| |
| |
| |
| |
| | |
Resolved conflicts manually:
spec/integration/indirector/bucket_file/rest_spec.rb
spec/integration/indirector/certificate_revocation_list/rest_spec.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
As per Nigel, this fixes the test broken by commit 00eedac5 in which a :combine
was added in lib but the corresponding change was not made in the test.
|
|\ \
| | |
| | |
| | |
| | | |
This commit merges in d057b90 with the addition of commit 6dd1930 to fix
some tests that are confined to machines where rrd is installed.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\|
| |
| |
| | |
There are test failures in commits following this one.
|
| |
| |
| |
| | |
Signed-off-by: Jacob Helwig <jacob@puppetlabs.com>
|
|\| |
|
| |
| |
| |
| | |
Restored deleted lines from type.rb and reinstated unit tests
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The less stuff being done in the spec_helper the better for reasoning
about what's happening in the tests. puppettest.rb does a lot of things
that aren't necessary for the specs, so this patch gets those things out
of the spec_helper.
Reviewed by: Jesse Wolfe
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Changed the grammar so that the following "plural" constructs always
parse as an ASTArray:
- funcvalues
- rvalues
- resourceinstances
- anyparams
- params
- caseopts
- casevalues
And the following "singluar" construct never parses as an ASTArray:
- statement
The previous behavior was for these constructs to parse as a scalar
when they represented a single item and an ASTArray when they
contained zero or multiple items. ("Statement" could sometimes
represent a single item because a single resource declaration could
represent multiple resources). This complicated other grammar rules
and caused ambiguous handling of nested arrays.
Also made these changes to the AST class hierarchy:
- ResourceInstance no longer derives from ASTArray. This relationship
was not meaningful because a ResourceInstance is a (title,
parameters) pair, not an array, and it produced complications when
we wanted to represent an array of ResourceInstance objects.
- Resource no longer derives from ResourceReference. No significant
functionality was being inherited and the relationship doesn't make
sense in an AST context.
- ResourceOverride no longer derives from Resource. No significant
functionality was being inherited and the relationship doesn't make
sense in an AST context.
- Resource can now represent a compound resource instance such as
"notify { foo: ; bar: }". This saves the parser from having to
use represent a statement as an array of objects.
- ASTArray's evaluate method never flattens out arrays of arrays.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The test in question (test_parse_line) was nondeterministic because it
was relying on the sort order of a Hash whose keys were symbols. When
the sort order caused a blank line to appear at the end of the file
under test, the blank line was elided by the crontab parser, causing a
failure.
Modified the test to execute in a deterministic order that doesn't
place the blank line at the end.
|
|\ \
| |/
|/|
| | |
a.k.a. "make_taller_trees"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
definitions (classes, definitions, and nodes).
Previously, type definitions were not represented directly in the AST.
Instead, the parser would instantiate types and insert them into
known_resource_types as soon as they were parsed. This made it
difficult to distinguish which types had come from the file that was
just parsed and which types had been loaded previously, which led to
bug 4496.
A side-effect of this change is that the user is no longer allowed to
define types inside of conditional constructs (such as if/else). This
was allowed before but had unexpected semantics (bugs 4521 and 4522).
It is still possible, however, to place an "include" statement inside
a conditional construct, and have that "include" statement trigger the
autoloading of a file that instantiates types.
|