Issue #4465 has been updated by Markus Roberts.

Status changed from Ready for Testing to Closed

commit:d909827942fa571bea202818c92d081e7957a574 Fix for #4465 -- earlier 
"feature" patch broke ldap

----------------------------------------
Bug #4465: Regression in ldap external nodes
http://projects.puppetlabs.com/issues/4465

Author: Chris Picton
Status: Closed
Priority: High
Assigned to: Markus Roberts
Category: LDAP
Target version: 2.6.1
Affected version: 2.6.0
Keywords: 
Branch: MarkusQ:tickets/2.6.x/4465


Our 0.24 system, uses ldap nodes, using short hostnames as the cn value.

With 2.6.{0,1}, puppetmaster fails to find the node - it searches for only fqdn 
and default.

This is due to the name2hash function in indirector/node/ldap.rb returning 
"info = name2hash('default',name_env,'parent')" if the node is not found in the 
initial search (which is for the fqdn)

Also, all the nodes and parents need to have an environment attribute added in 
ldap, otherwise nodes are not found.

I have a simple patch to allow the old behaviour to work:
---------------------
    25a26,29
    >       if info[:name] && !info[:environment] && name_env == 'production'
    >         return info
    >       end
    >          
    42a47,49
    >        info = name2hash('default',name_env,'parent')
    >     else
    >        info = nil
    44,45c51
    < 
    <     info = name2hash('default',name_env,'parent')
    ---
    >     return info
    57c63
    <       if facts.values["environment"]
    ---
    >       if facts && facts.values["environment"]
----------------------


This patch may revert other functionality I have not yet seen, though.

Please review and fix properly  :)


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