Issue #16376 has been updated by Matthaus Litteken.

Status changed from Accepted to In Topic Branch Pending Review

Pull Request: <https://github.com/puppetlabs/puppet/pull/1136>

Here's the commit message, which describes the issue as I understand it.
<pre>
Previously an alias was attempted between scope and named_scope to allow older
activerecord versions (< 3.0) to work with the inventory service while also
supporting modern activerecord. The scope alias failed because
Puppet::Rails::InventoryNode inherits from ActiveRecord::Base, which has a
scope method already. So activerecord's scope method is found instead of the
intended alias target. This commit removes the alias and simply switches on
activerecord version to use the correct scope (AR >= 3.0) or named_scope (AR <
3.0) method.
</pre>
----------------------------------------
Bug #16376: Inventory service fails on fact search with `undefined method 
`has_fact_with_value' for #<Class:0x2adba4999d50>`
https://projects.puppetlabs.com/issues/16376#change-70980

Author: Matthaus Litteken
Status: In Topic Branch Pending Review
Priority: Normal
Assignee: Matthaus Litteken
Category: 
Target version: 2.7.20
Affected Puppet version: 2.7.14
Keywords: 
Branch: 


<pre>
Sep 12 10:17:10 rhel5-latest-x86-64 puppet-master[10906]: Starting Puppet 
master version 2.7.19 (Puppet Enterprise 2.6.0rc0-19-g515dd42)
Sep 12 10:17:10 rhel5-latest-x86-64 puppet-master[10906]: undefined method 
`has_fact_with_value' for #<Class:0x2adba4999d50>
</pre>

Looks like the problem is in lib/puppet/rails/inventory_node.rb and the rails 3 
compatibility layer.


-- 
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