On Thu, Dec 19, 2013 at 3:32 AM, Felix Frank <
felix.fr...@alumni.tu-berlin.de> wrote:

> On 12/19/2013 12:15 PM, Erik Dalén wrote:
> > If that behaviour is changed, wouldn't this break the resources type?
>
> Hmm, I think not.
>
>
I took a quick look and I think the resource type is fine. However, since
this patch means that we never retrieve the ensure value of the instance
the logic around checking how to manage parameters (
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/transaction/resource_harness.rb#L80-83)
would end up trying to manage resources that might be absent, where it
should have done nothing. So for instance, if the service resource in the
example

  service { 'ntpd:
    enable => false,
    hasstatus => true,
  }

I think would fail if the ntpd service didn't exist on the system, whereas
right now it would be skipped. Disclaimer: I haven't tried this out yet,
but reading the code leads me to think this is the case.

In the end, even just the behavior change to "puppet resource" makes the
patch a non-starter because it is a widely used feature. I'm not sure how
far down inside the APIs that functionality needs to be preserved; however,
since the retrieve method has had the current behavior for ~4 years, I'm
willing to bet that there are systems that use retrieve directly and expect
the current behavior.


> Purging of unmanaged resources is pretty much all that the resources
> type is currently capable of. If a resource is not "present" in the
> ensure sense, it should not get generated in the first place. If it does
> get generated, it implicitly requires purging if it's not managed.
> Populating the ensure property should not be strictly required.
>
> This is me guessing mostly, I'm not entirely sure.
>
> Regards,
> Felix
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-dev/52B2D933.9030902%40alumni.tu-berlin.de
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Andrew Parker
a...@puppetlabs.com
Freenode: zaphod42
Twitter: @aparker42
Software Developer

*Join us at PuppetConf 2014, September 23-24 in San Francisco*

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/CANhgQXv7urmgb-sKZG-_xa1X3fCGBdth539KUhJ6L0%2BpTdXTVA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to