| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Utilising Augeas's SAVE_NEWFILE mode (similar to augtool -n) to
determine the changes that will be made be made by Augeas.
Output a unified diff to info
handle non-default root, and multiple files correctly
Adding tests for Augeas diff functionality
Add test for non-default :root when diff'ing
Ensure that multiple files are diffed if changed, not just one
Signed-off-by: Josh Cooper <josh@puppetlabs.com>
Reviewed-by: Jacob Helwig <jacob@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.7rc: (24 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.
(#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.
(#7557) Remove Faces Application
maint: Fix order dependent spec failure for face indirection
(#7690) Don't blow up when listing terminuses available for faces
maint: Dedup the loadpath so we don't have to walk it multiple times
Maint: Fix ellipses for short descriptions
(#7563) DRY: Remove indirector boilerplate from individual faces
...
Conflicts (resolved manually):
acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb
lib/puppet/application/faces.rb
lib/puppet/face/help/man.erb
lib/puppet/indirector/face.rb
spec/shared_behaviours/documentation_on_faces.rb
|
| | |\ \ \ |
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
So, turns out the fix in #7717 introduced a failure when starting the Puppet
master on some versions of Ruby. Weird stuff. I figured it out, eventually.
You see, the process of bootstrapping Puppet is ... complex. This file, like
many of our early initialization files, has an incestuous relationship between
the order of files loaded, code executed at load time, and code executed in
other files at runtime.
When we construct this object we have not yet actually loaded the global
puppet object, so we can't use any methods in it. That includes all the
logging stuff, which is used by the deprecation warning subsystem.
On the other hand, we can't just load the logging system, because that depends
on the top level Puppet module being bootstrapped. It doesn't actually load
the stuff it uses, though, for hysterical raisins.
Finally, we can't actually just load the top level Puppet module. This one is
precious: it turns out that some of the code loaded in the top level Puppet
module has a dependency on the run mode values.
Run mode is set correctly *only* when the application is loaded, and if it is
wrong when the top level code is brought in we end up with the wrong settings
scattered through some of the defaults.
Which means that we have a dependency cycle that runs:
1. The binary creates an instance of P::U::CL.
2. That identifies the application to load.
3. It does, then instantiates the application.
4. That sets the run-mode.
5. That then loads the top level Puppet module.
6. Finally, we get to where we can use the top level stuff
So, essentially, we see a dependency between runtime code in this file,
run-time code in the application, and load-time code in the top level module.
Which leads me to our current horrible hack: we stash away the message we
wanted to log about deprecation, then send it to our logging system once we
have done enough bootstrapping that it will, y'know, actually work.
I would have liked to fix this, but that is going to be a whole pile of work
digging through and decrufting all the global state from the local state, and
working out what depends on what else in the product.
Oh, and we use a global because we have *two* instances of a P::U::CL object
during the startup sequence. I don't know why.
Reviewed-By: Nigel Kersten <nigel@puppetlabs.com>
Reviewed-By: Nick Lewis <nick@puppetlabs.com>
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
|
| | |\ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We now look for ronn(1), and if it is available ask it to generate the *roff
output, delegate that to man(1) directly, and show the result to the user in
their pager.
If ronn(1) isn't available we delegate to $MANPAGER, $PAGER, less, most, or
more, in that order, to paginate the raw markdown. Not nearly so nice, but
better than doing nothing.
Finally, if none of those pagers are available we fall through to the default
behaviour of puppet rendering the output, which more or less results in a
direct dump to the console. Nice.
Reviewed-By: Nick Fagerlund <nick.fagerlund@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is the minimal wrapper, cloning a good deal of the logic from help, that
runs our face through the 'man' template and returns ronn-formatted Markdown.
This provides the crudest baseline possible for getting man-style output, but
lets us move forward to improve behaviour.
Reviewed-By: Nick Fagerlund <nick.fagerlund@puppetlabs.com>
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The application wrapper for help used to disable the inherited 'render' method
from FaceBase - specifically, to avoid the behaviour of rendering strings
poorly.
Now that we have support for good output in the upstream method, this is
unnecessary, so we can eliminate the stub method entirely and use the default
behaviour.
(This also enables rendering the help into JSON or YAML, against the odds that
someone actually cares about that. ;)
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We earlier moved to duplicating Action objects in the Faces subsystem to
ensure they had the correct binding context during execution and introspection.
This was correct, but introduced a bug where we would report both the parent
and child binding as separate entries with duplicate names, in the list of
actions.
This flowed on to the help output, where it would cause every inherited action
to be listed twice: once on the parent, once on the child. (This was actually
worse if the inheritance was deeper: we would duplicate once for every level
between the instance and the origin of the action.)
|
| | |\ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Back in prehistory (eg: 0.25 era), 'puppet' was the name for the agent, and
could be used directly to apply a manifest as well as to communicate with the
puppet master process.
During the 2.6 series we moved to a single binary, but continued to support
older scripts by detecting invocations that looked like the traditional
scripting uses and implicitly turning those into a call to 'puppet apply'.
Now, with the 2.7.0 release, we are moving to deprecate that behaviour. We
still do the same detection, and still run the old manifests, but we now
emit a deprecation warning directing people to use 'puppet apply' directly.
We intend to remove the behaviour entirely in the 2.8 release, which also
paves the way to nicer handling of the command line.
Reviewed-By: Randall Hansen <randall@puppetlabs.com>
Reviewed-By: Nick Fagerlund <nick.fagerlund@puppetlabs.com>
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This transforms the layout of the code, to make it easier to work with, but
makes no functional changes. Done separately to make clearer the functional
changes vs the non-functional changes.
|
| | |\ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Unknown options used to shadow unknown actions:
$ puppet node something_I_cannot_do --unknown-option
Could not parse options: invalid option: --unknown-option
The earlier changes have fixed this problem, but we now add extra testing to
make sure that we don't regress to the earlier state of play.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
A logic error meant that global Face options that took arguments were
mishandled: we never consumed the argument, so we read this:
puppet facts --render-as json find $(hostname)
...as meaning "invoke the 'json' action on the 'facts' face"...
This fixes that problem, so we now correctly handle both optional and
non-optional arguments to global Face options.
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We were emitting a bunch of unhelpful failure messages, surrounding invalid
actions and especially default actions interacting with the command-line.
This cleans those up, to give a helpful, informative, and correct message in
all cases. Notably, we no longer report that there is no "default" action
when you specify an unknown action on a face.
This change revealed some other weaknesses in our unit tests, now correctly,
that result in slightly more robust code.
|
| | |\ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The auto-generated references are meant to be pithy, dense, and fast -- to be
references, not guides. The configuration reference was front-loaded with
several pages of explanatory text that properly belongs in the guides on the
docs site. This commit removes that text in preparation for a reorganization of
the docs.
This is a doc string only commit.
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Previously, the signals accepted by the agent and master daemons were only
documented in the configuration reference, which didn't make any particular
sense. This commit moves their documentation to a blurb in the relevant
man pages.
This is a doc string only commit.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The test for ticket 7117 producedes spurious failures due to timing:
a curl command is executed from an agent to a freshly started
Puppet Master; if the Puppet Master is not ready to accept the connection
the test will fail. Added an until loop that issues simple curl
command to see if the Puppet Master is up and ready
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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>
|
| | |\ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* ticket/2.7rc/7557-remove_faces_application:
(#7557) Remove Faces Application
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It used to be that to list the faces available and their actions and
options, you had this legacy based face application. This functionality
has all been moved into the puppet help face application.
Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
|
| | |\ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
ticket/2.7rc/maint-doc_changes_without_failures
* ticket/2.7rc/maint-faces_docs_spec_fixes:
maint: Fix order dependent spec failure for face indirection
(#7690) Don't blow up when listing terminuses available for faces
maint: Dedup the loadpath so we don't have to walk it multiple times
Maint: Fix ellipses for short descriptions
Resolved Conflicts:
lib/puppet/interface/documentation.rb
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
An indirected face is being created in
spec/unit/application/indirection_base_spec.rb that uses a stubbed out
indirection. This stub didn't have a name method defined, which caused
the documentation_spec.rb, that does checks against every available
face, to blow up with:
expected no Exception, got #<NoMethodError: undefined method `to_sym' for nil:NilClass>
in lib/puppet/face/indirector/face.rb when listing the indirections for
the help text.
I toyed with creating a real indirection for the test, but that was
harder than expected.
Paired-with: Max Martin <max@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously, in order to list the available terminuses for an indirected
face we loaded all the the terminuses in order to list them. This meant
that if a terminus like active_record didn't have the dependencies it
needed, the documentation would raise errors and not list terminuses.
<Puppet::Error: Could not autoload filename uninitialized constant Object::ActiveRecord>
Now we just list the terminuses available in the load path without
trying to load them. The terminus will still raise an error if you try
to use it without its dependencies being met.
Paired-with: Max Martin <max@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If the user's path has duplicate entries, we end up looking at them
multiple times. This has bitten people in the past in that if you get a
lot of duplication it can make autloading a lot slower. Really the user
shouldn't be duplicating their path, but since we can't control that,
this is a safe fix to prevent them from having autoload slowness.
Paired-with: Max Martin <max@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously, we were adding ellipsis to any short_description, which was
misleading; they were only necessary when we were truncating in the _middle_ of
a paragraph.
This commit changes the behavior, and updates the tests to show when we expect
ellipsis.
Paired-with: Matt Robinson <matt@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Termini lists are now being generated in the help templates. This commit
removes the hardcoded lists from each of the affected faces.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is a rebase of the following commits:
* (#7563) Add a template for manpages
In order to generate manpages in a reasonably maintainable way, we need
to format text from the Faces help API for use with Ronn
(https://github.com/rtomayko/ronn/).
This commit adds a man template to the help templates folder; it has
been verified to generate Ronn-friendly input text. It isn't currently
called by any applications, but can be demonstrated by exchanging it for
face.erb.
* (#7634) Change ERB trim mode used in the Faces help API
<%= something -%> tags (note the minus) are unavoidably necessary at at
least one point in the Faces help templates. ERB objects instantiated
with the % trim mode will blow up horribly whenever one of these tags
appears.
This commit changes the trim mode to `-` and refactors all help
templates accordingly.
* (#7563) Refactor short help templates
This commit attempts to bring the short face and action help templates closer to the goals of fitting cleanly on one screen, fitting the prevailing *nix aesthetic, and being useful without overwhelming the user.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Faces help output relies on input from the documentation methods in each
of the faces to be documented. This commit calls those methods in each of our
faces, with varying levels of detail depending on their complexity.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Auto-generated short descriptions cut off at five lines with no
indication that they are truncated.
This commit adds ellipsis in brackets to indicate incompleteness.
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Since some actions take arguments and some do not, action synopses were
incomplete and ambiguous.
This commit adds a method for explicitly declaring what argument(s) an
action takes, and places the arguments at the appropriate spot in the
action's synopsis. By convention, individual arguments should be wrapped
in angle brackets.
|
| |\ \ \ \
| | | |/ /
| | |/| |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* 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>
|
| | |\ \ \ |
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | | |
Paired-with: Jacob Helwig <jacob@puppetlabs.com>
Reviewed-by: Dominic Maraglia <dominic@puppetlabs.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When running spec/unit/network/rights_spec.rb prior to
spec/unit/network/authstore_spec.rb, test failures occur due to the
AuthStore storing Declarations in current thread state. This is a
temporary fix (explicitly clearing thread state for each test run) until
the AuthStore can be modified to not rely on thread state. This commit
is a follow up to 9834dcdd.
Paired-with: Jacob Helwig <jacob@puppetlabs.com>
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* ticket/2.7.x/5966-auth-conf-hostname-regex:
(#5966) Add support for hostname regular expressions in auth.conf
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When hosting multiple applications (especially with different security levels),
you may not want to allow every client to read all the files required for
every other client. Currently it is possible to do this when your host and
domain names reasonably reflect that grouping, ex: hostXYZ.someapp.domain.com.
However, if you have a more flat naming convention, it is difficult to write
these ACLs. This patch adds support for matching hostnames with regular
expressions, thus extending the ACLs to allow:
path /file_content/secrets/appserver
allow /appserver[0-9]+.example.com$/
path /file_content/secrets/otherservice
allow /^(test-)crazy[0-9]+.pattern.(com|net)$/
Signed-off-by: Josh Cooper <josh@puppetlabs.com>
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* ticket/2.7.x/maint-faces_docs_spec_fixes:
maint: Fix order dependent spec failure for face indirection
(#7690) Don't blow up when listing terminuses available for faces
maint: Dedup the loadpath so we don't have to walk it multiple times
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
An indirected face is being created in
spec/unit/application/indirection_base_spec.rb that uses a stubbed out
indirection. This stub didn't have a name method defined, which caused
the documentation_spec.rb, that does checks against every available
face, to blow up with:
expected no Exception, got #<NoMethodError: undefined method `to_sym' for nil:NilClass>
in lib/puppet/face/indirector/face.rb when listing the indirections for
the help text.
I toyed with creating a real indirection for the test, but that was
harder than expected.
Paired-with: Max Martin <max@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously, in order to list the available terminuses for an indirected
face we loaded all the the terminuses in order to list them. This meant
that if a terminus like active_record didn't have the dependencies it
needed, the documentation would raise errors and not list terminuses.
<Puppet::Error: Could not autoload filename uninitialized constant Object::ActiveRecord>
Now we just list the terminuses available in the load path without
trying to load them. The terminus will still raise an error if you try
to use it without its dependencies being met.
Paired-with: Max Martin <max@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If the user's path has duplicate entries, we end up looking at them
multiple times. This has bitten people in the past in that if you get a
lot of duplication it can make autloading a lot slower. Really the user
shouldn't be duplicating their path, but since we can't control that,
this is a safe fix to prevent them from having autoload slowness.
Paired-with: Max Martin <max@puppetlabs.com>
|
| |\ \ \ \ \
| | |/ / / /
| |/| | / /
| | | |/ /
| | |/| | |
|
| | |\ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Paired-with: Jacob Helwig <jacob@puppetlabs.com>
Reviewed-by: Dominic Maraglia <dominic@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>
|