Saturday 15 August 2015

Node available for search before chef-client run -



Node available for search before chef-client run -

just wondering, if possible search node before node has completed chef-client run.

going chef docs: https://docs.getchef.com/essentials_nodes_chef_run.html

when of actions identified resources in resource collection have been done, , when chef-client run finished successfully, chef-client updates node object on chef server node object built during chef-client run. (this node object pulled downwards chef-client during next chef-client run.) makes node object (and info in node object) available search.

the chef-client checks resource collection presence of exception , study handlers. if present, each 1 processed appropriately

so example, have recipe searchs nodes role called "webserver". im creating chef node via pychef, , filling attributes, , runlists (including role in run_list). launching chef-client mahchine, fails find nodes role, has not been saved, not available search.

its easy see knife search roles attribute of returned search empty (roles still on run_list) , when chef-client finishes, roles moved proper place, node.roles.

is there way can forcefulness node saved, before doing search appear in results? keeping chef node in chef server works, deleted day , search not work anymore.

thanks!

in general bad thought several reasons.

any chef server uses acls scheme (enterprise chef, chef server 12) has issues manually creating node objects break permissions. can corrected manually, complex task. if query using roles or recipes expanded forms, have manually populated since step done chef-client during run list expansion , saved server. having partial results in search index leads service discovery failures non-working services end in production rotations.

chef chef-recipe

No comments:

Post a Comment