Re: [Puppet-dev] Switching from YAML and PSON to JSON

2014-10-26 Thread markus
use different names. Yay rails. > > > > All I remember now is that commit and Markus stroking his beard and > shaking his head a lot. :) That's funny. I remember it more as pulling on my beard, banging my head on the table, and whimpering "Why, why, why?!" -- M --

Re: [Puppet-dev] A question about numbers and representation

2014-09-01 Thread markus
> Most serialization formats can simply not deal with > 64 bit values as > regular numbers. They may do horrible things like truncation, or use > the max/min value if a value is too big, or for floating point > drastically lose precision. Eh. It's not that the serialization formats can't deal w

Re: [Puppet-dev] Re: Solving `if defined(Resource['name'])`

2014-02-19 Thread markus
> I'm not very fond of the idea of hardwiring special support for > Package resources into Puppet (nor for resources of any other specific > type). I still like my "constraints" idea, to which Felix directed > your attention, but if something like that is ever implemented then > adopting it will

Re: Anchor pattern (was Re: [Puppet-dev] Puppet 4 discussions)

2013-08-30 Thread markus
> But I also don't think there's fundamentally anything *wrong* with > using whits, since they accurately model the notion of containment, > with respect to order: classes have a "start", and a "finish", and > there's stuff in between. It doesn't really feel like a hack to me. > Ironically, they *

Re: [Puppet-dev] The future of known_resource_types and loading puppet manifests

2013-08-26 Thread markus
the directories. > > because it will rarely, if ever need to look at the filesystem to > > find a type. Never looking at the filesystem could be a significant semantic change. -- Markus -- You received this message because you are subscribed to the Google Groups "Puppet D

Re: [Puppet-dev] Cisco Networkdevice Module

2013-07-13 Thread Markus Burger
gt; > <mailto:nan...@gmail.com >> wrote: >> > >> > On Fri, Jul 12, 2013 at 8:19 AM, Brice Figureau >> > >> > <mailto:brice-...@daysofwonder.com >> wrote: >> > >> > On Fri, 2013-07-12 at 03:52 -0700, Mar

[Puppet-dev] Cisco Networkdevice Module

2013-07-12 Thread Markus Burger
We just released an internally developed puppet-networkdevice module in the hope that some other folks might be interested in it :). It's currently still in an early stage but should be pretty usable for the basic usecases. -> https://github.com/uniak/puppet-networkdevice ## Overview The Cisc

Re: [Puppet-dev] Parse command output in a privoder

2012-09-30 Thread markus
"This is a test" =~ /\bhis\b/i => nil irb(main):005:0> "This is a test" =~ /\bthis\b/i => 0 (Note that 0, meaning the start of the string, counts as true in ruby, while nil, meaning no match found, counts as false). -- Markus -- You received this message beca

[Puppet-dev] Re: puppetlabs_spec_helper and hiera

2012-06-23 Thread Markus Falb
era.yaml is not tried at all. I don't know how to properly debug this. Sorry for the long delay, Markus > On Sat, Jun 9, 2012 at 3:28 AM, Markus Falb wrote: > >> Hi, >> I tried the new puppetlabs_spec_helper and ran into the following. >> >> After I put hiera in

[Puppet-dev] puppetlabs_spec_helper and hiera

2012-06-09 Thread Markus Falb
I stumbled about something similar, see http://groups.google.com/group/puppet-dev/tree/browse_frm/thread/e47299ece604a2d2/38073019a03b487a I have no idea how or where to fix this. I use puppet 2.6.16 -- Kind Regards, Markus Falb signature.asc Description: OpenPGP digital signature

Re: [Puppet-dev] Taking github noise away from puppet-dev list

2012-04-10 Thread markus
> We have a goal to foster development discussion from the community. > Because of that, I am proposing we move the github notifications to a > new list, puppet-commits. I realize this may have a consequence of > reducing patch/commit discussion. This should be compensated by: > > 1. Still hav

Re: [Puppet-dev] Array type on custom provider

2012-03-07 Thread markus
;karmic-6GB-1' ], ) > --- > > and the type lines: > --- >newparam(:images) do > desc "..." >end > --- > > Is this usual/known? Am I doing something wrong? Puppet is trying to be too helpful and unwrapping your array for you. Try changi

Re: [Puppet-dev] Concerns about 0a3469752d1cd7d5b4835732204a48850214fb9d

2011-11-19 Thread markus
> This was committed such that all file diffs would go into the logs. > > Please be very vocal about announcing this and think about turning file diffs > off as the default. > > I think that most users are quite happy about being able to see diffs at the > command line but not in the system log

Re: [Puppet-dev] Types and provider insync?

