Getting a value fro,m a databag returns nothing


#1

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”}


#2

Is this the actual output or did you try to copy this by hand?

On Tue, Feb 25, 2014 at 10:44 PM, David Montgomery
davidmontgomery@gmail.com wrote:

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”}

The output of this_node is
"1.cassandra.do.development.sf.augnodev.com", which is not the same as
"1.cassandra.do.development.sf.dev.com". There’s an “augno” in there.

Bryan