ctdb-daemon: Drop ctdbd --socket option
authorMartin Schwenke <martin@meltin.net>
Wed, 21 Feb 2018 03:58:04 +0000 (14:58 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 19 Mar 2018 01:23:18 +0000 (02:23 +0100)
Use environment variables for test-only options.

The setenv() can be dropped because the socket location is either the
compile-time default or the already set environment variable.

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

index 703cb7eb21905b1325ea3ddd4483d20e2aa5899e..8791ead1df9cca062e6b0123bd3f67664fab3d88 100644 (file)
        </listitem>
       </varlistentry>
 
-      <varlistentry>
-       <term>--socket=<parameter>FILENAME</parameter></term>
-       <listitem>
-         <para>
-           FILENAME specifies the name of the Unix domain socket that
-           ctdbd will create. This socket is used by local clients to
-           communicate with ctdbd.
-         </para>
-         <para>
-           The default is <filename>/usr/local/var/run/ctdb/ctdbd.socket</filename>.
-           You only need to use this option if you plan to run
-           multiple ctdbd daemons on the same physical host, usually
-           for testing.
-         </para>
-       </listitem>
-      </varlistentry>
-
       <varlistentry>
        <term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
        <listitem>
index 10e92f42f42f78789ea9912e67d9ea9c0c1f302d..63986b0388bdd0ae7b5f24de3da75f05b748b581 100644 (file)
@@ -117,7 +117,6 @@ int main(int argc, const char *argv[])
 
        struct poptOption popt_options[] = {
                POPT_AUTOHELP
-               { "socket", 0, POPT_ARG_STRING, &ctdb_socket, 0, "local socket name", "filename" },
                { "debug", 'd', POPT_ARG_STRING, &options.debuglevel, 0, "debug level", NULL },
                { "interactive", 'i', POPT_ARG_NONE, &interactive, 0, "don't fork", NULL },
                { "public-addresses", 0, POPT_ARG_STRING, &options.public_address_list, 0, "public address list file", "filename" },
@@ -217,7 +216,6 @@ int main(int argc, const char *argv[])
        setenv("CTDB_LOGGING", options.logging, 1);
        setenv("CTDB_DEBUGLEVEL", debug_level_to_string(DEBUGLEVEL), 1);
 
-       setenv("CTDB_SOCKET", ctdb_socket, 1);
        ret = ctdb_set_socketname(ctdb, ctdb_socket);
        if (ret == -1) {
                DEBUG(DEBUG_ERR, ("ctdb_set_socketname() failed\n"));