Overrides attrbiutes can't be read in cookbook/attributes/default.rb?


#1

Hi

I want to change value of some attributes according to other attributes in
attributes/default.rb. I found that overrides attrbiutes can’t be read in
cookbook_name/attributes/default.rb, e.g.

  1. save an override attribute node.override[:abc] = ‘hello’ into Chef node
    before run ‘chef-client’
  2. in cookbook_name/attributes/default.rb: Chef::Log.info “value is
    #{node[:abc].to_s}” , and upload cookbook
  3. run ‘sudo chef-client’, it prints “value is
    #Chef::Node::Attribute:0x0000000438cf58”,

Is this the expected behaviour ?

Thanks & Best Regards,
Hui Hu, Beijing, China