chef-cookbooks / runit

Development repository for the Chef Runit Cookbook
https://supermarket.chef.io/cookbooks/runit
Apache License 2.0
107 stars 197 forks source link

Create action with restart_on_update starts service early #176

Closed bison closed 7 years ago

bison commented 8 years ago

I have a few instances of a pattern where I create a runit_service with action :create, but don't start and enable it until the after some other action like a deploy, or at the end of the run with a delayed notification. I don't think this is possible after the restart_on_update changes in #170.

Delayed notifications for inline resources are run at the end of the provider action, not the end of the Chef run: docs in provider.rb -- So the new ruby blocks always start and enable the service immediately after creating it if restart_on_update is true.

I don't really know of a good a way around that, and maybe it's intended, but at the very least should probably be noted in the docs.

cwjohnston commented 8 years ago

Thanks for bringing this up, I think we'll address it via documentation.

cwjohnston commented 8 years ago

@bison would the approach described in #154 support your use case?

jarig commented 7 years ago

Also tackled the same issue, but from logstash cookbook. That makes the very first bootstrap to fail all the time and only second succeeds.

cheeseplus commented 7 years ago

This definitely isn't possible with use_inline_resources.