Knife 12 bahaviour


#1

When I run a knife node show <node> -l I no longer get any ouput besides
the run_list. But yet when I fire up chef-shell and search for the node, I
get all of its attributes in the node object. So the data appears to be
posted back to the chef server just fine, but I get no output with knife.
I could only retrieve specific attributes with the -a flag.

Am I missing something?


Thanks,

Mark


#2

On Mon, 9 Feb 2015, Mark Pimentel wrote:

When I run a knife node show <node> -l I no longer get any ouput
besides the run_list. But yet when I fire up chef-shell and search for
the node, I get all of its attributes in the node object. So the data
appears to be posted back to the chef server just fine, but I get no
output with knife. I could only retrieve specific attributes with the -a
flag.

Am I missing something?

That’s weird. I can’t reproduce that behavior and I’m on Chef 12.0.3. Do
you get any data like platform, platform_version for 'knife node show’
without -l?

  • Julian

[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]


#3

knife node show for me returns only the run_list, nothing more. Adding
the -l flag returns the exact same output. The server is chef 12, the
client is chef 12, and I have chefdk 0.4.0.

The only thing I can think of is my local chefdk was upgraded from 0.3.6.
Would there be anything lying around that may be causing this?

On Mon, Feb 9, 2015 at 12:03 PM, Julian C. Dunn jdunn@aquezada.com wrote:

On Mon, 9 Feb 2015, Mark Pimentel wrote:

When I run a knife node show <node> -l I no longer get any ouput

besides the run_list. But yet when I fire up chef-shell and search for the
node, I get all of its attributes in the node object. So the data appears
to be posted back to the chef server just fine, but I get no output with
knife. I could only retrieve specific attributes with the -a flag.

Am I missing something?

That’s weird. I can’t reproduce that behavior and I’m on Chef 12.0.3. Do
you get any data like platform, platform_version for 'knife node show’
without -l?

  • Julian

[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]


Thanks,

Mark


#4

Hi,

I couple of possibilities that come to mind:

  • Do you have configuration somewhere (.chef/knife.rb,
    ~/.chef/knife.rb) that is setting knife[:attribute] = 'run_list'>
  • Do you have a knife plugin installed (either via a gem or locally in
    a .chef configuration directory) that might be overriding the default
    chef plugin?

Cheers,

Steven

On Mon, Feb 9, 2015 at 5:08 PM, Mark Pimentel markpimentel22@gmail.com wrote:

knife node show for me returns only the run_list, nothing more. Adding
the -l flag returns the exact same output. The server is chef 12, the
client is chef 12, and I have chefdk 0.4.0.

The only thing I can think of is my local chefdk was upgraded from 0.3.6.
Would there be anything lying around that may be causing this?

On Mon, Feb 9, 2015 at 12:03 PM, Julian C. Dunn jdunn@aquezada.com wrote:

On Mon, 9 Feb 2015, Mark Pimentel wrote:

When I run a knife node show <node> -l I no longer get any ouput
besides the run_list. But yet when I fire up chef-shell and search for the
node, I get all of its attributes in the node object. So the data appears
to be posted back to the chef server just fine, but I get no output with
knife. I could only retrieve specific attributes with the -a flag.

Am I missing something?

That’s weird. I can’t reproduce that behavior and I’m on Chef 12.0.3. Do
you get any data like platform, platform_version for 'knife node show’
without -l?

  • Julian

[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]


Thanks,

Mark


#5

Not sure how this is related, but I did notice my knife.rb had the
following defined:

knife[:run_list] = ‘recipe[some_recipe]’

I was under the impression this was to define a default recipe to use when
bootstrapping a node.
When I removed this setting, it now displays all node info when the -l flag
is passed.

Could this be a bug?

On Mon, Feb 9, 2015 at 12:44 PM, Steven Danna steve@chef.io wrote:

Hi,

