> Basically, 'ensure' trumps everything - if it's out of sync, nothing else
> really matters.

In cases where ensure is absent/present, this holds. But if you've got
other options (changing a service from "stopped" to "running", for
example), then you may still care about other changes on the resource.
I'm starting to believe that this is a misuse of "ensure" for it to
mean something so different on certain types.

~Jesse

On Wed, Jul 7, 2010 at 1:53 PM, Luke Kanies <[email protected]> wrote:
> Yeah, this is important mostly because, e.g., if the file is absent we don't
> want to try to see if the mode should be changed. Also, if we're going to
> delete the file, who cares if the content isn't in sync?
>
> Basically, 'ensure' trumps everything - if it's out of sync, nothing else
> really matters.
>
> On Jul 7, 2010, at 10:36 AM, Jesse Wolfe wrote:
>
>> If "ensure" changes, then no other changes are logged for that resource.
>> I'm not sure why this special case is here. If I remove it, like so,
>> then what happens?
>>
>> Signed-off-by: Jesse Wolfe <[email protected]>
>> ---
>> lib/puppet/transaction/resource_harness.rb |    3 +--
>> 1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/puppet/transaction/resource_harness.rb
>> b/lib/puppet/transaction/resource_harness.rb
>> index ae38bcb..7c1d019 100644
>> --- a/lib/puppet/transaction/resource_harness.rb
>> +++ b/lib/puppet/transaction/resource_harness.rb
>> @@ -48,11 +48,10 @@ class Puppet::Transaction::ResourceHarness
>>
>>        if param = resource.parameter(:ensure)
>>            return [] if absent_and_not_being_created?(current, param)
>> -            return [Puppet::Transaction::Change.new(param,
>> current[:ensure])] unless ensure_is_insync?(current, param)
>>            return [] if ensure_should_be_absent?(current, param)
>>        end
>>
>> -        resource.properties.reject { |p| p.name == :ensure }.reject do
>> |param|
>> +        resource.properties.reject do |param|
>>            param.should.nil?
>>        end.reject do |param|
>>            param_is_insync?(current, param)
>> --
>> 1.7.0.4
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Developers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-dev?hl=en.
>>
>
>
> --
> True Terror is to wake up one morning and discover that your high
> school class is running the country. -- Kurt Vonnegut
> ---------------------------------------------------------------------
> Luke Kanies  -|-   http://puppetlabs.com   -|-   +1(615)594-8199
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-dev?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to