Jay Christopherson
2010-Jun-07 16:02 UTC
[Puppet Users] undefined method ''to_sym'' for ["<var>", "<var">]:Array
I am running into a problem with my LDAP puppet setup with this error message: PuppetClient: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment DR: undefined method `to_sym'' for ["ENV1", "ENV2"]:Array PuppetMaster: err: Could not parse for environment DR: undefined method `to_sym'' for ["ENV1", "ENV2"]:Array The "environment" variable is part of the LDAP node definition and in this case, the node in question belongs to two different environments and so has two "environment" attribute entries. The attribute itself is defined as part of a custom schema I setup for our company. What''s confusing is why this is affecting Puppet at all since this attribute is not at all a part of the puppet schema definition. The node here IS defined as an ObjectClass puppetClient, but the puppet schema (in my case) only defines puppetclass, puppetbase, and parentnode. This looks to me like a rails error, but I don''t find any relevant issues. I DID find a reference to puppetLabs article that says that by default, the puppetVar attribute does not support arrays, but it looks like the version of Ruby I am running (1.8.5) already has the fixed code. I can workaround this by removing the multiple environment attributes, but that seems like a bandaid at best and causes me some extra amount of work. I figured I would start here since the error is being thrown by Puppet. I''m running Puppet Server 0.25.4 and Puppet Client 0.25.4. Thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Alan Barrett
2010-Jun-08 06:22 UTC
Re: [Puppet Users] undefined method ''to_sym'' for ["<var>", "<var">]:Array
On Mon, 07 Jun 2010, Jay Christopherson wrote:> err: Could not parse for environment DR: undefined method `to_sym'' for > ["ENV1", "ENV2"]:Array > > The "environment" variable is part of the LDAP node definition and in this > case, the node in question belongs to two different environments and so has > two "environment" attribute entriesThe concept of an environment is built in to puppet; see <http://docs.puppetlabs.com/guides/environment.html>. A node in puppet must always be in exactly one environment, so setting puppet''s "environment" variable to an array is an error. I don''t know how you could prevent the LDAP "environment" variable from being copied to the puppet "environment" variable, or prevent the LDAP server from reporting the value of that variable, but perhaps you could rename the LDAP variable? --apb (Alan Barrett) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.