[chef] 10.2: Override attribute not taking effect?


Chronological Thread 
  • From: Charles Duffy < >
  • To: chef-users < >
  • Subject: [chef] 10.2: Override attribute not taking effect?
  • Date: Tue, 16 Aug 2011 14:06:17 -0500

Howdy --

I've got a case where Chef's attribute behaviour is very contrary to my expectations.

{
  "override": {
    "shorewall": {
      "private_ranges": [
        "192.168.0.0/16"
      ]
    }
  },
  "default": {
    "shorewall": {
      "private_ranges": [
        "192.168.0.0/16",
        "172.16.0.0/12",
        "10.0.0.0/8"
      ]
    }
  }
}

My expectation here, and the behavior I saw in 0.9.x, was that node[:shorewall][:private_ranges] will be the single-item list assigned at the override level.

However, in Chef 0.10.2, running shef -z:

chef > node[:shorewall][:private_ranges]
 => ["192.168.0.0/16", "172.16.0.0/12", "10.0.0.0/8"]
chef > node.override[:shorewall][:private_ranges]
 => #<Chef::Node::Attribute @auto_vivifiy_on_read=true, @automatic={...}, @override={...}, @current_default=["192.168.0.0/16", "172.16.0.0/12", "10.0.0.0/8"], @has_been_read=false, @current_nesting_level=[:shorewall, :private_ranges], @normal={...}, @current_normal={}, @set_type=:override, @current_automatic={}, @default={...}, @set_unless_value_present=false, @current_override={}>

What's going on here?



Archive powered by MHonArc 2.6.16.

§