[chef] getting a value fro,m a databag returns nothing


Chronological Thread 
  • From: David Montgomery < >
  • To:
  • Subject: [chef] getting a value fro,m a databag returns nothing
  • Date: Wed, 26 Feb 2014 11:44:02 +0800

This is a printout of a log from  chef run
this_node = 1.cassandra.do.development.sf.dev.com
db[node.chef_environment][location]['cassandra']['nodes'] = {"0.cassandra.do.development.sf.dev.com"=>"0", "1.cassandra.do.development.sf.dev.com"=>"4611686018427387904"}

initial_token = db[node.chef_environment][location]['cassandra']['nodes'] [this_node]

omg..why does the hash not work? 

initial_token shoud be "4611686018427387904" but instead I get nothing.  I am at a total loss.




  initial_token = db[node.chef_environment][location]['cassandra']['nodes'][this_node]
  puts "JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ"
  puts this_node
  puts initial_token
  puts seeds
  puts db[node.chef_environment][location]['cassandra']['nodes']


JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
1.cassandra.do.development.sf.augnodev.com
==>THIS SHOULD NOT BE BLANK<===
107.170.XXX.XXX
{"0.cassandra.do.development.sf.dev.com"=>"0", "1.cassandra.do.development.sf.dev.com"=>"4611686018427387904"}





Archive powered by MHonArc 2.6.16.

§