Puppet: System Administration Automated

Support

Ticket #908 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

ldapnodes without puppetclass

Reported by: lassizci Assigned to: community
Priority: low Milestone:
Component: library Version: 0.23.2
Severity: minor Keywords: ldapnodes puppetclass
Cc: Triage Stage: Unreviewed
Attached Patches: Code Complexity: Unknown

Description

There seems to be problem with ldapnodes when a node doesn't have a single puppetclass attribute in ldap.

My puppetmaster is 0.23.2-1.el5, running on RHEL 5 (5.0)

When a client, that has only parentnode but no puppetclasses defined in ldap, tries to connect to puppetmaster, the master says

puppetmasterd[10987]: undefined method `+' for nil:NilClass

It only happened with clients not having any puppetclasses defined. The problem was fixed after adding an empty class for every nodes' definitions to ldap

This is seemed to fix it even though I'm still unconfident whether it might break something or not

--- parser/interpreter.rb.ORIG  2007-11-19 11:16:38.000000000 +0200
+++ parser/interpreter.rb       2007-11-19 11:20:35.000000000 +0200
@@ -411,10 +411,6 @@
 
         classes.flatten!
 
-        if classes.empty?
-            classes = nil
-        end
-
         if parent or classes or parameters
             return parent, classes, parameters
         else

when the above code is cut out, classes return value is an empty array instead of nil

Change History

11/19/07 10:41:38 changed by lassizci

  • priority changed from normal to low.
  • version set to 0.23.2.
  • severity changed from normal to minor.

11/24/07 03:35:17 changed by luke

  • status changed from new to closed.
  • resolution set to fixed.

This is fixed in the current code, as the external node support has been completely redesigned.