Le 19/12/2013 18:06, Andy Parker a écrit :

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.

I've tried with my patch, and it works (I mean no error, it just ran "chkconfig foo")

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


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 understand this feature should be kept, but that a pity this should impact other even more useful feature like "apply" or "agent".

Could it be possible that "puppet resource" and other like "apply" or "agent" retrieves only what they need? In apply/agent case, this come from a transaction being applied. For "puppet resource" I assume this is not the case. Could method parameter solve this case? And this could even keep the compat if this param is not specified


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.

I'm working hard to go back to 4-years old Puppet performances, which was much faster than current version. It could be nice to work together to have the best of each world, features and performances.


Aurélien


--
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/52B32E36.7000705%40cea.fr.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to