Re: [Puppet Users] Quick question about types/providers
Turned out restarting the puppet master was the solution. Drove me insane for a while, but now all but a couple of things have started to work. I've posted about one of them in a separate thread. On Sun, Mar 1, 2015 at 2:58 PM Felix Frank felix.fr...@alumni.tu-berlin.de wrote: Can you make your code available somewhere, so that we can reproduce? Generally, I'd like to second John's general advice: Do restart your Puppet processes to make sure that changes to your Ruby code take effect. Best, Felix On 02/27/2015 09:22 PM, Peter Berghold wrote: I think I discovered something, correct me if I'm in the weeds with this. Seems certain patterns cannot be used as parameters for a type. So far on my list version ipv4listen rndcport that last one baffles me. bindconfigure { $mypersonality: # ipv4listen=any, ipv6listen=any, # rndcport=951, statsport=8080, named='-n 2', ztp=no, m_notify=no, transfer=none, version='9.9.5-S1', state=on, notify= Service['named-all'] } anybody see anything objectionable here? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/54F36F6C.6070205%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv04GFXFMaG1APKffL8bs4DMFM76QsTttBVz%2Bs2i%3DXWqTw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Quick question about types/providers
Can you make your code available somewhere, so that we can reproduce? Generally, I'd like to second John's general advice: Do restart your Puppet processes to make sure that changes to your Ruby code take effect. Best, Felix On 02/27/2015 09:22 PM, Peter Berghold wrote: I think I discovered something, correct me if I'm in the weeds with this. Seems certain patterns cannot be used as parameters for a type. So far on my list version ipv4listen rndcport that last one baffles me. bindconfigure { $mypersonality: # ipv4listen=any, ipv6listen=any, # rndcport=951, statsport=8080, named='-n 2', ztp=no, m_notify=no, transfer=none, version='9.9.5-S1', state=on, notify= Service['named-all'] } anybody see anything objectionable here? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/54F36F6C.6070205%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Quick question about types/providers
Hi Peter, This might help: http://www.slideshare.net/PuppetLabs/puppet-type-and-provider-execution-presentation Thanks, Trevor On Fri, Feb 27, 2015 at 11:13 AM, Peter Berghold salty.cowd...@gmail.com wrote: that's exactly what I was after. Since this is my first type/provider pair I'm proceeding cautiously. On Fri, Feb 27, 2015 at 11:09 AM Felix Frank felix.fr...@alumni.tu-berlin.de wrote: On 02/27/2015 05:02 PM, Peter Berghold wrote: can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? Yes, this is basically a getter/setter pair. However, the idempotency is implemented closer to the type layer. The transaction code will check whether properties are out of sync, and invoke the provider = methods to take action if necessary. On this higher level, your assertion should hold true. But I'm not sure if that's what you were asking. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Quick question about types/providers
On 02/27/2015 05:02 PM, Peter Berghold wrote: can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? Yes, this is basically a getter/setter pair. However, the idempotency is implemented closer to the type layer. The transaction code will check whether properties are out of sync, and invoke the provider = methods to take action if necessary. On this higher level, your assertion should hold true. But I'm not sure if that's what you were asking. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Quick question about types/providers
that's exactly what I was after. Since this is my first type/provider pair I'm proceeding cautiously. On Fri, Feb 27, 2015 at 11:09 AM Felix Frank felix.fr...@alumni.tu-berlin.de wrote: On 02/27/2015 05:02 PM, Peter Berghold wrote: can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? Yes, this is basically a getter/setter pair. However, the idempotency is implemented closer to the type layer. The transaction code will check whether properties are out of sync, and invoke the provider = methods to take action if necessary. On this higher level, your assertion should hold true. But I'm not sure if that's what you were asking. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Quick question about types/providers
Using the example of the file provider that is bundled with puppet here is a sniglet of code that I've zoomed in on: def mode if stat = resource.stat return (stat.mode 00).to_s(8) else return :absent end end def mode=(value) begin File.chmod(value.to_i(8), resource[:path]) rescue = detail error = Puppet::Error.new(failed to set mode #{mode} on #{resource[:path]}: #{detail.message}) error.set_backtrace detail.backtrace raise error end end can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv1VzxEgTLO8xv44GcPA0FKboQgEhVTLe%3DM2%2BY%2BMTO%2BAqQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Quick question about types/providers
So, I wrote my type and its provider. Have a bunch of params and of course the first one I try to use newparam(:ipv4listen) do desc the ipv4listen param end doesn't seem to be seen by the Puppet infrastructure. Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter ipv4listen on Bindconfigure[MOB_OAM_SVC] at /etc/puppet/environments/POC/modules/multibind/manifests/mob_oam_svc.pp:22 on node CLIENT Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run So obviously I'm missing something here... Thoughts? Wish there was an equivalent to Perl's Data::Dumper that would let me see what parameters Puppet things are defined. On Fri, Feb 27, 2015 at 12:25 PM Trevor Vaughan tvaug...@onyxpoint.com wrote: Hi Peter, This might help: http://www.slideshare.net/PuppetLabs/puppet-type-and-provider-execution-presentation Thanks, Trevor On Fri, Feb 27, 2015 at 11:13 AM, Peter Berghold salty.cowd...@gmail.com wrote: that's exactly what I was after. Since this is my first type/provider pair I'm proceeding cautiously. On Fri, Feb 27, 2015 at 11:09 AM Felix Frank felix.fr...@alumni.tu-berlin.de wrote: On 02/27/2015 05:02 PM, Peter Berghold wrote: can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? Yes, this is basically a getter/setter pair. However, the idempotency is implemented closer to the type layer. The transaction code will check whether properties are out of sync, and invoke the provider = methods to take action if necessary. On this higher level, your assertion should hold true. But I'm not sure if that's what you were asking. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv3hgXjYxbr0MeunP-M5dNnFZchKNT3fJ%2B8MYTOep5bqGA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Quick question about types/providers
I think I discovered something, correct me if I'm in the weeds with this. Seems certain patterns cannot be used as parameters for a type. So far on my list version ipv4listen rndcport that last one baffles me. bindconfigure { $mypersonality: # ipv4listen=any, ipv6listen=any, # rndcport=951, statsport=8080, named='-n 2', ztp=no, m_notify=no, transfer=none, version='9.9.5-S1', state=on, notify= Service['named-all'] } anybody see anything objectionable here? On Fri, Feb 27, 2015 at 2:21 PM Peter Berghold salty.cowd...@gmail.com wrote: So, I wrote my type and its provider. Have a bunch of params and of course the first one I try to use newparam(:ipv4listen) do desc the ipv4listen param end doesn't seem to be seen by the Puppet infrastructure. Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter ipv4listen on Bindconfigure[MOB_OAM_SVC] at /etc/puppet/environments/POC/modules/multibind/manifests/mob_oam_svc.pp:22 on node CLIENT Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run So obviously I'm missing something here... Thoughts? Wish there was an equivalent to Perl's Data::Dumper that would let me see what parameters Puppet things are defined. On Fri, Feb 27, 2015 at 12:25 PM Trevor Vaughan tvaug...@onyxpoint.com wrote: Hi Peter, This might help: http://www.slideshare.net/PuppetLabs/puppet-type-and- provider-execution-presentation Thanks, Trevor On Fri, Feb 27, 2015 at 11:13 AM, Peter Berghold salty.cowd...@gmail.com wrote: that's exactly what I was after. Since this is my first type/provider pair I'm proceeding cautiously. On Fri, Feb 27, 2015 at 11:09 AM Felix Frank felix.fr...@alumni.tu-berlin.de wrote: On 02/27/2015 05:02 PM, Peter Berghold wrote: can I guess that the first def mod is what is referred to as a getter and second is a setter?Can I stretch that inference to say that if the value being passed to the setter is the same as what the getter is seeing it won't be set again? Yes, this is basically a getter/setter pair. However, the idempotency is implemented closer to the type layer. The transaction code will check whether properties are out of sync, and invoke the provider = methods to take action if necessary. On this higher level, your assertion should hold true. But I'm not sure if that's what you were asking. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ms gid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg %40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv% 3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv0zZ0DLgoLO6-6PfXuxays2TQrft2xHbMatwP80K1TFeA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.