Re: systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Jan 09, 2019 at 10:43:38AM -0500, Steve Clark wrote:
> I am trying to understand what After= means in a unit file. Does it
> mean after the specified target is up and operational or only that
> the target has been started? 
> 
> I have something that needs postgres but postgres needs to be
> operational not just started. Sometimes it can take a bit for
> postgres to become operational. 

I believe that the postgresql service has Type=notify in it's service
definition, which means that it will notify systemd when it is
operational.  This means that if you have a service that has
After=postgresql.service, systemd should wait until after the
postgresql service notifies systemd that it is operational before your
service will be started.

If your service is starting and unable to connect to postgresql, then
I would say that's a bug in postgresql -- it shouldn't be notifying
systemd that it is operational until it actually is.

-- 
Jonathan Billings <billings@xxxxxxxxxx>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux