threefoldtech / zinit

A init replacement that feels like runit written in rust+tokio
Apache License 2.0
10 stars 1 forks source link

wait for oneshot service to finish in the after list #3

Closed zaibon closed 5 years ago

zaibon commented 5 years ago

Given 2 services like init.yaml:

exec: /bin/init
oneshot: true

foo.yaml

exec: /bin/foo
after:
 - init

Currently foo will start as soon as init as been started. But if init takes some time to execute, foo can be started before init is done which is not the expected behavior since you ask to run after init and init is a oneshot. So I think when a dependency has the oneshot: true, zinit should wait for it to done before starting the dependent services

muhamadazmy commented 5 years ago

Fixed https://github.com/threefoldtech/zinit/commit/b814011e678454dfad6a58d120a464a75f1892ee