| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ /
| |
| |
| | |
Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
|
| |
| |
| |
| | |
Paired-With: Jesse Wolfe
|
| |
| |
| |
| |
| |
| | |
This fix implements the same logic as Nick & Paul's patch in a different way.
There aren't any tests yet and I'm still working out if I agree with the
handling of some edge cases, so this should be considered premliminary.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds an options hash to lookupvar analogous to the one taken by
setvar and uses it to pass in source location for error reporting. It also
fixes the mechanism used by setvar (file was not being passed correctly), adds
line and file information to errors in templates, and extends/corrects tests.
As presently written it does not gather userful line numbers from inline
templates and there are no tests for the template line number generation.
|
| |
| |
| |
| |
| |
| |
| | |
Scope#lookup_qualified_var was a "magic bag" that took a qualified variable
name apart and called back in to lookupvar with a new scope. This commit is
a semantically neutral refactor that replaces it with a function to find the
desired scope as a pure function (with error detection).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The logic for distinguishing dynamic / static scopes was borrowed from Nick &
Paul's patch, the main differences here being 1) calling it "dynamic" (true/
false) rather than "parent_relationship" (:inherited/:dynamic) 2) aligning the
default so that it only needs to get set in one place (the one that will
eventually go away) and 3) setting it on createion rather than with a setter.
Setting it in one place, on creation, also makes it easier to see that anytime
we access a scope it will have the correct setting of Scope#dynamic and that
this does not change.
This commit also contains a minor refactor (removing Type#subscope) that is not
strictly tied to the main purpose but lies in the direction we are needing to
go and it simplified things to do it now.
|
| |
| |
| |
| |
| |
| |
| | |
One of the uses of lookupvar was in the method Scope#strinterp; this method
is no longer used (string interpolation is now handled by the parser (for
the syntax) and AST nodes (for the semantics)) so this use of lookupvar can
be excised, along with a fair amount of surrounding code.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
When we lookup a global variable / fact from code we should explicitly look
in the global scope.
|
| |
| |
| |
| | |
This attribute is apparently no longer set or accessed.
|
| |
| |
| |
| |
| | |
The Scope#topscope? method was never called anywhere (including tests) and
so far as I can tell was incorrect as the Scope#level is never being set.
|
|\ \
| | |
| | |
| | | |
into next
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This function allows you to dynamically generate resources,
passing them as a hash to the create_resources function.
This was originally written to be used together with an ENC.
Resources can be programitally generated as yaml and passed to a class.
classes:
webserver::instances:
instances:
instance1:
foo: bar
instance2:
foo: blah
Then puppet code can consume the hash parameters and convert then into resources
class webserver::instances (
$instances = {}
) {
create_resources('webserver::instance', $instances)
}
Now I can dynamically determine how webserver instances are deployed to nodes
by updating the YAML files.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In Ruby 1.9 you have to require 'digest/md5' instead of just 'md5'. The
following irb sessions from each version of Ruby should explain the changes in
how MD5 is used between Ruby versions and why this patch was made.
ruby-1.9.2-p136 :001 > require 'md5'
LoadError: no such file to load -- md5
ruby-1.9.2-p136 :002 > require 'digest/md5'
=> true
ruby-1.9.2-p136 :003 > Digest::MD5.hexdigest('mystring')
=> "169319501261c644a58610f967e8f9d0"
ruby-1.9.2-p136 :004 > Digest::MD5.new('mystring')
=> #<Digest::MD5: d41d8cd98f00b204e9800998ecf8427e>
ruby-1.8.7-p330 :001 > require 'digest/md5'
=> []
ruby-1.8.7-p330 :002 > require 'md5'
=> ["MD5"]
ruby-1.8.7-p330 :003 > Digest::MD5.hexdigest('mystring')
=> "169319501261c644a58610f967e8f9d0"
ruby-1.8.7-p330 :004 > MD5.new('mystring')
=> #<MD5: 169319501261c644a58610f967e8f9d0>
ruby-1.8.7-p330 :005 > MD5.new('mystring').to_s
=> "169319501261c644a58610f967e8f9d0"
ruby-1.8.7-p330 :006 > Digest::MD5.new('mystring')
ArgumentError: wrong number of arguments (1 for 0)
Reviewed-by: 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.
Paired-With: Max Martin <max@puppetlabs.com>
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
|
|\ \ \
| |/ /
|/| |
| | | |
next
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously we could only find types from site.pp, but
we now automatically load the specified type (for find)
or all types.
This also adds a TypeLoader#import_all capable of importing
all manifests (ruby or puppet) on a given system.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.x: (36 commits)
Updated CHANGELOG for 2.6.7rc1
(#5073) Download plugins even if you're filtering on tags
Fix #5610: Prevent unnecessary RAL lookups
Revert "Merge branch 'ticket/2.6.x/5605' of git://github.com/stschulte/puppet into 2.6.next"
(#6723) Fix withenv environment restoration bug
(#6689) Remove extraneous include of Puppet::Util in InventoryActiveRecord
Remove extra trailing whitespace from lib/puppet/resource.rb
(#5428) More fully "stub" Puppet::Resource::Reference for use with storedconfigs
(#6707) Fix typo in rest_authconfig.rb
(#6689) Make inventory_active_record terminus search quickly
(#5392) Give a better error when realizing a non-existant resource
(#2645) Adding a less-stubby test to verify the "system" attribute's behavior
Update CHANGELOG for 2.6.6
maint: Remove serialization of InventoryFact values
maint: Rename InventoryHost to InventoryNode
Fixed #2645 - Added support for creating system users
maint: Remove spec run noise
maint:Refactor of mount provider integration tests
(#6338) Support searching on metadata in InventoryActiveRecord terminus
(#6338) Implement search for InventoryActiveRecord facts terminus
...
This merge includes essentially reverting #4904's change to the mount
type since tests that came in from 2.6.x specified different
behavior and what's correct is not clear to me. I've reopened #4904 and
added it to our backlog, and talked to Nigel about the RFC that's
currently out on the puppet-users mailing list for a bigger refactor of
how the mount provider works.
Manually Resolved Conflicts:
spec/spec_helper.rb
spec/unit/indirector/queue_spec.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
You can reproduce the error with a simple manifest
Bogus_type <| title == 'foo' |>
We used to fail because find_resource_type returned nil and we never
checked if it was nil before calling methods on it.
Reviewed-by: Max Martin <max@puppetlabs.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit e3c59df2b246fe5e764272f21b631a5d2f28687f.
This commit is being reverted because the solution is incomplete, and a better
solution is out of scope for this release. A more complete solution will be
implemented in the future.
|
| |/
| |
| |
| |
| |
| |
| | |
Older version control systems like CVS and SVN used to use these $Id$
tags for version information.
Paired-with: Nick Lewis
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
function(-1) was failing because the grammar wasn't allowing negated values in
function calls. This fix makes the negation of any value which was previously
legal as a function argument also now legal as a function argument.
Paired-With: Max Martin
Paired-With: Markus Roberts
|
| |\
| | |
| | |
| | | |
parser.rb manually rebuilt to resolve global grammer chances.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The following manifest was failing:
$hash = { 'a' => { 'b' => { 'c' => 'it works' } } }
$out = $hash['a']['b']['c']
because of a typo in the grammar.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | | |
The automatically generated parser.rb needed to be rebuilt to make the syntax
changes functional; this commits only that rebuild.
|
| |\ \
| | | |
| | | |
| | | | |
bug/2.6.next/5516-hashes-can't-be-used-in-selectors
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The following manifest was producing a parse error:
$int = { 'eth0' => 'bla' }
$foo = $int['eth0'] ? {
'bla' => 'foo',
default => 'bleh'
}
because selectors didn't support hash access.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |\ \
| | | |
| | | |
| | | | |
bug/2.6.next/5720-puppetdoc-fails-on-parameterized-class
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It appears that the fix for #5252 wasn't complete, and class, nodes and
definition were still using the current lexer line number instead of
the line number of the class/define/node token.
This combined with some missing comments stack pushing/pop on parenthesis
prevented puppetdoc to correctly get the documentation of some class (including
parametrized ones).
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The following manifest was crashing puppetdoc:
class test {
include "test::$operatingsystem"
}
Because the quoted string is "rendered" as a concat AST, which in turn
ended being an array when entering RDoc.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
* Repaired a 2-indent/4-indent issue that kept a code block from being recognized
* Wrapped literal strings in backticks to format as code and protect from Markdown
* Added note about backslashes for escaping metacharacters.
|
| |/
| |
| |
| |
| |
| | |
* Fixed ULs being interpreted as code blocks
* Changed an example for variety.
* Turned set of paragraphs inside a LI into a nested list.
|
| |
| |
| |
| |
| |
| |
| |
| | |
into next"
This reverts commit 448a439f5abc3d51accececb678e9c5f547f7615, reversing
changes made to 06939c51a3f675137b53fac8a521132a4c9cfcbe.
As per discussion in http://projects.puppetlabs.com/issues/5691#note-5
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Here is an attempt to cover with process name probes some of the longest
parts of a puppet agent or master.
Currently:
* node compilation
* individual resource evaluation
* some configurer parts
* individual network requests
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
* tickets/2.6.x/5564:
Fixed #5564 - Added some more fqdn_rand documentation
|
| | | |
| | | |
| | | |
| | | | |
Reviewed-by: Paul Berry <paul@puppetlabs.com>
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* ticket/2.6.next/5045:
(#5045) Cleaning up some tests and code
(#5045) External node classifiers should be able to specify params for classes
(#5045) Adds support to resource/type to also accept a param hash
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Renamed some variables to be clearer, made tests use less stubbing,
added some additional tests and got rid of some unecessary logic.
Paired-with: Dan Bode
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It facilitates the support for param classes from the ENC. It adds
support for classes to be passed as a hash to the evaluate_classes
method. If a hash of classes is specified, it also evaluates duplicates.
I also had to convert the hash to an array for tags to be applied
correctly.
Reviewed-by: Matt Robinson
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
supported use of this function.
Final patch in this series reviewed by Dan Bode.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Fixing use of define/declare; editing for clarity.
|
| |/ / /
| | | |
| | | |
| | | | |
The differences in the way defined() handles different types of entities weren't well-explained. Documentation was also added for the behavior of defined(Node["somenode.domain.com"]).
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|