Kevin, The update frequency for Solr search index is configurable on your chef-server (see below). I think creating the node object first is the correct approach Doug should be attempting. May be worth investigating chef provisioning and the machine resource as it actually creates a node object before start of chef-client run and let's you populate whatever values you desire. At end of chef-client run on vm the client object is created and node object is saved with remaining attributes. Update FrequencyAt the end of every chef-client run, the node object is saved to the Chef server. From the Chef server, each node object is then added to the SOLR search index. This process is asynchronous. By default, node objects are committed to the search index every 60 seconds or per 1000 node objects, whichever occurs first. When data is committed to the Apache Solr index, all incoming updates are blocked. If the duration between updates is too short, it is possible for the rate at which updates are asked to occur to be faster than the rate at which objects can be actually committed. For Chef server, these settings are configurable:
Sorry it wasn't helpful, I did misunderstand you. It was actually news to me that search wouldn't work until after the first chef run. I just tried it, and actually search *does* seem to work as soon as the node is created (at least in Chef 12.0.8 with Chef 12.3.0 client). One thing: populate the FQDN. That appears to make a bit of a difference. Here is what I did: > knife node create test > knife node search 'node:test' Works as expected. > knife node search 'node:*' Did not return the new node in one of my test runs, but did in another. Now add the fqdn attribute: > knife node edit test Add the fqdn attribute Then > knife node search 'node:*' Now the new node will show up. Whether this was due to adding the FQDN attribute, or coincidence, I don't know. It may simply take a bit of time for chef to add the new node to search indices. Kevin Keane The NetTech http://www.4nettech.com Our values: Privacy, Liberty, Justice See https://www.4nettech.com/corp/the-nettech-values.html -----Original message----- |
Archive powered by MHonArc 2.6.16.