Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No resource, method, or local variable named 'ha' for recipe "default" #1

Open
nogweii opened this issue Jul 18, 2015 · 0 comments
Open

Comments

@nogweii
Copy link

nogweii commented Jul 18, 2015

================================================================================
  Recipe Compile Error in /var/chef/cache/cookbooks/tinc/recipes/default.rb
  ================================================================================

  NameError
  ---------
  No resource, method, or local variable named `ha' for `Chef::Recipe "default"'

  Cookbook Trace:
  ---------------
    /var/chef/cache/cookbooks/tinc/recipes/default.rb:17:in `hex_address_unique?'
    /var/chef/cache/cookbooks/tinc/recipes/default.rb:26:in `block in from_file'
    /var/chef/cache/cookbooks/tinc/recipes/default.rb:24:in `loop'
    /var/chef/cache/cookbooks/tinc/recipes/default.rb:24:in `from_file'

  Relevant File Content:
  ----------------------
  /var/chef/cache/cookbooks/tinc/recipes/default.rb:

   10:  def hex_address_unique?(hex_address)
   11:    return false if hex_address == '0000'
   12:    return false if hex_address == 'ffff'
   13:    if Chef::Config[:solo]
   14:      Chef::Log.warn('Running solo, cannot check address uniqueness')
   15:      return true
   16:    else
   17>>     return search(:node, "tinc_hex_address:#{ha}").empty?
   18:    end
   19:  end
   20:
   21:  unless node['tinc']['hex_address']
   22:    require 'digest/md5'
   23:    ha_base = node.name
   24:    loop do
   25:      ha = Digest::MD5.hexdigest(ha_base)[-4..-1]
   26:      if hex_address_unique?(ha)

Just as the title says, I think this was an instance of incorrect copy & paste. I expect it should be hex_address in this instance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant