1

I am deploying a distributed service which uses an NFS share across a handful nodes. In this scenario, there is a master node which exports an NFS share and a number of slave nodes which must mount this export.

Using chef, I am able to provision the master node. Once the master node is completed, I can provision the slaves in parallel. However, if chef-client kicks off at (roughly) the same time on all nodes, the slaves fail because the NFS share on the server doesn't exist yet.

Using chef, how can I ensure that the provisioning of the master is completed before the slaves start? I suppose it would be acceptable for the slaves to pause (and possibly time out after a few minutes) waiting for the NFS export to be available, though it would be best if I could guarantee that the master was fully provisioned (all recipes/roles) before allowing a chef-client on a slave to proceed.

1 Answer 1

1

In general the best approach is to not ensure it all. Write your recipe code in a way that fails gracefully if dependencies aren't available, and then use chef-client's daemon mode (or run from cron) so it will keep trying as long as needed until it succeeds.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .