ctdb-packaging: Fix systemd network dependency
authorMartin Schwenke <martin@meltin.net>
Thu, 8 Sep 2016 02:28:00 +0000 (12:28 +1000)
committerMartin Schwenke <martins@samba.org>
Wed, 14 Sep 2016 06:39:28 +0000 (08:39 +0200)
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ says:

  network.target has very little meaning during start-up. [...]
  Whether any network interfaces are already configured when it is
  reached is undefined. [...]

  network-online.target is a target that actively waits until the
  ne[t]work is "up",

CTDB expects to be able to bind a socket to a node address and expects
interfaces for public IP addresses to exist.  CTDB also doesn't expect
time to jump, so also wait until time is synchronised.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12255

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Steve French <sfrench@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Tested-by: Steve French <sfrench@samba.org>
ctdb/config/ctdb.service

index ea37c30bd2e4a3fb4e13c846518fa31b30ec49e5..63cdfa9ee3f7e0a7e3aa73a7d4f2e4610dd7ff64 100644 (file)
@@ -1,6 +1,6 @@
 [Unit]
 Description=CTDB
-After=network.target
+After=network-online.target time-sync.target
 
 [Service]
 Type=forking