| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
lib/puppet/feature/base.rb
lib/puppet/file_serving/configuration.rb
spec/unit/indirector/ssl_file_spec.rb
spec/unit/parser/functions/extlookup_spec.rb
spec/unit/resource/catalog_spec.rb
test/language/ast/variable.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When testing whether a file path is absolute, the regexp was only
handling POSIX style file paths. This commit requires Windows
style file paths to start with a drive letter. A future commit
will refacter the various places we do path validation to
support both Windows drive letters and UNC paths.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
(cherry picked from commit 45ae5b4a9ced26dfcd3e324391f9a26cb02bf93d)
|
| |\
| | |
| | |
| | |
| | | |
daniel-pittman/maint/2.7.x/strip-incorrect-rights-statements
Maint/2.7.x/strip incorrect rights statements
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For a while Luke, and other authors, injected a created tag, copyright
statement, and "All rights reserved" into every new file they added to the
Puppet project.
This isn't really true, and we have a global license covering the code, so
we have now stripped out all those old tags.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
| |/
| |
| |
| |
| | |
This is a cosmetic commit improving the line wrapping in the create_resources
function's documentation string.
|
| |
| |
| |
| |
| |
| |
| | |
The create_resources function's doc string was not particularly clear and had
incorrect markdown formatting. This commit adds a more complete example which
demonstrates the necessary hash format, and changes the doc string to a
heredoc to simplify escaping.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 2.7.x: (25 commits)
(#4411) Explain that runinterval = 0 does not mean "never run"
Maint: Fix missing option text in puppet agent and arrange options alphabetically
(#8302) Improve documentation of exec providers
(#7853) Clarify and complete docs for the tagmail report processor
Maint: Mention that audit metaparameter will accept "all"
Maint: Adjust wording for file type's content parameter
Maint: Fix poor documentation for versioncmp function.
maint: Fix case sensitive require
maint: Add inspect app options to help
maint: Fix inspect help
Increment lib/puppet.rb VERSION string
Updated CHANGELOG for 2.7.3rc1
(#4762) Ensure that clients on the moon can successfully connect.
Add document outlining preferred contribution methods
Add document outlining preferred contribution methods
Add document outlining preferred contribution methods
Revert "Merge branch 'vcsrepo'"
Revert "Merge branch 'vcsrepo'"
Updating CHANGELOG for 2.7.2rc3
(#8704) Give better errors for invalid fileserver.conf
...
Manually Resolved Conflicts:
lib/puppet/parser/functions/versioncmp.rb
spec/integration/node/facts_spec.rb
|
| |
| |
| |
| |
| |
| | |
The versioncmp function's documentation was missing punctuation and was
unnecessarily vague. This commit clarifies the return data and makes the
documentation more legible at a glance.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Without this change native resource types declared using the
create_resources() function are not contained within the class scope of
the function call. As a result, resources were "floating off" in the
graph, disconnected from the rest of the relationship edges.
With this change, the scope is preserved and native resources are
contained by the class the function call is executed from.
Reviewed-by: Dan Bode <dan@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The mis-indented code, extra newlines, and commented out code were
noticed while investigating the order dependent test failure fixed in
4365c8ba.
Reviewed-by: Max Martin <max@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Ruby 1.9.2 does not accept a string for rand function, so rand('1')
fails even though this works in Ruby 1.8.x and the string is implicitly
converted to a number. We added to_i to avoid this bug.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When testing whether a file path is absolute, the regexp was only
handling POSIX style file paths. This commit requires Windows
style file paths to start with a drive letter. A future commit
will refacter the various places we do path validation to
support both Windows drive letters and UNC paths.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Given that we have the 'include?' method, this feature
is unnecessary, and it makes sense to convert to more
ruby-like behavior.
Any code that previously checked whether lookupvar
(or the new []) returned :undefined should now check
whether 'scope.include?(var)'. Thus, you can have
the same behavior, but it takes a bit different code
to get it.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We were previously storing the module name with
the environment instances as the key, which meant
if the environment instances were removed, we could
never get those modules again. Given that the
functions weren't reloaded, this meant the functions
were gone if we ever reloaded the environment.
This makes the Functions environment module resilient across
environment reloads, and it also makes the method work correctly
when handed either an environment or a string.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The capability was already there via to_hash, and
Enumerable was already included, but this method was
missing. Given the kind of hacking RI is doing,
this seemed appropriate.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is primarily for Hiera/DataLibrary support,
but is a decent idea regardless.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is again done to make support for hiera easier.
The way we were handling lookup of resource defaults
was over-complicated.
This does a decent bit of cleanup overall, but primarily
focused on resource type defaults and how they get
set during compilation.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We were previously not defaulting to an environment,
which is silly given that there's always a default. It
just made setup code harder. We now default to the default
environment.
This makes further testing involving scopes much easier.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The interface to scope is much clearer this way anyway,
but this is needed to integrate Puppet with Hiera[1].
It just provides hash-like behavior to Scope, which Hiera
and others can now easily rely on.
I also went through all of the code that used Scope#lookupvar
and Scope#setvar and changed it if possible, and at the same
time cleaned up a lot of tests that were unnecessarily stubbing
(and thus making it difficult to tell if I had actually broken
anything).
1 - https://github.com/ripienaar/hiera
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Without this change native resource types declared using the
create_resources() function are not contained within the class scope of
the function call. As a result, resources were "floating off" in the
graph, disconnected from the rest of the relationship edges.
With this change, the scope is preserved and native resources are
contained by the class the function call is executed from.
Reviewed-by: Dan Bode <dan@puppetlabs.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The mis-indented code, extra newlines, and commented out code were
noticed while investigating the order dependent test failure fixed in
4365c8ba.
Reviewed-by: Max Martin <max@puppetlabs.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 2.7.x: (40 commits)
(#7746) Fix bootstrap issues from #7717 fix.
(#7683) Use ronn, when available, to render the output.
(#7683) Add a 'man' face and subcommand to Puppet.
maint: remove obsolete work-around code from help face.
(#7699) Don't duplicate inherited action names on faces.
(#7177) Deprecate implicit 'puppet apply' for 2.7.0
(#7717) Layout cleanup for subcommand extraction.
#7211: Test unknown options don't shadow unknown actions.
#7211: nasty logic error with global Face options taking arguments.
#7211: more helpful error messages in various cases.
maint: Fix order dependent test failure
(#5966) Add support for hostname regular expressions in auth.conf
(#7708) Delete extended documentation from configuration reference
(#7707) Document signals in puppet agent and puppet master help
add puppet master polling step for ticket 7117
(#5318) Always notice changes to manifests when compiling.
(#5318) Always notice changes to manifests when compiling.
(#7557) Remove Faces Application
maint: Fix order dependent spec failure for face indirection
(#7690) Don't blow up when listing terminuses available for faces
...
Conflicts (resolved manually):
acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 2.6.x:
(#5318) Always notice changes to manifests when compiling.
(#7681) Add an acceptance test for resource refs with array variables
Conflicts (manually resolved):
lib/puppet/parser/compiler.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we are asked to compile a catalog we need to update the set of known
resource types, along with the node declaration, from the pool of manifests on
disk. This is, obviously, a per-environment pool of resource types.
To reduce the scope of the race where an update to those manifest files on
disk can be updated during a compilation, we tried to cache the set of known
resources in the current thread at the start of compilation, then flush it
after compile finished and used the cache unconditionally if it was set.
Theoretically, this would assure us that we would parse the set of manifests
once, use them for the entire compile, flush the cache, and then carry on.
Practically, this was enforced as described: flush *after* the compile, assume
this would mean that it was clear at the start of the next compile.
That presumably worked more or less right until a change was made to push
extra data into the catalog at the start of the 2.6 series; that made
serialization of the catalog depend on the pool of known resource types.
When that happened we would reload the cache (and reparse the manifests)
during serialization, but after compilation ... and leave that in the thread
cache, so the precondition for the compiler was no longer true. It would see
the cache as of the end of the previous compile run, not the start of the next
compile run.
This, in turn, was what made Puppet wait for multiple runs of the agent before
showing you a change in your manifests under Passenger, but *not* under
Webrick: Passenger would reuse the same thread for the next request, cache in
place, while Webrick would create a new thread and (by side-effect) "flush"
the cache as the compiler expected.
To minimally fix this, with as little change of side-effect as possible, we
move the cache flush from after compile runs to before compile runs.
This might have minimal memory cost until another compile request runs in the
same thread, because we cache the data longer, but most models won't cause
that to be too much trouble.
Reviewed-By: Matt Robinson <matt@puppetlabs.com>
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The commit df088c9ba16dce50c17a79920c1ac186db67b9e9 introduced a regression
where
$files = ["/tmp/one", "/tmp/two"]
file { "/tmp/one": content => "one", }
file { "/tmp/two": content => "two", }
file { "/tmp/three":
content => "three",
require => File[$files],
}
no longer worked. File[$files] was concatenating the elements of $files to
create a single title, instead of expanding to multiple File dependencies.
Since resource reference titles are implicitly wrapped in an array, if one of
the elements of that array is a variable containing an array, the list of
titles is a nested array. Prior to the change causing the regression, we would
flatten arrays when evaluating them, under certain circumstances. We no longer
ever flatten AST arrays when evaluating them, so anywhere that we really do
need a flattened array, we have to manually flatten it.
ResourceReference expects its list of titles to be a single, flat list of
titles, so we have to make it so.
Paired-with: Jacob Helwig <jacob@puppetlabs.com>
|
|\| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit unifies some paths in the grammar, which had previously been
duplicated to avoid shift/reduce conflicts. Merging these paths together and
separating only the conflicting structures leads to a cleaner grammar, with
fewer holes.
Several bugs are fixed as a result:
(#3129) Nested class names beginning with numbers work correctly
(#5268) Hyphens in class names work correctly
(#5817) Hashes and arrays can now be passed to functions (hashes require parentheses)
Additionally, expressions are now legal in most places where they would make
sense, when previously only bare rvalues were allowed.
Paired-With: Markus Roberts
Reviewed-By: Matt Robinson
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
* spec/unit/node/facts_spec.rb
Updates:
* spec/unit/interface/action{,_builder}_spec.rb
=> update for 'when_invoked' block being required.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
lib/puppet/parser/templatewrapper.rb#script_line was calling .first on a
String object, which in Ruby > 1.8.5 will return the entire string, but
in 1.8.5 will cause an exception. This change (proposed by Markus
Roberts) removes the call to .first and adds a condition for when the
template error involves the file not being found.
Reviewed-by: Jesse Wolfe
|
| |\ \ \
| | | |/
| | |/|
| | | |
| | | |
| | | |
| | | | |
Manually resolved conflicts:
lib/puppet/parser/resource.rb
lib/puppet/parser/scope.rb
spec/unit/parser/scope_spec.rb
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When we moved code from the compiler to parser/resource, we lost
a conditional that prevented defined resources from gaining containment
edges to stages. Adding a stage to a defined resource was usually
harmless, but it violated the invariant of "resources should only have
exactly one container as their direct parent", producing a 50% chance of
a malformed containment path in log messages.
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
For example:
stage{ pre: before => Stage[main] }
class someclass ($stage=pre ) { ... }
class { someclass: }
This transplants adding the edge from the resource to the stage from
the compiler into when the resource is evaluated. This moves adding
the stage edges to after when the defaults are copied into the
resources, making them available.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The watch_file mechanism would refuse to monitor paths to files that
didn't exist. This patch makes it possible to watch a file that hasn't
been created yet, so when it is created, you manifests will get
reparsed.
Backported this change to 2.6.x
Paired-With: Jacob Helwig <jacob@puppetlabs.com>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
used to be at info, so you had to run the master on verbose to
see it an ENC was trying to declare a class that could not be loaded.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
lib/puppet/parser/templatewrapper.rb#script_line was calling .first on a
String object, which in Ruby > 1.8.5 will return the entire string, but
in 1.8.5 will cause an exception. This change (proposed by Markus
Roberts) removes the call to .first and adds a condition for when the
template error involves the file not being found.
Reviewed-by: Jesse Wolfe
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we moved code from the compiler to parser/resource, we lost
a conditional that prevented defined resources from gaining containment
edges to stages. Adding a stage to a defined resource was usually
harmless, but it violated the invariant of "resources should only have
exactly one container as their direct parent", producing a 50% chance of
a malformed containment path in log messages.
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
|
|\ \ \
| |_|/
|/| |
| | |
| | | |
* tickets/2.7.x/4655-parameterized-classes-default-stages:
(#4655) Allow stage to be set using a default class parameter
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For example:
stage{ pre: before => Stage[main] }
class someclass ($stage=pre ) { ... }
class { someclass: }
This transplants adding the edge from the resource to the stage from
the compiler into when the resource is evaluated. This moves adding
the stage edges to after when the defaults are copied into the
resources, making them available.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
This modifies the deprecation warning to explicitly point out that the
specified behavior is deprecated, when it is slated to be removed,
along with what the user can do to prepare for its removal.
Paired-with: Randall Hansen <randall@puppetlabs.com>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 24a277c5e805ce16e0b86e17e6cb2fbe1945ae07.
Despite not needing --ignoreimport as an option anymore, it's still used
internally and has to stay.
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This was only used with --parseonly, which is gone.
Paired-With: Jesse Wolfe
|
| | |
| | |
| | |
| | |
| | |
| | | |
This has been removed in favor of 'puppet parser validate <manifest>'.
Paired-With: Jesse Wolfe
|