ctdb-daemon: Drop attempt to connect to Unix domain socket
authorMartin Schwenke <martin@meltin.net>
Thu, 22 Sep 2016 04:47:02 +0000 (14:47 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 22 Sep 2016 06:34:20 +0000 (08:34 +0200)
This was a weak attempt at exclusivity.  PID file creation now does
that properly.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_daemon.c

index 73bf1d478c4407b91d80756befa7989cb606ed84..82a203b5366c344aefa9dc3d2d10d560f686429e 100644 (file)
@@ -1007,15 +1007,6 @@ static int ux_socket_bind(struct ctdb_context *ctdb)
        addr.sun_family = AF_UNIX;
        strncpy(addr.sun_path, ctdb->daemon.name, sizeof(addr.sun_path)-1);
 
-       /* First check if an old ctdbd might be running */
-       if (connect(ctdb->daemon.sd,
-                   (struct sockaddr *)&addr, sizeof(addr)) == 0) {
-               DEBUG(DEBUG_CRIT,
-                     ("Something is already listening on ctdb socket '%s'\n",
-                      ctdb->daemon.name));
-               goto failed;
-       }
-
        /* Remove any old socket */
        unlink(ctdb->daemon.name);