Issue #1554 has been updated by jamtur01. Status changed from Unreviewed to Code Insufficient
But doesn't this ignore the fact that you might actually already have the fqdn? ---------------------------------------- Bug #1554: Puppetmaster throws exception if client has undefined hostname http://reductivelabs.com/redmine/issues/show/1554 Author: pawalls Status: Code Insufficient Priority: Normal Assigned to: Category: node Target version: Complexity: Unknown Affected version: 0.24.5 Keywords: The following code in lib/puppet/node.rb (names) tries to find names to refer to a client by if an FQDN wasn't provided by the client: <pre> # First, get the fqdn unless fqdn = parameters["fqdn"] if domain = parameters["domain"] fqdn = parameters["hostname"] + "." + parameters["domain"] end end </pre> In addition to assignment in conditionals being an abomination against mankind, under most (all?) circumstances, when the FQDN is undefined, the hostname is also undefined. This results in fun errors like the following: <pre> undefined method `+' for nil:NilClass on node XXXXX-XXXXXXX-XXXXXXX-XXXX </pre> Which prevents clients from getting a compiled configuration from the puppetmaster daemon. The fix is quite simple: <pre> if parameters["hostname"] and parameters["domain"] fqdn = parameters["hostname"] + "." + parameters["domain"] else Puppet.warning "Host is missing hostname and/or domain: %s" % name end </pre> Cheers, -P ---------------------------------------- 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://reductivelabs.com/redmine/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 -~----------~----~----~----~------~----~------~--~---
