Knife node from file.json lies


#1

Hello

I’ve been experiencing a strange behaviour of knife/chef server for a while.

knife node from file nodename.json
Updated Node nodename!

Ok so in theory the node has been just updated. Unfortunately when I check it’s definition by

knife node show node nodename

It still has it’s old run list. It doesn’t happen all the time but to be sure that the changes are going to be applied I usually hit

knife node from file nodename.json

a few times in a row. Does anybody know why I got info that the node was updated while actually it was not?


#2

Usually this means that you’ve updated the run list while chef is running on the node. At the end of the chef run, chef saves itself back to the chef server, and that overwrites the change you’ve made.
We’ve created an RFC to define a better approach, but I’m not sure when we’ll do that work.
Hope this clarifies what’s going on.
-Thom