Find Attributes in the 'Expanded' Attributes


#1

Hi, I have a cookbook that uses search within its recipes in order to describe
a cluster. I am using a specific attribute (clusterID) to define the grouping
(and their recipes as their specific units master/slave…). Adding this
attribute to the node directly works fine and search finds it easily.

My problem is that if you were to use an environment or role and define the
clusterID (makes sense if you were to assign this to many nodes), search will
pick up the attribute only after the node has run chef-client.

I have even tried running the ‘knife index rebuild’ command and I still get
nothing. Is there anyway to fix this?


#2

Nope - it’s intended to work that way. Seaching for those attributes on a node will only find them when they have been successfully applied to the node - if they don’t exist, it hasn’t happened yet.

Adam


Opscode, Inc.
Adam Jacob, Chief Product Officer
T: (206) 619-7151 E: adam@opscode.com

On Nov 2, 2011, at 10:18 AM, bjbq4d@gmail.com bjbq4d@gmail.com wrote:

Hi, I have a cookbook that uses search within its recipes in order to describe
a cluster. I am using a specific attribute (clusterID) to define the grouping
(and their recipes as their specific units master/slave…). Adding this
attribute to the node directly works fine and search finds it easily.

My problem is that if you were to use an environment or role and define the
clusterID (makes sense if you were to assign this to many nodes), search will
pick up the attribute only after the node has run chef-client.

I have even tried running the ‘knife index rebuild’ command and I still get
nothing. Is there anyway to fix this?


#3

bjbq4d (if that really is your name) try this:

This gets used with knife and cluster_chef. When you launch the
cluster, the nodes are registered.

-Peter

On Wed, Nov 2, 2011 at 1:18 PM, bjbq4d@gmail.com wrote:

Hi, I have a cookbook that uses search within its recipes in order to describe
a cluster. I am using a specific attribute (clusterID) to define the grouping
(and their recipes as their specific units master/slave…). Adding this
attribute to the node directly works fine and search finds it easily.

My problem is that if you were to use an environment or role and define the
clusterID (makes sense if you were to assign this to many nodes), search will
pick up the attribute only after the node has run chef-client.

I have even tried running the ‘knife index rebuild’ command and I still get
nothing. Is there anyway to fix this?