| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
expanded
correctly.
This was working for defined resources in the db, but not in the current compile.
I just had to mark the resources as non-exported.
|
|
|
|
|
|
|
| |
The problem was that I was using a 'return' in a loop where
I should have been using a 'next'.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The append variable operator can be used to append something to
a variable defined in a parent scope, containing either a string
or an array.
The main use is to append array elements in classes to a variable
globally defined in a node.
Example:
$ssh_users = ['brice', 'admin1']
class backup {
$ssh_users += ['backup_operator']
...
}
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
| |
the lib/puppet/parser/functions directory. New functions should be
created in this directory.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resource parameters whose values are a resource reference (ie require,
notify...) where always DELETEd/INSERTed because the code comparing
resource reference compared object instances instead of their values
(since Puppet::Parser::Resource::Reference doesn't override == ), leading
to storeconfig performance issues.
The correct fix would have been to define == in Puppet::Parser::Resource::Reference
but that might introduce some side effects I don't know.
Hence, the fix introduces a local compare() method that knows how to
compare Puppet::Parser::Resource::Reference.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
|
|
|
|
|
|
| |
We should deprecate the method_missing stuff in 0.25.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wrapper.
This helps resolve redmine #1427, by providing a safe mechanism to access variables.
* Implement Puppet::Parser::Scope#to_hash, which returns a hash containing all the
variable bindings in the current and, optionally, parent scope.
* Use that to set instance member variables into Puppet::Parser::Templatewrapper
* Report the time taken for variable binding at debug level, to help identify any
performance regression that is encountered in the real world.
* Rename the @scope and @file members of the template wrapper, to avoid clashing
with a scope variable exposed within puppet.
Signed-off-by: Daniel Pittman <daniel@rimspace.net>
(cherry picked from commit ba220b41e4f509f2632e2664d332e49b20a70ea7)
|
| |
|
|
|
|
|
|
| |
Removed logic to reuse parser and log on server when there is a parsing error.
Now we just make a new parser and if there is an error, raise it up, which will result in errors on the client logs.
|
|
|
|
|
| |
Exporting or collecting resources no longer raises an exception
when no storeconfigs is enabled, it just produces a warning.
|
| |
|
|
|
|
| |
Also slightly modified the wording of some of the tests.
|
| |
|
|
|
|
| |
This is related to #1215.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
compile node configurations, rather than using the Configuration
handler, which was never used directly. I removed the Configuration
handler as a result.
Modified the 'master' handler (responsible for sending configurations
to clients) to always return Time.now as its compile date, so
configurations will always get recompiled.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
files, thanks to work by Adam Jacob and Arjuna Christenson
(the finding, not the leak). I'm going to act like this
fixes #1131, at least for now, but I doubt it does,
since that shows general memory growth over time, whereas
the leak here should go away as soon as files are reparsed
(because the parser is holding the reference to the leaking
array).
|
|
|
|
|
|
| |
stacked metaparameter values do not result in all resources
that receive a given default also getting those stacked
values.
|
|
|
|
|
| |
were getting finished multiple times, which meant they
got multiple copies of metaparams.
|
|
|
|
|
|
| |
in which statements are evaluated, which means that case
statements can now set variables that are used by other
variables.
|
|
|
|
| |
reparsing during a single run.
|
|
|
|
|
|
| |
look resources up, which means there's no concern about
not finding the resource, which is where the nil was coming
from. We now just iterate over the vertices.
|
|
|
|
|
|
| |
if the class had already been evaluated, but this was only
being run into in corner cases -- mostly where one class
included another class, I assume.
|
|
|
|
|
|
| |
resources whether they're isomorphic, and they in turn
ask the resource types (or default to true for defined
resource types).
|
| |
|
| |
|
| |
|
|
|
|
| |
tags in sql.
|
|
|
|
|
| |
including not compiling the configurations, and also storeconfigs
is no longer required during parse-testing.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
*sworn* I did this weekend). In the process, I fixed
a couple of bugs related to differentiating between
nodes and classes, and then cleaned up quite a few
error messages.
|
| |
| |
| |
| | |
removing the bangs from 'add_vertex!' and 'add_edge!'.
|
| |
| |
| |
| |
| | |
since it's stupid to have a class named after
a verb.
|
| |
| |
| |
| |
| | |
and the AST::Node class to match that to
the definitions and AST classes.
|
| |
| |
| |
| |
| | |
be more internally consistent (switched store_resource
to add_resource, and store_override to add_override).
|
| |
| |
| |
| |
| |
| | |
refactored, fixing this problem and making the whole interplay
between the classes, definitions, and nodes, and the Compile class much
cleaner.
|
| |
| |
| |
| |
| | |
as its resource container, instead of having its own behaviour
around resource uniqueness.
|
| |
| |
| |
| |
| |
| | |
rspec, so I can refactor the class to more heavily rely
on a Node::Catalog instead of doing its own resource
container management.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
just returns a resource from its evaluate() method, and
all of the work is done in the evaluate_code method. This
makes the code cleaner, because it means 1) evaluate() has
the same prototype as all of the other AST classes,
2) evaluate() is no longer called indirectly through
the Parser Resource class, and 3) the classes themselves
are responsible for creating the resources, rather than
it being done in the Compile class.
|
| |
| |
| |
| |
| |
| | |
all of the evaluate() methods only ever accepted a scope,
and sometimes one other option, so I switched them all to
use named arguments instead of a hash.
|
| | |
|
| | |
|
|\ \ |
|
| |/
| |
| |
| | |
complain. This fixes #933
|
| |
| |
| |
| | |
longer ignored. (Cherry-picked from master.)
|