diff options
| author | Paul Berry <paul@puppetlabs.com> | 2011-01-25 14:34:28 -0800 |
|---|---|---|
| committer | Paul Berry <paul@puppetlabs.com> | 2011-01-25 15:12:47 -0800 |
| commit | 67e1bba154accd900b9690d96cec8b050f8082e7 (patch) | |
| tree | 54050ace3795a6671fa757464f2acc7809f466c3 /lib/puppet/provider/zone | |
| parent | 0f9d23617e4115166d6b9e004332dcdf5eccc924 (diff) | |
| download | puppet-67e1bba154accd900b9690d96cec8b050f8082e7.tar.gz puppet-67e1bba154accd900b9690d96cec8b050f8082e7.tar.xz puppet-67e1bba154accd900b9690d96cec8b050f8082e7.zip | |
(#5931) Prevent errors when calling insync? on audited properties
Created a method safe_insync? which first checks whether the property
has a "should" value of nil, and if so returns true. Most insync?
methods were already doing this, but a few were not, leading to bugs
if a property was being audited but not set.
Types should continue to override the insync? method, but callers of
insync? should call safe_insync? instead.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
Diffstat (limited to 'lib/puppet/provider/zone')
| -rw-r--r-- | lib/puppet/provider/zone/solaris.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/provider/zone/solaris.rb b/lib/puppet/provider/zone/solaris.rb index c11444993..f46337b14 100644 --- a/lib/puppet/provider/zone/solaris.rb +++ b/lib/puppet/provider/zone/solaris.rb @@ -40,7 +40,7 @@ Puppet::Type.type(:zone).provide(:solaris) do # Then perform all of our configuration steps. It's annoying # that we need this much internal info on the resource. @resource.send(:properties).each do |property| - str += property.configtext + "\n" if property.is_a? ZoneConfigProperty and ! property.insync?(properties[property.name]) + str += property.configtext + "\n" if property.is_a? ZoneConfigProperty and ! property.safe_insync?(properties[property.name]) end str += "commit\n" |
