lib: Add "unique_id" to ctdbd_process_exists
authorVolker Lendecke <vl@samba.org>
Tue, 29 Aug 2017 11:26:20 +0000 (13:26 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 26 Sep 2017 07:37:13 +0000 (09:37 +0200)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13042
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
source3/include/ctdbd_conn.h
source3/lib/ctdb_dummy.c
source3/lib/ctdbd_conn.c
source3/lib/serverid.c

index 4e7c1b05ddd98815488c2e3e1128c9bdf11bafa3..f6040ad833b25bb9acf3d38d0045d74ae49b4dfc 100644 (file)
@@ -50,7 +50,7 @@ int ctdbd_messaging_send_iov(struct ctdbd_connection *conn,
                             const struct iovec *iov, int iovlen);
 
 bool ctdbd_process_exists(struct ctdbd_connection *conn, uint32_t vnn,
-                         pid_t pid);
+                         pid_t pid, uint64_t unique_id);
 
 char *ctdbd_dbpath(struct ctdbd_connection *conn,
                   TALLOC_CTX *mem_ctx, uint32_t db_id);
index 8a06b0cc7cff3fbe9febb87b2d5792b0c9ab7dab..144c85077582b57b024e0677de11becc38483586 100644 (file)
@@ -62,7 +62,8 @@ int ctdbd_register_ips(struct ctdbd_connection *conn,
        return ENOSYS;
 }
 
-bool ctdbd_process_exists(struct ctdbd_connection *conn, uint32_t vnn, pid_t pid)
+bool ctdbd_process_exists(struct ctdbd_connection *conn, uint32_t vnn,
+                         pid_t pid, uint64_t unique_id)
 {
        return false;
 }
index bab489e71dd7056d6056bab0afd858c08775e568..2a7fd444b777ad144c15f3f210456bf8689ead8d 100644 (file)
@@ -781,7 +781,8 @@ static int ctdbd_control(struct ctdbd_connection *conn,
 /*
  * see if a remote process exists
  */
-bool ctdbd_process_exists(struct ctdbd_connection *conn, uint32_t vnn, pid_t pid)
+bool ctdbd_process_exists(struct ctdbd_connection *conn, uint32_t vnn,
+                         pid_t pid, uint64_t unique_id)
 {
        int32_t cstatus = 0;
        int ret;
index ca4bb27180705321eb3a8ef94a434f6f394bcef5..73004489befaa212f40a6642de36551fb046d582 100644 (file)
@@ -199,7 +199,7 @@ bool serverid_exists(const struct server_id *id)
 
        if (lp_clustering()) {
                return ctdbd_process_exists(messaging_ctdb_connection(),
-                                           id->vnn, id->pid);
+                                           id->vnn, id->pid, id->unique_id);
        }
 
        return false;