2011-11-08 Thread markus
> I'm writing a custom insync? for a type and provider. So if you look > at the resource it's clearly a hash: > > 10 member => { '192.168.1.100:3306' => {} , > 11'192.168.1.101:3306' => {} }, > > I'm trying to figure out why @

Re: [Puppet-dev] thread safety issues in facter?

2011-09-28 Thread markus
> ...ah, and that is why they have trouble. They are trying to > statically discover the list of data, then bind facts to those values > once, rather than trusting to the cache layer in facter. > > They should pull all the logic into the setcode block, or a helper > called from it, and accept pe

Re: [Puppet-dev] thread safety issues in facter?

2011-09-28 Thread markus
> When talking to KW he said he ran into thread safety issues, hence why > he used a mutex. Has anyone seen this before? Its a concern because we > should be fixing cause not symptom ... Brice and I did a fair amount of thread safety cleanup in core at one point, but I don't recall much (if any)

Re: [Puppet-dev] (puppetlabs/puppet) New pull request: (#8986) Don't su when creating SSH authorized_keys

2011-08-30 Thread markus
On Mon, 2011-08-29 at 21:18 -0700, Patrick wrote: > Just to be clear, I think that should be: > > **By default** it demands permissions of 0700 or less, and ownership > by the users who is trying to authenticate, or it will simply bypass > the file and carry on to the next authentication mechanism

[Puppet-dev] Re: [PATCH 1/1] Add insync? checks to Onyx Point Concat module

2011-06-14 Thread Markus Falb
fragment = @resource[:name].split('+')[1..-1].join('+') > + frag_file = "/var/lib/puppet/concat/fragments/#{group}/#{fragment}" > + > + if File.exist?(frag_file) > +data = File.read(frag_file) > +if data == @resource[:cont

[Puppet-dev] Re: [PATCH 1/1] Add insync? checks to Onyx Point Concat module

2011-06-12 Thread Markus Falb
should have received a copy of the GNU General Public License > along with > # this program. If not, see <http://www.gnu.org/licenses/>. > # > + > +include Puppet::Util::Diff > + > Puppet::Type.newtype(:concat_fragment) do >@doc = "Create a concat fr

Re: [Puppet-dev] [PATCH/facter 1/1] (#6792) Added osfamily fact.

2011-06-09 Thread markus
> > > > Huge +1 > > > > Because you've reviewed it, or because you think it's a good idea? > One convention that works (for me at least) is to use complex numbers where the real part is for the actual code and the imaginary part is for the idea. Thus (+1+1i) means "Oh yeah, we need this and

Re: [Puppet-dev] 2.7.0-0.rc-latest with ruby 1.9.2 notes

2011-06-08 Thread markus
ot;@@methods" to "Schedule_methods" and see if that works. If it does, you can submit it as a patch; if it doesn't, try "::Scedule_scales" and "::Scedule_methods" which is uglier but should definitely fix it. -- Markus -- You received this message because

Re: [Puppet-dev] [PATCH/puppet 1/1] (#7788) Allow gem directories to be searched while autoloading

2011-06-06 Thread markus
probable should be documented somewhere, but not on each instance of the pattern. -- Markus -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from t

Re: [Puppet-dev] [PATCH/puppet 1/1] (#7788) Allow gem directories to be searched while autoloading

2011-06-05 Thread markus
+1 On Sun, 2011-06-05 at 09:12 +0100, R.I.Pienaar wrote: > This allows rubygems to be used to extend or override puppet behavior. > > Unfortunately the features system uses the autoloader so checking for > the rubygems feature causes a call loop. It's possible that a more > elegant way to avoid

Re: [Puppet-dev] [PATCH/puppet 1/1] (#7788) Allow gem directories to be searched while autoloading

2011-06-04 Thread markus
the ensure block (in other words, make sure you're applying it on top of something with the fix for #5318 (commit:68c106e3ef192) in it. > running the specs with an added Thread.current[:gemsearch_directories] = nil > in both cases doesnt kill my machine like before or make more tests fai

Re: [Puppet-dev] [PATCH/puppet 1/1] (#7788) Allow gem directories to be searched while autoloading

2011-06-04 Thread markus
hat. Also, if you are going to follow the per-compile pattern of module_dir (which seems reasonable) you should also clear the thread var (see lib/puppet/configurer.rb around line 160) so that it doesn't get stale. -- Markus -- You received this message because you are subscribed to th

Re: [Puppet-dev] [PATCH/puppet 1/3] Fix #5777 - rule interpolation broke auth.conf CIDR rules

2011-05-30 Thread markus
-- as if allow will pass anything that doesn't raise an error, even if "auth.allowed?(request)" returns false. Should perhaps the "true" line be removed, or am I just missing the intent? -- Markus -- You received this message because you are subscribed to the Google

Re: [Puppet-dev] [PATCH] (#5318) Always notice changes to manifests when compiling.

2011-05-27 Thread markus
> Thanks for the really nice investigation and explanation, I definitely > +1 this patch (even though I'm unaffected). Ditto on the +1; it has the side benefit on making the comment describing how things work in node/environment.rb correct again. -- M -- You received this message because yo

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-23 Thread markus
rminate gibberish. For this and similar reasons I like Dan's "fail at design/testing time if we can't infer it" approach better here. -- Markus -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to thi

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread markus
ks like a good way to handle it & should work fine, assuming things are all in the right places and called correctly, etc. Shout if you get stuck & need help debugging it. -- Markus -- You received this message because you are subscribed to the Google Groups "Puppet Developers"

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread markus
attributes.first] if key_attributes.length == 1 ].compact ...but could (on a type-by-type basis) include things like: [:username,"@",:host,".",:domain] or [:protocol,":",:port] ...or whatever to build parsible titles as needed. -- Mark

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread markus
ually fixes it rather than just hiding it by setting the name to the title so it can later set the title to the name. I think what's really needed is to have hash2resource be smarter about assigning a title...which may be what you're saying as well. -- Markus -- You received this message be

Re: [Puppet-dev] Re: [PATCH/puppet 1/1] (#7291) Monkeypatch Symbol class with #sub method in ruby 1.9

2011-05-10 Thread markus
t; >dsl = setter.to_s.sub(/=$/, '') > > Yeah, that looks right to me. :) You might want to intern it (since it was originally a symbol and the proposed code leaves it as a string): dsl = setter.to_s.sub(/=$/, '').intern -- Markus P.S. I don't think a monk

Re: [Puppet-dev] Wrong spec but passes anyways?!

2011-04-12 Thread Markus Roberts
I happen to do that quite frequently I'm afraid. > Sorry if it created some issues. I didn't expect (no pun intended) that > it wasn't working (and I'm positive this used to work). > > > Expecting a stubbed method never wasn't working, however expecting a > > stubbed method >= once behaved as expec

Re: [Puppet-dev] Wrong spec but passes anyways?!

2011-04-12 Thread Markus Roberts
S -- I'm currrently looking at the specs for the ssh_authorized_key provider. > There are two tests that give me a headache: > >it "should create the directory if it doesn't exist" do > File.stubs(:exist?).with(@dir).returns false > Dir.expects(:mkdir).with(@dir,0700) > @provide

Re: [Puppet-dev] Wrong spec but passes anyways?!

2011-04-12 Thread Markus Roberts
S -- I'm currrently looking at the specs for the ssh_authorized_key provider. >> There are two tests that give me a headache: >> >>it "should create the directory if it doesn't exist" do >> File.stubs(:exist?).with(@dir).returns false >> Dir.expects(:mkdir).with(@dir,0700) >> @

Re: [Puppet-dev] feature resource_application_order against next

2011-04-08 Thread Markus Roberts
Brice -- > This is a rather complex set of structural changes. But to understand it > you > > really only need to grasp two key sections; the rest is cleanup. > > Can you explain for people like me that didn't had time to try to > understand the patch what it brings, how (roughly) the internals >

[Puppet-dev] [PATCH/puppet 1/2] (#6490) Add plugin initialization callback system to core

2011-04-06 Thread Markus Roberts
ct => ... ) after_application_run_command( :application_object => ... ) on_commandline_initialization(:command_line_object => ... ) on_application_initialization(:appliation_object => ... ) Paired-with: Daniel Pitman Signed-off-by: Markus Roberts --- lib/puppet/applicat

[Puppet-dev] [PATCH/puppet 2/2] (maint) Indentation fixes

2011-04-06 Thread Markus Roberts
Signed-off-by: Markus Roberts --- lib/puppet/application.rb |8 lib/puppet/util/command_line.rb | 20 +--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/lib/puppet/application.rb b/lib/puppet/application.rb index 5e69bae..a028a15 100644

[Puppet-dev] [PATCH/puppet 8/8] (5200) -- replace containers with sentinals

2011-04-06 Thread Markus Roberts
fact that some one-step edges are now two-step edges and tests, event propagation, etc. need to reflect that. Paired-with: Jesse Wolfe Signed-off-by: Markus Roberts --- Local-branch: feature/next/resource_application_order lib/puppet/resource/catalog.rb | 64 - lib

[Puppet-dev] [PATCH/puppet 6/8] (6911) Core change -- replace topsort with frontier ordered by salted SHA1

2011-04-06 Thread Markus Roberts
0, #6810, and #6944 which may simplify or complicate their resolution. Paired-with: Jesse Wolfe Signed-off-by: Markus Roberts --- Local-branch: feature/next/resource_application_order lib/puppet/simple_graph.rb|8 +++ lib/puppet/transaction.rb

[Puppet-dev] [PATCH/puppet 7/8] (6911) Cleanup and renaming of transaction internals

2011-04-06 Thread Markus Roberts
The preceeding changes left some rough edges in the Transactions (a short, badly named method that was only used in one place and would be clearer in- line, a return value that was carfully retained and never used, etc.) This commit clears some of that up. Signed-off-by: Markus Roberts --- Local

[Puppet-dev] [PATCH/puppet 5/8] (6911) Add bookkeeping facade around Transaction#relationship_graph

2011-04-06 Thread Markus Roberts
d the property used to cheat Demeter which has the apropriate lifetime and can be used to hold the state information durring a traversal. Paired-with: Jesse Wolfe Signed-off-by: Markus Roberts --- Local-branch: feature/next/resource_application_order lib/puppet/transaction.rb |

[Puppet-dev] [PATCH/puppet 4/8] (6911) Cleanup of generate_additional_resources

2011-04-06 Thread Markus Roberts
The previous commit left only one meaningful value for the method parameter of generate_additional_resources, making it a constant not a parameter. This commit removes it. Paired-with: Jesse Wolfe Signed-off-by: Markus Roberts --- Local-branch: feature/next/resource_application_order lib

[Puppet-dev] [PATCH/puppet 3/8] (6911) Refactor to localize eval_generate dependency assumptions

2011-04-06 Thread Markus Roberts
aining the original semantic. Paired-with: Jesse Wolfe Signed-off-by: Markus Roberts --- Local-branch: feature/next/resource_application_order lib/puppet/resource/catalog.rb | 42 lib/puppet/transaction.rb | 107 ++-- lib/p

[Puppet-dev] [PATCH/puppet 1/8] (6911) Use normal methods to implement "depthfirst?" test

2011-04-06 Thread Markus Roberts
aired-with: Jesse Wolfe Signed-off-by: Markus Roberts --- Local-branch: feature/next/resource_application_order lib/puppet/type.rb |8 +--- lib/puppet/type/file.rb |2 -- lib/puppet/type/tidy.rb |4 +++- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/p

[Puppet-dev] feature resource_application_order against next

2011-04-06 Thread Markus Roberts
This is a rather complex set of structural changes. But to understand it you really only need to grasp two key sections; the rest is cleanup. Cleanup commits: The thrust of these is to localize the code that we are going to change (the itterator over the dependency graph) and get all th

[Puppet-dev] [PATCH/puppet 2/8] (maint) Fix for require order issue

2011-04-06 Thread Markus Roberts
The recent AIX work added a dependency on Puppet::Parameter::Keyvalue in the group type, but didn't add the requisite require, causing failures under some load orders. Signed-off-by: Markus Roberts --- Local-branch: feature/next/resource_application_order lib/puppet/type/group.rb |1

Re: [Puppet-dev] [PATCH/puppet 1/1] Fixed #3127 - Fixed gem selection regex

2011-04-04 Thread markus
#x27;puppet/provider/package' > > require 'uri' > > +require 'pp' > > seems unnecessary to me and probably a debug leftover? That's the only explanation I can think of. :) -- Markus -- You received this message because you are subscribed t

Re: [Puppet-dev] RFC on #5158: Make source/content parameters and the file/template functions consistent.

2011-03-28 Thread Markus Roberts
> We’re also going to introduce a concatenation function called “cat”. > Note there is already a concatenation operator in puppet (from lib/puppet/parser/ast/leaf.rb): class Concat < AST::Leaf def evaluate(scope) @value.collect { |x| x.evaluate(scope) }.collect{ |x| x == :undef ? ''

Re: [Puppet-dev] [PATCH/puppet 1/3] (#5660) New Type to handle /etc/services entries

2011-03-28 Thread Markus Roberts
> +def self.title_patterns > + [ > +# we have two title_patterns "name" and "name:protocol". We won't > use > +# one pattern (that will eventually set :protocol to nil) because > we > +# want to use a default value for :protocol. And that does only > work > +

Re: [Puppet-dev] [PATCH/puppet 2/3] Fixing Module#path detection

2011-03-28 Thread Markus Roberts
D -- For some reason FileTest.exist? was returning false, > and FileTest.directory? returns true. > >> > >> […] > >>> At best, we have some leaky stubbing in a tests or some other > confounding > >>> factor (but nothing that should require changing lib-code); at worst, > we > >>> have so

Re: [Puppet-dev] [PATCH/puppet 2/3] Fixing Module#path detection

2011-03-28 Thread Markus Roberts
L -- For some reason FileTest.exist? was returning false, > and FileTest.directory? returns true. > > > # Find this module in the modulepath. > def path > -environment.modulepath.collect { |path| File.join(path, name) }.find { > |d| FileTest.exist?(d) } > +environment.modulepath.collec

Re: [Puppet-dev] (#5660) Puppet should handle port entries in /etc/services with a native type

2011-03-22 Thread Markus Roberts
> >validate do |value| > > raise Puppet::Error, "number has to be numeric, not #{value}" > unless value =~ /^[0-9]+$/ > > -raise Puppet::Error, "number #{value} out of range" unless > (0...2**16).include?(Integer(value)) > > just out of curiosity: Will (0...2**16) generate

Re: [Puppet-dev] RFC: Splitting up the file{} type functionality.

2011-03-21 Thread Markus Roberts
> I thing that recursive copies are the type that fits worst into the current > code; I suggest we move that out and then wait and see if symlinks should > follow or not. > The match with symlinks qua symlinks is pretty hideous as well. It just looks a little less lumpy because it's been hammered

Re: [Puppet-dev] [PATCH/facter] (#6795) xendomains: Ignore error output from xm list

2011-03-21 Thread Markus Roberts
On Mon, Mar 21, 2011 at 8:23 AM, Todd Zullinger wrote: > If xend is not running, xm list writes to stderr and facter propagates > this to the user. Redirect stderr to /dev/null. > --- > lib/facter/util/xendomains.rb |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/

Re: [Puppet-dev] Managing network devices in core

2011-03-18 Thread Markus Roberts
> This is mostly to Brice, but I figure others are interested. >> >> We've been looking at what it will take to get the network device support >> prototype as implemented by Brice into core, along with the fact that we'll >> be producing the RC1 for statler on April 13, and I don't think it will ma

Re: [Puppet-dev] Splitting exec type into type & provider

2011-03-18 Thread Markus Roberts
> On Fri, Mar 18, 2011 at 11:36 AM, Markus Roberts > wrote: > > One thought, looking through the code (I haven't given it a thorough read > > yet) is that it may make sense to split the MS Windows provider off from > the > > posixs provider (though that'

Re: [Puppet-dev] Debugging Puppet on Windows

2011-03-18 Thread Markus Roberts
On Fri, Mar 18, 2011 at 12:07 PM, Jay Flowers wrote: > I finally got some more time to work on this. I ended up getting RubyMine > setup and configured for me to develop and debug with. > > I logged a bug on this: > https://projects.puppetlabs.com/issues/6773 > > If someone can give me a clue I

Re: [Puppet-dev] Managing network devices in core

2011-03-18 Thread Markus Roberts
This is mostly to Brice, but I figure others are interested. > > We've been looking at what it will take to get the network device support > prototype as implemented by Brice into core, along with the fact that we'll > be producing the RC1 for statler on April 13, and I don't think it will make > t

Re: [Puppet-dev] Splitting exec type into type & provider

2011-03-18 Thread Markus Roberts
One thought, looking through the code (I haven't given it a thorough read yet) is that it may make sense to split the MS Windows provider off from the posixs provider (though that's out of scope here, I think). -- M --- When in trouble or in

Re: [Puppet-dev] Re: Yaml output not quite right from puppet api

2011-03-16 Thread Markus Roberts
>> I am very new to yaml so I have to research your suggestions. It > >> sounds like I'll need to create an object for the yaml output to map > >> to though. > >> > >> I'll respond back in the thread once I figure this out. > > > > It looks likr pyyaml does support loading foreign types (by mappin

Re: [Puppet-dev] Re: Yaml output not quite right from puppet api

2011-03-15 Thread Markus Roberts
On Tue, Mar 15, 2011 at 3:45 PM, Corey Osman wrote: > I am very new to yaml so I have to research your suggestions. It > sounds like I'll need to create an object for the yaml output to map > to though. > > I'll respond back in the thread once I figure this out. > It looks likr pyyaml does supp

Re: [Puppet-dev] Yaml output not quite right from puppet api

2011-03-15 Thread Markus Roberts
Corey -- I mentioned this before in a previous post but I can't find that post. > > Anyways, I am using the puppet api rest interface and my python yaml > parser doesn't like the output given. Exactly what parser are you > guys using to encode your objects into Yaml? I don't know why my > parser

Re: [Puppet-dev] Re: Help with creating a python puppet module using curl "pycurl" and auth.conf issues

2011-03-15 Thread Markus Roberts
;ve updated the ticket for this bug ( http://projects.puppetlabs.com/issues/5010) to make it clearer what's going on. Sorry for any headaches it caused you. -- Markus --- When in trouble or in doubt, run in circles, scream and shout.

Re: [Puppet-dev] Re: Help with creating a python puppet module using curl "pycurl" and auth.conf issues

2011-03-14 Thread Markus Roberts
icode; the routine that emits that message explicitly permits "no" so...? -- Markus --- When in trouble or in doubt, run in circles, scream and shout. -- 1920's parody of the maritime general prudential rule ---

Re: [Puppet-dev] Debugging Puppet on Windows

2011-03-13 Thread Markus Roberts
J -- On Sun, Mar 13, 2011 at 3:29 PM, Jay Flowers wrote: > Markus, > I found the getting the source page and am trying to follow it. I can > install facter. I get the following error when trying to install puppet: > > C:\Projects\Puppet\puppet>ruby install.rb > Missing ro

Re: [Puppet-dev] Debugging Puppet on Windows

2011-03-13 Thread Markus Roberts
sion. As for #6693, it is ringing a bell (possibly a regression which was fixed but then reintroduced?) but I'm not finding it in a quick search. I'll update the ticket if I do. -- Markus --- When in trouble or in doubt, run in cir

Re: [Puppet-dev] [PATCH/puppet 1/1] Maint: Added the ability to replace the behavior of Puppet::Util.execute with an arbitrary code block for ease in spec testing.

2011-03-08 Thread Markus Roberts
','local','/Volumes/foo_disk') { # verify that we don't try to call "mount" redundantly @mounted.should == false check_fstab @mounted = true '' } Puppet::Util::ExecutionStub('/sbin/umount','/Volumes/foo_disk'

Re: [Puppet-dev] Proposal: JSON serialization schema testing

2011-03-08 Thread Markus Roberts
> - Vendor the "json_shape" library, a lightweight JSON schema validator ( > https://github.com/jes5199/json_shape). > > I'm fully in support of this proposal, with one caveat: The definition of > 'vendor'. Do you mean creating a vendor directly in the puppet repo and > adding it as a gem there,

Re: [Puppet-dev] [PATCH/puppet 1/1] Maint: Added the ability to replace the behavior of Puppet::Util.execute with an arbitrary code block for ease in spec testing.

2011-03-07 Thread Markus Roberts
P -- I'm not particularly proud of this code, but I don't see an alternative that > I like better. Eliminating Puppet::Util::ExecutionStub in favor of a global > variable seems very clumsy (not to mention that it would leave no place to > put comments warning that it is intended for spec testing

Re: [Puppet-dev] [PATCH/puppet 1/1] Maint: Added the ability to replace the behavior of Puppet::Util.execute with an arbitrary code block for ease in spec testing.

2011-03-07 Thread Markus Roberts
Am I missing something, or is this: --- /dev/null > +++ b/lib/puppet/util/execution_stub.rb > @@ -0,0 +1,26 @@ > +module Puppet::Util > + class ExecutionStub > +class << self > + # Set a stub block that Puppet::Util.execute() should invoke instead > + # of actually executing command

Re: [Puppet-dev] Environment settings.

2011-03-07 Thread Markus Roberts
N -- What changed in 2.6.x with regard to functional settings in [environment] > blocks? > > Have we documented the list of functional settings anywhere? > > What settings are currently not functional in an [environment] block and > would be desirable to make functional? > I'm not sure I under st

Re: [Puppet-dev] Re: [puppet-dev] RBAC for Dashboard and Puppet

2011-03-07 Thread Markus Roberts
So going back to the initial proposal that James made: It occurs to me that the logical extension of a Dashboard RBAC system (or perhaps even moving elements of the problem upstream) is for auth.conf to recognize users or perhaps better "roles" as an authentication construct. This seems like a ve

Re: [Puppet-dev] Composite namevar

2011-03-07 Thread Markus Roberts
ight be forced to change by things we discovered once it saw use and 2) the nested array stricture was seen as a little awkward for users. But by this point, yeah, it's probably better to have it documented than to have it languish in obscurity. -- Markus --

Re: [Puppet-dev] RBAC for Dashboard and Puppet

2011-03-05 Thread Markus Roberts
J -- > It occurs to me that the logical extension of a Dashboard RBAC system > > (or perhaps even moving elements of the problem upstream) is for > > auth.conf to recognize users or perhaps better "roles" as an > > authentication construct. > > > > > > I like. There would be some

Re: [Puppet-dev] RBAC for Dashboard and Puppet

2011-03-05 Thread Markus Roberts
J -- It occurs to me that the logical extension of a Dashboard RBAC system > (or perhaps even moving elements of the problem upstream) is for > auth.conf to recognize users or perhaps better "roles" as an > authentication construct. > I like. There would be some details that should be sorted out

Re: [Puppet-dev] Composite namevar

2011-03-04 Thread Markus Roberts
> The title_pattern method is used in resource.rb in the parse_title > method. It will expect that you return an (not really intuitive) array > of the form > > [ [ regex1, ARRAY ], [ regex2, ARRAY ] ] > > with ARRAY = [ [:namevar1, proc_that_is_called_with_namevar1], ... > ,[:namevarN, proc ] ] > >

Re: [Puppet-dev] Proposal: add universal assertions on logs to puppet spec tests.

2011-03-04 Thread Markus Roberts
> What I mean is this: > > * My understanding is that the goal is to fail when any warning or higher > logs get sent that the tests don't expect > > * My experience is that immediate failure with resulting stack trace is > always easier to debug than delayed failure > > * Thus, my proposal, which

Re: [Puppet-dev] Composite namevar

2011-03-04 Thread Markus Roberts
on, I suspect it probably raises ~3 more; at least, that's what always happened to me when we were first exploring this space, and Dan followed a similar trajectory as I recall. Feel free to ask them as they occur to you. -- Markus --- Whe

Re: [Puppet-dev] Proposal: add universal assertions on logs to puppet spec tests.

2011-03-04 Thread Markus Roberts
> > > > This would terminate the operating code inside puppet at that point; > >> > now logging is fatal, and there is no mechanism to suppress that. If >> > it wasn't for that property I would pretty much entirely agree. >> >> Huh; not sure why it's a bad thing to terminate the processing here,

Re: [Puppet-dev] Proposal: add universal assertions on logs to puppet spec tests.

2011-03-04 Thread Markus Roberts
> > This would terminate the operating code inside puppet at that point; > > now logging is fatal, and there is no mechanism to suppress that. If > > it wasn't for that property I would pretty much entirely agree. > > Huh; not sure why it's a bad thing to terminate the processing here, since > th

Re: [Puppet-dev] [PATCH/puppet 1/2] Fixed #6555 - Ruby 1.9.x warning: class variable access from toplevel

2011-03-02 Thread Markus Roberts
+1 On Wed, Mar 2, 2011 at 12:47 PM, James Turnbull wrote: > This came from the use of the @@colormap class variable. > > The variables has been changed to a constant. > > Signed-off-by: James Turnbull > --- > lib/puppet/util/log/destinations.rb |6 +++--- > 1 files changed, 3 insertions(+),

Re: [Puppet-dev] [PATCH/puppet 2/2] Fixed #6555 - Ruby 1.9.x returning Invalid next (SyntaxError)

2011-03-02 Thread Markus Roberts
On Wed, Mar 2, 2011 at 12:47 PM, James Turnbull wrote: > The kick application has the option to ping hosts. On 1.9.x this > code was returning "Invalid next". The next in this code has been > replaced with an exit. Testing has confirmed this doesn't change the > behavior of puppet kick. > +1 The

Re: [Puppet-dev] Discussion for fixing 2.6.5 regression around :absent -> correct_value changes.

2011-03-02 Thread Markus Roberts
R.I. -- >> I'm not sure that the "how it got in there" part is irrelevant (for >> instance, I'd like if you could confirm that state.yaml shows >> type=>absent on a node that has not been upgraded, and note the > yes, all my nodes have it - before upgrading. and people on IRC also > has it witho

Re: [Puppet-dev] Discussion for fixing 2.6.5 regression around :absent -> correct_value changes.

2011-03-02 Thread Markus Roberts
gt; fix at the same time we start auditing. (Without the fix, it's > > > much worse, > > > as R.I. documented). > > > > all agreed. Thanks for clarifying and tightening the language Markus. > > > > I mis-characterized the situation because I was unde

Re: [Puppet-dev] Discussion for fixing 2.6.5 regression around :absent -> correct_value changes.

2011-03-01 Thread Markus Roberts
N -- > That is reassuring. > > > > I think if we peel away: > > > > * the "always auditing" bug > > Yes. I believe this is fixed by Jesse's patch you reviewed: > > > https://github.com/puppetlabs/puppet/commit/e3dfe41ce7da108fc345e58c7df8c1576ea951a0 > > > * the "audits notify" surprise > > This i

Re: [Puppet-dev] Discussion for fixing 2.6.5 regression around :absent -> correct_value changes.

2011-03-01 Thread Markus Roberts
If you were on 2.6.4 (and probably earlier) and > if you managed a file with the source parameter and > if the local file was absent or content differed, we wrote out: > >!ruby/sym type: !ruby/sym absent !ruby/sym owner: !ruby/sym absent > > to state.yaml, even if you weren't auditing.

Re: [Puppet-dev] Discussion for fixing 2.6.5 regression around :absent -> correct_value changes.

2011-03-01 Thread Markus Roberts
I'm having trouble framing a response, in part because I think the question is posed at the wrong level. Specifically, rather than talking about the "symbols" that are being written to state.yaml we should be asking about the conditions that they signify. The question as posed sounds as if it's a

Re: Style question ( wasRe: [Puppet-dev] [PATCH/facter 1/1] Fixes #6521 and other Ruby 1.9 issues)

2011-03-01 Thread markus
On Tue, 2011-03-01 at 10:20 -0800, Matt Robinson wrote: > On Tue, Mar 1, 2011 at 5:29 AM, James Turnbull wrote: > > James Turnbull wrote: > >> > >> diff --git a/lib/facter/util/virtual.rb b/lib/facter/util/virtual.rb > >> index 129448e..06b1b6d 100644 > >> --- a/lib/facter/util/virtual.rb > >> +++

Re: [Puppet-dev] Re: [Puppet Users] Puppet Parse Trees (for a lint checker)

2011-03-01 Thread Markus Roberts
; or some such to skip the stuff I don't care about. Not sure if that's useful info, but I figured it might be. -- Markus --- When in trouble or in doubt, run in circles, scream and shout. -- 1920's parody of the maritime general

Re: [Puppet-dev] Re: ANNOUNCE: Puppet 2.6.5 released!

2011-03-01 Thread Markus Roberts
> > > What are you updating from? Is it possibly that this is related to > > > the update and not the audit bug...that is, if you update a node to > > > a version with the audit bug fixed, such as the current 2.6.next > > > (HEAD), does it restart the services? > > > > 2.6.4 release to 2.6.5 releas

Re: [Puppet-dev] Re: ANNOUNCE: Puppet 2.6.5 released!

2011-03-01 Thread Markus Roberts
> > What are you updating from? Is it possibly that this is related to > > the update and not the audit bug...that is, if you update a node to > > a version with the audit bug fixed, such as the current 2.6.next > > (HEAD), does it restart the services? > > 2.6.4 release to 2.6.5 release. If I upd

Re: [Puppet-dev] Re: ANNOUNCE: Puppet 2.6.5 released!

2011-03-01 Thread Markus Roberts
R.I. -- > > Worse it seems changing auditing sends notifies: > > > > > > Mar 1 08:55:57 monitor2 puppet-agent[9797]: > > > (/Stage[main]/Mcollective::Config/File[/etc/mcollective/policies/]) > > > Scheduling refresh of Service[mcollective] > > > Mar 1 08:56:01 monitor2 puppet-agent[9797]: > > >

Re: [Puppet-dev] RFC: Database-backed inventory service plan

2011-02-28 Thread Markus Roberts
I am not a DBA, but I've seen the following pattern play out many times: the DBA says "normalize, normalize!" the developers say "normalizing is a pain, and in this particular case it doesn't buy us much, etc." and down the road the DBA turns out to have been right. Then the developers rediscover

Re: [Puppet-dev] [PATCH/puppet 1/8] Instrumentation foundation layer

2011-02-27 Thread Markus Roberts
B - > + def self.listeners_of(label) > > +synchronize { > > + @listeners_of[label] ||= @listeners.select do |k,l| > > +l.listen_to?(label) > > + end > > +} > > + end > > > > > > Does this (due to memoization) omit listeners who are added afte

Re: [Puppet-dev] [PATCH/puppet 3/8] Add a way to add probe to puppet code

2011-02-27 Thread Markus Roberts
B -- > 2) Would you get a more useful stack-trace without the rescue? > > Actually the first version didn't had the rescue, but I had some issues > and I wanted to print the exception, it apparently escaped the garbage > collection. > > Now, I thought that a straight raise would rethrow the except

Re: [Puppet-dev] [PATCH/puppet 1/8] Instrumentation foundation layer

2011-02-27 Thread Markus Roberts
B -- > + # Triggers an instrumentation > + # > + # Call this method around the instrumentation point > + # Puppet::Util::Instrumentation.instrument(:my_long_computation) do > + # ... a long computation > + # end > + # > + # This will send an event to all the listeners of "my_long_

Re: [Puppet-dev] [PATCH/puppet 3/8] Add a way to add probe to puppet code

2011-02-27 Thread Markus Roberts
B -- Thoughts: 1) Wow. > +def enable > + raise "Probe already enabled" if enabled? > + method = @method > + label = @label > + data = @data > + klass.class_eval { > +alias_method("instrumented_#{method}", method) > +define_method(method) do |*args| >

Re: [Puppet-dev] Interfaces are now instances

2011-02-25 Thread Markus Roberts
>> 2) you have to be careful with interpolation, in any case, as there are > > scope changes to watch out for. > > Can you elaborate on this? > Sure. You can do this, and it works: x = [1,2,3] class << x def sum_of_squares collect { |x| x*x }.inject { |a,b| a+b } end end p x.su

Re: [Puppet-dev] mount provider discussion

2011-02-25 Thread Markus Roberts
P & S -- The one I currently dont know how to address (besides splitting the > current type in two fstab-only mount-only types) is #5991 > I have to say that this one appeals to me a lot for some reason, though I'm not as deep in the weeds as the two of you and may be missing subtleties. I think

  1   2   3   4   5   6   7   8   9   10   >