Is search broken?

Hi all -

I’m now trying to do some knife work and when I do this:

C:\chef>knife node list -c c:/chef/client.rb -E dev01

(just one result - which is expected)

I get one thing, but when I run the search:

knife search node “chef_environment:dev01 and node_name:” -c
c:/chef/client.rb

I get back every node including things in the “_default” environment.

What am I doing wrong?

Does knife search node "chef_environment:dev01 and name:" -c
c:/chef/client.rb
work?

On Wed, Oct 26, 2011 at 4:25 PM, Maven User maven.2.user@gmail.com wrote:

Hi all -

I'm now trying to do some knife work and when I do this:

C:\chef>knife node list -c c:/chef/client.rb -E dev01

(just one result - which is expected)

I get one thing, but when I run the search:

knife search node "chef_environment:dev01 and node_name:" -c
c:/chef/client.rb

I get back every node including things in the "_default" environment.

What am I doing wrong?

I've created a new role "foo".

It's blank (no cookbooks/recipes associated with it).

I've added that role to a node's runlist.

but It's still not showing up as a role:

C:\chef>knife node show coolserver
Node Name: coolserver
Environment: _default
FQDN: coolserver.coolcompany.com
IP: 10.45.161.109
Run List: role[somerole], role[someotherrole]
Roles: somerole
Recipes: coolrecipe
Platform: windows 6.1.7601

Even in its current state:

knife search node "role:somerole"

doesn't work (returns "0 items found").

Any suggestions? This totally takes knife-based-deployments out of the
equation for us...

On Wed, Oct 26, 2011 at 4:25 PM, Maven User maven.2.user@gmail.com wrote:

Hi all -

I'm now trying to do some knife work and when I do this:

C:\chef>knife node list -c c:/chef/client.rb -E dev01

(just one result - which is expected)

I get one thing, but when I run the search:

knife search node "chef_environment:dev01 and node_name:" -c
c:/chef/client.rb

I get back every node including things in the "_default" environment.

What am I doing wrong?

On Oct 28, 2011, at 9:21 PM, Maven User maven.2.user@gmail.com wrote:

I've created a new role "foo".

It's blank (no cookbooks/recipes associated with it).

I've added that role to a node's runlist.

but It's still not showing up as a role:

C:\chef>knife node show coolserver
Node Name: coolserver
Environment: _default
FQDN: coolserver.coolcompany.com
IP: 10.45.161.109
Run List: role[somerole], role[someotherrole]
Roles: somerole
Recipes: coolrecipe
Platform: windows 6.1.7601

Even in its current state:

knife search node "role:somerole"

doesn't work (returns "0 items found").

Any suggestions? This totally takes knife-based-deployments out of the equation for us...

Did chef-client run in between you adding the role to the client and the search? It will only be indexed on a successful chef-client run.

On Wed, Oct 26, 2011 at 4:25 PM, Maven User maven.2.user@gmail.com wrote:
Hi all -

I'm now trying to do some knife work and when I do this:

C:\chef>knife node list -c c:/chef/client.rb -E dev01

(just one result - which is expected)

I get one thing, but when I run the search:

knife search node "chef_environment:dev01 and node_name:" -c c:/chef/client.rb

I get back every node including things in the "_default" environment.

What am I doing wrong?