shlomoswidler / tabula_rasa

Run community cookbooks from within AWS OpsWorks without clashing with the older versions in opsworks-cookbooks
Apache License 2.0
9 stars 3 forks source link

After a failed `tabula_rasa::default` run, `tabula_rasa::update_tabula_rasa_cookbooks` is always skipped #8

Open nickjwebb opened 9 years ago

nickjwebb commented 9 years ago

I have a problem with tabula_rasa::update_tabula_rasa_cookbooks. Nearly every time I need it, I run it from the OpsWorks Run Command/Execute Recipes option under deployments, and it shows as successful "skipped."

This is not all the time, but most of the time. I believe it works only if tabula_rasa::default has been run successfully. That's irritating, as after a failed tabula_rasa::default run is exactly when you want to run tabula_rasa::update_tabula_rasa_cookbooks to fix whatever typo or item you left out of a custom recipe.

I am not sure this can be fixed, but a lower priority item I'd like to look at after #6 is resolved.

Workaround

One can get around this issue, it seems, by simply specifying tabula_rasa::update_tabula_rasa_cookbooks in the run list before tabula_rasa. So, for example, if you are using tabula_rasa in the Setup run list under Custom Chef Recipes, you can update the run list to be:

tabula_rasa::update_tabula_rasa_cookbooks tabula_rasa

That will force update_tabula_rasa_cookbooks to run, even if it would have been "skipped" when run under Execute Recipes.

Note: the workaround will fail if tabula_rasa has not been run as required directories do not exist yet. Thus the workaround will fail for newly created instances, you must remove tabula_rasa::update_tabula_rasa_cookbooks from the run list when starting new instances.

nickjwebb commented 9 years ago

More empirical evidence suggests this is reproducible. Just do something to make a tabula_rasa run to fail, then call tabula_rasa::update_tabula_rasa_cookbooks . . . if that doesn't result in Skipped I'd be shocked.