I couple of possibilities that come to mind:

  • Do you have configuration somewhere (.chef/knife.rb,
    ~/.chef/knife.rb) that is setting knife[:attribute] = 'run_list'>
  • Do you have a knife plugin installed (either via a gem or locally in
    a .chef configuration directory) that might be overriding the default
    chef plugin?

Cheers,

Steven

On Mon, Feb 9, 2015 at 5:08 PM, Mark Pimentel markpimentel22@gmail.com
wrote:

knife node show for me returns only the run_list, nothing more. Adding
the -l flag returns the exact same output. The server is chef 12, the
client is chef 12, and I have chefdk 0.4.0.

The only thing I can think of is my local chefdk was upgraded from 0.3.6.
Would there be anything lying around that may be causing this?

On Mon, Feb 9, 2015 at 12:03 PM, Julian C. Dunn jdunn@aquezada.com
wrote:

On Mon, 9 Feb 2015, Mark Pimentel wrote:

When I run a knife node show <node> -l I no longer get any ouput
besides the run_list. But yet when I fire up chef-shell and search
for the

node, I get all of its attributes in the node object. So the data
appears

to be posted back to the chef server just fine, but I get no output
with

knife. I could only retrieve specific attributes with the -a flag.

Am I missing something?

That’s weird. I can’t reproduce that behavior and I’m on Chef 12.0.3. Do
you get any data like platform, platform_version for 'knife node show’
without -l?

  • Julian

[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]


Thanks,

Mark


Thanks,

Mark


#6

Hi Mark,

From the code this looks pretty intentional:


The knife node show command has an option (-r) to show the run list.
Since everything but false and nil is considered truthy in Ruby
conditionals, setting that configuration option to a string was the
same as passing this option on the command line.

I’d have to dig around to see why this would have changed recently as
the code in question seems like it has been around awhile.

Cheers,

Steven

On Mon, Feb 9, 2015 at 8:10 PM, Mark Pimentel markpimentel22@gmail.com wrote:

Not sure how this is related, but I did notice my knife.rb had the following
defined:

knife[:run_list] = ‘recipe[some_recipe]’

I was under the impression this was to define a default recipe to use when
bootstrapping a node.
When I removed this setting, it now displays all node info when the -l flag
is passed.

Could this be a bug?

On Mon, Feb 9, 2015 at 12:44 PM, Steven Danna steve@chef.io wrote:

Hi,

I couple of possibilities that come to mind:

  • Do you have configuration somewhere (.chef/knife.rb,
    ~/.chef/knife.rb) that is setting knife[:attribute] = 'run_list'>
  • Do you have a knife plugin installed (either via a gem or locally in
    a .chef configuration directory) that might be overriding the default
    chef plugin?

Cheers,

Steven

On Mon, Feb 9, 2015 at 5:08 PM, Mark Pimentel markpimentel22@gmail.com
wrote:

knife node show for me returns only the run_list, nothing more.
Adding
the -l flag returns the exact same output. The server is chef 12, the
client is chef 12, and I have chefdk 0.4.0.

The only thing I can think of is my local chefdk was upgraded from
0.3.6.
Would there be anything lying around that may be causing this?

On Mon, Feb 9, 2015 at 12:03 PM, Julian C. Dunn jdunn@aquezada.com
wrote:

On Mon, 9 Feb 2015, Mark Pimentel wrote:

When I run a knife node show <node> -l I no longer get any ouput
besides the run_list. But yet when I fire up chef-shell and search
for the
node, I get all of its attributes in the node object. So the data
appears
to be posted back to the chef server just fine, but I get no output
with
knife. I could only retrieve specific attributes with the -a flag.

Am I missing something?

That’s weird. I can’t reproduce that behavior and I’m on Chef 12.0.3.
Do
you get any data like platform, platform_version for 'knife node show’
without -l?

  • Julian

[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]


Thanks,

Mark


Thanks,

Mark