This is an interesting development.

How is sd_notify related to a service of Type=notify?

While the container is a highly useful extension or derivative of the 
process concept, it surprises me that containers don't better expose or 
promote useful inter-process communication mechanisms such as semaphores, 
signals, pipes, or message queues to facilitate container coordination on a 
host.

Derek

On Friday, 15 July 2016 05:51:30 UTC-4, Alban Crequy wrote:
>
> Hi, 
>
> There is work going on to implement systemd's mechanism for notifying 
> when an application is ready (sd_notify): 
> https://github.com/coreos/rkt/issues/1464 
>
> That's useful when the rkt pods are started as systemd services. When 
> this work in rkt is done, a rkt pod (e.g. PostgreSQL) would be able to 
> notify systemd on the host when it is ready to receive requests (fully 
> initialized), and systemd on the host could then only start other 
> dependencies (e.g. another rkt pod connecting to PostgreSQL). 
>
> For this to work, applications must implement the sd_notify mechanism. 
> But I see that PostgreSQL has support for sd_notify: 
>
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=7d17e683fcc28a1b371c7dd02935728cd2cbf9bf
>  
>
>
> Since sd_notify is not there yet in rkt, it is more difficult but in 
> some cases it is possible to use socket activation when the dependency 
> can be expressed in terms of a client connecting to the socket of a 
> server. See "Socket-activated service": 
> https://coreos.com/rkt/docs/latest/using-rkt-with-systemd.html 
>
> Cheers, 
> Alban 
>
> On Fri, Jul 15, 2016 at 2:15 AM, Derek Mahar <[email protected] 
> <javascript:>> wrote: 
> > What is the recommended approach to synchronizing containers in CoreOS? 
>  For 
> > example, how might CoreOS ensure the following container execution order 
> at 
> > startup? 
> > 
> > 1. Start PostgreSQL Server 
> > 2. Create schema (using separate one-shot Liquibase container) 
> > 3. Launch application 
> > 
> > The application cannot run without its database schema and Liquibase 
> cannot 
> > create the database schema without PostgreSQL Server being ready to 
> receive 
> > SQL statements.  Which mechanisms in CoreOS can we use to guarantee this 
> > ordering? 
> > 
> > Thank you, 
> > 
> > Derek 
>

Reply via email to