| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We treat the regex relatively plainly, but this is
more reasonable than just '*'.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Max Martin <max@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There's no value in including the code when we convert a resource
type to JSON, since you can't convert it back again, so this removes
it.
I also cleaned up a few of the other attributes which were
producing unnecessary information.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Reviewed-by: Daniel Pittman <daniel@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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the master failed to run the External Node Classifier script it
would log an error on the master, but the agent didn't get back the full
error or the stack trace for it's logs. By raising when there's an ENC
script problem on the master, this causes the error messages to
propagate to the agent.
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
|
| |
| |
| |
| |
| |
| |
| | |
This was added while developing in order to benchmark, but wasn't removed
before committing.
Reviewed-By: Jacob Helwig
|
| |
| |
| |
| |
| |
| |
| |
| | |
This terminus behaves the same on all supported DB platforms, by performing a
limited portion of its query in SQL, and the rest of the comparison in Ruby.
Its results are consistent with the YAML terminus.
Paired-With: Jesse Wolfe
|
| |
| |
| |
| |
| | |
This is not necessary because fact values are always strings, and it wasn't
doing the unnecessary job it was expected to do anyway.
|
| |
| |
| |
| | |
This had been conflating hosts and nodes, when nodes is the most accurate.
|
| |
| |
| |
| |
| |
| |
| | |
Timestamps are currently the only supported metadata for searching.
Paired-With: Max Martin
Reviewed-By: Jacob Helwig
|
| |
| |
| |
| |
| | |
Paired-With: Max Martin
Reviewed-By: Jacob Helwig
|
| |
| |
| |
| |
| |
| |
| |
| | |
So far this terminus only supports find and save. Search is forthcoming. It
uses two new tables (inventory_host and inventory_facts) so that it won't
interact with storedconfigs.
Paired-With: Jacob Helwig
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
The inventory indirection was just providing the search method for facts.
Because the route is now facts_search instead of inventory, it can just be
implemented as the search method for facts.
Reviewed-By: Daniel Pittman
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 2.6.x:
Updated CHANGELOG for 2.6.5rc5
(#6337) Fix Ruby warning on 1.8.6 about "future compatibility"
(#6353) Restore the ability to store paths in the filebucket
(#6126) Puppet inspect now reports status after run completes.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Commit 2274d5104f6e413a2b8899a3c3111a17bbb2f4d7 optimized network
usage for the case where a file is already in the filebucket.
However, it took away the ability to store paths.
This change restores the ability to store paths while maintaining
optimal network usage for the case where the file is already in the
filebucket with the given path. This is expected to be the most
common case.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Puppet masters can now set the inventory_server and inventory_port
option to point to another puppet master that will function as the
central inventory service. When agents connect to the
puppet master, this will send fact data from the puppet master over REST
to the inventory service.
The puppet master itself will still store the client fact data in the
local yaml dir by setting the cache class to yaml.
Getting puppet masters to talk to each other using certs is difficult.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | | |
It is now possible to specify queries in the form “meta.timestamp.xx”
where xx is eq,ne,gt,lt,ge,le when searching the inventory service.
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This REST interface returns a list of nodes that match a fact query.
Fact queries can use (in)equality testing as a string comparison, and >,
<, >=, <= numerical comparisons. Multiple tests can be done as AND
comparisons, not OR.
The fact queries need to be prefixed by facts, and the comparisons other
than equality are specified with a .comparison_type after the fact name.
This will be better explained in the REST documentation on the website.
Searches that don't match anything now return empty array instead of a
404 error.
Conflicts:
spec/spec_helper.rb
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |\
| | |
| | |
| | |
| | | |
* ticket/2.6.next/3165:
Fix #3165 Ralsh (bin/puppet resource) can't manage files
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is based on the patch submitted by Owen Smith.
File management was being blocked by two problems: an obsolete, broken
`instances` method for the file type,
and a bug in the way resource/ral handled slashes in resource names.
This patch makes two changes to Owen's version:
1) our unit tests caught an
unexpected ruby quirk:
"text/".split("/")
and
"text/".split("/", 2)
do not return the same values.
2) File.instances now reproduces the old behavior of listing files in
the root directory. This is now implemented in terms of the existing
file recursion feature.
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 2.6.x: (21 commits)
(#5900) Include ResourceStatus#failed in serialized reports
(#5882) Added error-handling for bucketing files in puppet inspect
(#5882) Added error-handling to puppet inspect when auditing
(#5171) Made "puppet inspect" upload audited files to a file bucket
Prep for #5171: Added a missing require to inspect application.
Locked Puppet license to GPLv2
(#5838) Support paths as part of file bucket requests.
(#5838) Improve the quality of file bucket specs.
(#5838) Make file bucket dipper efficient when saving a file that already exists
(#5838) Implemented the "head" method for FileBucketFile::File terminus.
(#5838) Reworked file dipper spec to perform less stubbing.
(#5838) Added support for HEAD requests to the indirector.
(#5838) Refactored error handling logic into find_in_cache.
(#5838) Refactored Puppet::Network::Rights#fail_on_deny
maint: Remove unused Rakefile in spec directory
(#5171) Made filebucket able to perform diffs
(#5710) Removed unnecessary calls to insync?
Prep for fixing #5710: Refactor stub provider in resource harness spec
Maint: test partial resource failure
maint: Inspect reports should have audited = true on events
...
Manually Resolved Conflicts:
lib/puppet/file_bucket/dipper.rb
lib/puppet/indirector.rb
lib/puppet/network/rest_authconfig.rb
spec/unit/file_bucket/dipper_spec.rb
spec/unit/file_bucket/file_spec.rb
spec/unit/indirector_spec.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In versions of Puppet 2.6.0-2.6.4, file bucket requests are of the
form md5/<checksum>/<path>. The path functionality has been removed,
however we still need to support requests coming from older clients.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In order to do this it was necessary to refactor FileBucketFile to
untangle responsibilities for computing paths, reading files, etc. In
the process, removed speculative generalizations and unused
functionality.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added the ability for the indirector to handle REST HEAD requests.
These are done using a new indirector method, head(), which should
return true if find() would return a result and false if find() would
return nil.
Access control for the head method is the union of that for the find
and save methods. That is, if either find or save is allowed, then
head is allowed. This is necessary so that users will not have to
change their authconfig to take advantage of the new feature.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Moved the error handling logic surrounding the call to
Puppet::Indirector::Indirection#find_in_cache() into the
find_in_cache() method itself, so that won't need to be duplicated
when find_in_cache() is called from elsewhere.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is now possible to ask the filebucket to diff two files using a URL
of the form:
https://puppet/production/file_bucket_file/md5/{first file hash}?diff_with={second file hash}
The returned diff is a string, the output of the "diff" command.
Paired-with: Paul Berry <paul@puppetlabs.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An entire environment object was being stored in a string field,
causing the ZAML form of the environment to be stored. This was
over-ridden to return just the ZAML serialized version of the name.
Since the hosts model didn't know how to interpret a serialized
value, it just returned the ZAML string as the environment. This
patch stringifies the environment before putting it in the hosts
table, which stores it properly.
This patch also introduces a new method of testing using Tableless
ActiveRecord models, which emulate their database schema. This
helps to eliminate some stubbing, but it is still impossible to
fully and accurately test all ActiveRecord interactions without a
real database.
Paired-With: Matt Robinson
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
The first argument was often nil, and the second was mandatory.
|
| |
| |
| |
| |
| |
| | |
Replaced uses of the find, search, destroy, and expire methods on
model classes with direct calls to the indirection objects. Also
removed the old methods that delegated to the indirection object.
|
|\ \
| | |
| | |
| | |
| | | |
Manually resolved conflicts:
spec/unit/configurer_spec.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Using the cache terminus system, when --report is on, we are now
caching the last report as a yaml file in the $lastrunreport file
(which by default is $statedir/last_run_report.yaml).
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|\ \ \
| |/ /
|/| /
| |/
| |
| | |
Resolved conflicts manually:
spec/integration/indirector/bucket_file/rest_spec.rb
spec/integration/indirector/certificate_revocation_list/rest_spec.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a behavior change. Before this patch, we always used the currently
connected node's certname to compile the catalog, despite the value of
the catalog URI REST request.
With this patch we now use the URI as the compiled node name.
This is safe because the default auth.conf (and default inserted rules
when no auth.conf is present) only allow the given connected node to
compile its own catalog.
But this also allows for greater flexibility with auth.conf. For instance
it can be used by a monitoring system to check multiple nodes catalogs
with only one certificate:
path ~ ^/catalog/([^/]+)$
method find
allow $1
allow monitoring-station.domain.com
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Puppet masters can now set the inventory_server and inventory_port
option to point to another puppet master that will function as the
central inventory service. When agents connect to the
puppet master, this will send fact data from the puppet master over REST
to the inventory service.
The puppet master itself will still store the client fact data in the
local yaml dir by setting the cache class to yaml.
Getting puppet masters to talk to each other using certs is difficult.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| |
| |
| |
| |
| | |
It is now possible to specify queries in the form “meta.timestamp.xx”
where xx is eq,ne,gt,lt,ge,le when searching the inventory service.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch causes the puppet master to re-timestamp facts when they are
received by the catalog compiler terminus. This makes the timestamps
more trustworthy, as it means that they are all based upon the same
clock's time.
Paired-With: Paul Berry <paul@puppetlabs.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This REST interface returns a list of nodes that match a fact query.
Fact queries can use (in)equality testing as a string comparison, and >,
<, >=, <= numerical comparisons. Multiple tests can be done as AND
comparisons, not OR.
The fact queries need to be prefixed by facts, and the comparisons other
than equality are specified with a .comparison_type after the fact name.
This will be better explained in the REST documentation on the website.
Searches that don't match anything now return empty array instead of a
404 error.
|
| |
|
|
|
|
|
|
|
| |
This basically involved adding a search method to the yaml indirector, which I
did by copying the one from ssl_file and fiddling with it until the tests
passed. Since the most straight forward way to do this required extending the
interface to the path method I added tests for the additional behaviour.
|
|
|
|
| |
A contributor has requested that his changes be removed from puppet.
|
| |
|
|
|
|
|
|
|
|
|
| |
The patch for #3904 should not have been accepted; it's buggy and the use case
(supporting having nodes in ldap more than once with the same name but distinct
records) is ill-conceived.
This commit reverts the patch (a7884b47) and the previous attempt to fix it
(e6709da4), restoring the old (0.25.x) behaviour.
|
|
|
|
|
|
|
| |
It looks like a merge went wrong and we were returning abruptely
from a benchmark block, thus jumping over a precious log information.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|