Issue #12197 has been updated by Stefan Schulte.

Branch set to https://github.com/puppetlabs/puppet/pull/413

I tried fixing the described error but I just found another pitfall:
<pre>
Array(is).zip(@should).all? {|current, want| property_matches?(current, want) }
</pre>
This can also return true if `is` is just a subset of `@should` because of the 
way `Array.zip` works.
<pre>
irb(main):001:0> is=['a','b']
irb(main):002:0> should=['a','b','c']
irb(main):003:0> is.zip(should)
=> [["a", "a"], ["b", "b"]]
irb(main):004:0> is.zip(should).all? {|x,y| x==y}
=> true
</pre>
So in the end my pull request just reverts the commit that was causing the 
error. And if we want to refactor `insync?` again we should definitly add some 
specs ;-)
----------------------------------------
Bug #12197: Array handling broken in 2.7.10
https://projects.puppetlabs.com/issues/12197

Author: Stefan Schulte
Status: Investigating
Priority: Normal
Assignee: Stefan Schulte
Category: ralsh
Target version: 
Affected Puppet version: 2.7.10
Keywords: 
Branch: https://github.com/puppetlabs/puppet/pull/413


Handling properties with array_matching all is somehow broken in 2.7.10 and 
ruby 1.8

I have created the following manifest and applied it once, so the resource must 
be in sync
<pre>
k5login { '/tmp/test.txt':
  ensure     => present,
  principals => [ 'A', 'B', 'C' ],
}
</pre>

running puppet apply on 2.7.9
<pre>
# puppet apply /tmp/test.pp 
notice: Finished catalog run in 0.03 seconds
</pre>

running puppet apply on 2.7.10
<pre>
# puppet apply /tmp/test.pp
notice: /Stage[main]//K5login[/tmp/test.txt]/principals: principals changed 
['A', 'B', 'C'] to 'A B C'
notice: Finished catalog run in 0.13 seconds
</pre>

running puppet apply on 2.7.10 and ruby 1.9.3
<pre>
# puppet apply /tmp/test.pp
/usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 
iconv will be deprecated in the future, use String#encode instead.
Could not load confine test 'operatingsystem': cannot load such file -- 
puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- 
puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- 
puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- 
puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- 
puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- 
puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- 
puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- 
puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- 
puppet/provider/confine/operatingsystem
notice: Finished catalog run in 0.07 seconds
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to