cluster: STABLE3 - config: time to say goodbye to ccsd

Fabio M. Di Nitto fabbione@fedoraproject.org
Thu Mar 12 09:13:00 GMT 2009


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=05f20f21c02e460b86d8371bb30619630052d1c2
Commit:        05f20f21c02e460b86d8371bb30619630052d1c2
Parent:        2766506287ef45dce3eb060fba23fd93538114d2
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Mon Jan 5 12:07:21 2009 +0100
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Thu Mar 12 09:33:13 2009 +0100

config: time to say goodbye to ccsd

remove all legacy code that won't be released from STABLE3 anymore

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 cman/init.d/cman.in                     |   77 +--
 config/Makefile                         |    2 +-
 config/daemons/Makefile                 |    8 -
 config/daemons/ccsd/Makefile            |   37 -
 config/daemons/ccsd/ccsd.c              |  905 --------------------
 config/daemons/ccsd/cluster_mgr.c       |  688 ---------------
 config/daemons/ccsd/cluster_mgr.h       |    6 -
 config/daemons/ccsd/cnx_mgr.c           | 1399 -------------------------------
 config/daemons/ccsd/cnx_mgr.h           |    7 -
 config/daemons/ccsd/comm_headers.h      |   48 --
 config/daemons/ccsd/debug.h             |    9 -
 config/daemons/ccsd/globals.c           |   19 -
 config/daemons/ccsd/globals.h           |   23 -
 config/daemons/ccsd/misc.c              |  388 ---------
 config/daemons/ccsd/misc.h              |   19 -
 config/daemons/man/Makefile             |    9 -
 config/daemons/man/ccsd.8               |   74 --
 config/libs/Makefile                    |    3 -
 config/libs/libccscompat/Makefile       |   15 -
 config/libs/libccscompat/libccscompat.c |  752 -----------------
 config/libs/libccscompat/libccscompat.h |   18 -
 config/man/Makefile                     |    3 +-
 config/man/ccs.7                        |   22 -
 config/plugins/Makefile                 |    3 -
 config/plugins/ccsais/Makefile          |   33 -
 config/plugins/ccsais/config.c          |  236 ------
 config/tools/ccs_tool/Makefile          |   12 -
 config/tools/ccs_tool/ccs_tool.c        |   57 --
 config/tools/ccs_tool/editconf.c        |   14 -
 config/tools/ccs_tool/update.c          |  673 ---------------
 config/tools/ccs_tool/update.h          |    6 -
 config/tools/man/Makefile               |    4 -
 config/tools/man/ccs_test.8             |  132 ---
 33 files changed, 7 insertions(+), 5694 deletions(-)

diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 2ec8b8e..288c267 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -139,8 +139,6 @@ fi
 #                   LDAP_BINDDN and LDAP_BINDPWD have to be either both set or both unset.
 # corosync_parser - use internal corosync config file parser.
 # openaisparser   - use internal openais config file parser.
-# ccsconfig       - read configuration from ccsd daemon. This method is deprecated
-#                   and available only if building the code with --enable_legacy_code.
 [ -n "$CONFIG_LOADER" ] && cman_join_opts+=" -C $CONFIG_LOADER"
 
 load_modules()
@@ -164,19 +162,6 @@ start_configfs()
     return 0
 }
 
-start_ccsd()
-{
-    # ccsd
-    status ccsd > /dev/null
-    if [ $? -ne 0 ]
-    then
-	errmsg=$(@SBINDIR@/ccsd $CCSD_OPTS 2>&1)
-	rtrn=$?
-	return $rtrn
-    fi
-    return 0
-}
-
 start_cman()
 {
     # cman
@@ -203,23 +188,6 @@ start_cman()
 		    return 1
 		fi
 		;;
-	    ccsconfig)
-		if [ -x @SBINDIR@/ccsd ]; then
-		    echo -n "   Starting ccsd... "
-		    start_ccsd
-		    if [ $? -eq 0 ] 
-		    then
-			echo "done"
-		    else
-			echo "failed"
-			errmsg="Unable to start ccsd"
-			return 1
-		    fi
-		else
-			errmsg="ccsconfig has been selected but ccsd does not appear to be installed or executable"
-			return 1
-		fi
-		;;
 	    *)
 		# nothing to do for now
 		;;
@@ -582,27 +550,6 @@ stop_configfs()
     return 0
 }
 
-stop_ccsd()
-{
-    for sec in $(seq 1 10)
-    do
-	if pidof ccsd > /dev/null 2>&1
-	then
-	    # get the pid of ccsd from /var/run/cluster/ccsd.pid
-	    # and break if the file is not there
-	    [ -r /var/run/cluster/ccsd.pid ] || break
-
-	    pid=$(cat /var/run/cluster/ccsd.pid)
-	    kill $pid > /dev/null 2>&1 || break
-	    
-	    sleep 1
-	else
-	    return 0
-	fi
-    done
-    return 1
-}
-
 stop_cman()
 {
     @SBINDIR@/cman_tool status > /dev/null 2>&1
@@ -725,16 +672,6 @@ stop()
 	return 1
     fi
 
-    echo -n "   Stopping ccsd... "
-    stop_ccsd
-    if [ $? -eq 0 ]
-    then
-	echo "done"
-    else
-	echo "failed"
-	return 1
-    fi
-
     echo -n "   Unmounting configfs... "
     stop_configfs
     if [ $? -eq 0 ]
@@ -750,15 +687,11 @@ stop()
 
 cmanstatus()
 {
-	if [ -n "$CONFIG_LOADER" ] && [ "$CONFIG_LOADER" = ccsconfig ]; then
-		errmsg=$( status ccsd 2>&1) || return 1
-	fi
-
-	errmsg=$( status groupd 2>&1) || return 1
-	errmsg=$( status fenced 2>&1) || return 1
-	errmsg=$( status dlm_controld 2>&1) || return 1
-	errmsg=$( status gfs_controld 2>&1) || return 1
-	errmsg=$( status cmannotifyd 2>&1) || return 1
+	errmsg=$( $status groupd 2>&1) || return 1
+	errmsg=$( $status fenced 2>&1) || return 1
+	errmsg=$( $status dlm_controld 2>&1) || return 1
+	errmsg=$( $status gfs_controld 2>&1) || return 1
+	errmsg=$( $status cmannotifyd 2>&1) || return 1
 
 	fence_xvmd_enabled || return 0
 	errmsg=$( status fence_xvmd 2>&1) || return 1
diff --git a/config/Makefile b/config/Makefile
index abae65c..50468ed 100644
--- a/config/Makefile
+++ b/config/Makefile
@@ -1,4 +1,4 @@
 include ../make/defines.mk
 include $(OBJDIR)/make/passthrough.mk
 
-SUBDIRS=libs plugins tools daemons man
+SUBDIRS=libs plugins tools man
diff --git a/config/daemons/Makefile b/config/daemons/Makefile
deleted file mode 100644
index 58121e8..0000000
--- a/config/daemons/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-include ../../make/defines.mk
-include $(OBJDIR)/make/passthrough.mk
-
-SUBDIRS = man
-
-ifdef legacy_code
-SUBDIRS += ccsd
-endif
diff --git a/config/daemons/ccsd/Makefile b/config/daemons/ccsd/Makefile
deleted file mode 100644
index 97802ea..0000000
--- a/config/daemons/ccsd/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-TARGET= ccsd
-
-SBINDIRT=$(TARGET)
-
-all: depends ${TARGET}
-
-include ../../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-OBJS=	ccsd.o \
-	cnx_mgr.o \
-	cluster_mgr.o \
-	misc.o \
-	globals.o
-
-CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-CFLAGS += -I${cmanincdir} `xml2-config --cflags` -I${logtincdir}
-CFLAGS += -I$(S)
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L${cmanlibdir} -lcman
-LDFLAGS += -L${logtlibdir} -llogthread
-LDFLAGS += `xml2-config --libs` -lpthread
-LDFLAGS += -L${libdir}
-
-${TARGET}: ${OBJS}
-	$(CC) -o $@ $^ $(LDFLAGS)
-
-depends:
-	$(MAKE) -C $(OBJDIR)/cman/lib all
-
-clean: generalclean
-
--include $(OBJS:.o=.d)
diff --git a/config/daemons/ccsd/ccsd.c b/config/daemons/ccsd/ccsd.c
deleted file mode 100644
index 452fcec..0000000
--- a/config/daemons/ccsd/ccsd.c
+++ /dev/null
@@ -1,905 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <libxml/parser.h>
-#include <liblogthread.h>
-
-#include "debug.h"
-#include "cnx_mgr.h"
-#include "cluster_mgr.h"
-#include "globals.h"
-#include "comm_headers.h"
-#include "misc.h"
-
-#include "copyright.cf"
-
-int debug = 0;
-int nodaemon = 0;
-extern volatile int quorate;
-int no_manager_opt=0;
-static int exit_now=0;
-static sigset_t signal_mask;
-static int signal_received = 0;
-
-static char *parse_cli_args(int argc, char *argv[]);
-static int check_cluster_conf(void);
-static void daemonize(void);
-static void print_start_msg(char *msg);
-static int join_group(int sfd, int loopback, int port);
-static int setup_local_socket(int backlog);
-static inline void process_signals(void);
-
-int main(int argc, char *argv[]){
-  int i,error=0;
-  int trueint = 1;
-  int sfds[3] = {-1,-1,-1}, afd;
-  struct sockaddr_storage addr;
-  struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr;
-  struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr;
-  int addr_size=0;
-  fd_set rset, tmp_set;
-  char *msg;
-
-  if(getenv("CCS_DEBUGLOG")) 
-    debug = 1;
-
-  msg = parse_cli_args(argc, argv);
-
-  if(check_cluster_conf()){
-    /* check_cluster_conf will print out errors if there are any */
-    exit(EXIT_FAILURE);
-  }
-
-  daemonize();
-
-  print_start_msg(msg);
-
-  if(msg){
-    free(msg);
-  }
-
-  if (!no_manager_opt){
-    if(start_cluster_monitor_thread()){
-      logt_print(LOG_ERR, "Unable to create thread.\n");
-      exit(EXIT_FAILURE);
-    }
-  }
-
-  memset(&addr, 0, sizeof(struct sockaddr_storage));
-
-  /** Setup the socket to communicate with the CCS library **/
-  if(IPv6 && (sfds[0] = socket(PF_INET6, SOCK_STREAM, 0)) < 0){
-    if(IPv6 == -1){
-      logt_print(LOG_DEBUG, "Unable to create IPv6 socket:: %s\n", strerror(errno));
-      IPv6=0;
-    } else {
-      logt_print(LOG_ERR, "Unable to create IPv6 socket");
-      exit(EXIT_FAILURE);
-    }
-  } else {
-    /* IPv6 is no longer optional for ccsd
-    IPv6 = (IPv6)? 1: 0;
-    */
-  }
-
-  logt_print(LOG_DEBUG, "Using %s\n", IPv6?"IPv6":"IPv4");
-
-  if(!IPv6 && (sfds[0] = socket(PF_INET, SOCK_STREAM, 0)) < 0){
-    logt_print(LOG_ERR, "Unable to create IPv4 socket");
-    exit(EXIT_FAILURE);
-  }
-
-  if(setsockopt(sfds[0], SOL_SOCKET, SO_REUSEADDR, &trueint, sizeof(int))){
-    logt_print(LOG_ERR, "Unable to set socket option");
-    exit(EXIT_FAILURE);
-  }
-
-  if(IPv6){
-    addr_size = sizeof(struct sockaddr_in6);
-    addr6->sin6_family = AF_INET6;
-    addr6->sin6_addr = in6addr_loopback;
-    addr6->sin6_port = htons(frontend_port);
-  } else {
-    addr_size = sizeof(struct sockaddr_in);
-    addr4->sin_family = AF_INET;
-    /*    addr4->sin_addr.s_addr = INADDR_LOOPBACK; */
-    inet_aton("127.0.0.1", (struct in_addr *)&(addr4->sin_addr.s_addr));
-    addr4->sin_port = htons(frontend_port);
-  }
- 
-  if(bind(sfds[0], (struct sockaddr *)&addr, addr_size) < 0){
-    logt_print(LOG_ERR, "Unable to bind socket");
-    close(sfds[0]);
-    exit(EXIT_FAILURE);
-  }
- 
-  listen(sfds[0], 5);
-
-
-  /** Setup the socket to communicate with the CCS library **/
-  sfds[1] = socket((IPv6)? PF_INET6: PF_INET, SOCK_DGRAM, 0);
-  if(sfds[1] < 0){
-    logt_print(LOG_ERR, "Socket creation failed");
-    exit(EXIT_FAILURE);
-  } else {
-    int trueint = 1;
-    if(setsockopt(sfds[1], SOL_SOCKET, SO_REUSEADDR, &trueint, sizeof(int))){
-      logt_print(LOG_ERR, "Unable to set socket option");
-      exit(EXIT_FAILURE);
-    }  
-  }
-
-  if(IPv6){
-    addr6->sin6_family = AF_INET6;
-    addr6->sin6_addr = in6addr_any;
-    addr6->sin6_port = htons(backend_port);
-  } else {
-    addr4->sin_family = AF_INET;
-    addr4->sin_addr.s_addr = INADDR_ANY;
-    addr4->sin_port = htons(backend_port);
-  }
- 
-  if(bind(sfds[1], (struct sockaddr *)&addr, addr_size) < 0){
-    logt_print(LOG_ERR, "Unable to bind socket");
-    close(sfds[1]);
-    return -errno;
-  }
-
-  if(IPv6 || multicast_address){
-    if(join_group(sfds[1], 1, backend_port)){
-      logt_print(LOG_ERR, "Unable to join multicast group.\n");
-      exit(EXIT_FAILURE);
-    }
-  }
- 
-  /* Set up the unix (local) socket for CCS lib comms */
-  sfds[2] = setup_local_socket(SOMAXCONN);
-
-  FD_ZERO(&rset);
-  FD_SET(sfds[0], &rset);
-  FD_SET(sfds[1], &rset);
-  if (sfds[2] >= 0) 
-    FD_SET(sfds[2], &rset);
-
-  logt_print(LOG_DEBUG, "Sending SIGTERM to parent\n");
-  kill(getppid(), SIGTERM);
-
-  while(1){
-    unsigned int len = addr_size;
-
-    process_signals();
-    
-    tmp_set = rset;
-
-    if((select(FD_SETSIZE, &tmp_set, NULL,NULL,NULL) < 0)){
-      if(errno != EINTR){
-	logt_print(LOG_ERR, "Select failed");
-      }
-      continue;
-    }
-    
-    for(i=0; i<3; i++){
-      if(sfds[i] < 0 || !FD_ISSET(sfds[i], &tmp_set)){
-	continue;
-      }
-      if(i == 0){
-	uint16_t port;
-	logt_print(LOG_DEBUG, "NORMAL CCS REQUEST.\n");
-	afd = accept(sfds[i], (struct sockaddr *)&addr, &len);
-	if(afd < 0){
-	  logt_print(LOG_ERR, "Unable to accept connection");
-	  continue;
-	}
-
-	port = (IPv6) ? addr6->sin6_port : addr4->sin_port;
-
-	logt_print(LOG_DEBUG, "Connection requested from port %u.\n", ntohs(port));
-
-	if(ntohs(port) > 1024){
-	  logt_print(LOG_ERR, "Refusing connection from port > 1024:  port = %d", ntohs(port));
-	  close(afd);
-	  continue;
-	}
-	if((error = process_request(afd))){
-	  logt_print(LOG_ERR, "Error while processing request: %s\n", strerror(-error));
-	}
-	close(afd);
-      } else if (i == 2) {
-	logt_print(LOG_DEBUG, "NORMAL CCS REQUEST.\n");
-	afd = accept(sfds[i], NULL, NULL);
-	if(afd < 0){
-	  logt_print(LOG_ERR, "Unable to accept connection");
-	  continue;
-	}
-
-	logt_print(LOG_DEBUG, "Connection requested from local socket\n");
-
-	if((error = process_request(afd))){
-	  logt_print(LOG_ERR, "Error while processing request: %s\n", strerror(-error));
-	}
-	close(afd);
-      } else {
-	logt_print(LOG_DEBUG, "BROADCAST REQUEST.\n");
-	if((error = process_broadcast(sfds[i]))){
-	  logt_print(LOG_ERR, "Error while processing broadcast: %s\n", strerror(-error));
-	}
-      }
-    }
-  }
-  exit(EXIT_SUCCESS);
-}
-
-
-/**
- * print_usage - print usage information
- * @stream: open file stream to print to
- *
- */
-static void print_usage(FILE *stream){
-  CCSENTER("print_usage");
-  fprintf(stream,
-	  "Usage:\n"
-	  "\n"
-	  "ccsd [Options]\n"
-	  "\n"
-	  "Options:\n"
-	  " -4            Use IPv4 only.\n"
-	  " -6            Use IPv6 only.\n"
-	  " -I            Use IP for everything (disables local sockets)\n"
-	  " -h            Help.\n"
-	  " -m <addr>     Specify multicast address (\"default\" ok).\n"
-	  " -n            No Daemon.  Run in the foreground.\n"
-	  " -d            Enable debugging output.\n"
-	  " -t <ttl>      Multicast threshold (aka Time to Live) value.\n"
-	  " -P [bcf]:#    Specify various port numbers.\n"
-	  " -V            Print version information.\n"
-	  " -X            No cluster manager, just read local " DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE ".\n"
-	  );
-  CCSEXIT("print_usage");
-}
-
-
-static int is_multicast_addr(char *addr_string){
-  int rtn = 0;
-  struct sockaddr_storage addr;
-  struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr;
-  struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr;
-
-  CCSENTER("is_multicast_addr");
-
-  if(inet_pton(AF_INET6, addr_string, &(addr6->sin6_addr)) > 0){
-    if(IN6_IS_ADDR_MULTICAST(&addr6->sin6_addr)){
-      rtn = AF_INET6;
-    }
-  } else if(inet_pton(AF_INET, addr_string, &(addr4->sin_addr)) > 0){
-    if(IN_MULTICAST(ntohl(addr4->sin_addr.s_addr))){
-      rtn = AF_INET;
-    }
-  }
-  CCSEXIT("is_multicast_addr");
-  return rtn;
-}
-
-
-/**
- * parse_cli_args
- * @argc:
- * @argv:
- *
- * This function parses the command line arguments. Additionally,
- * it sets the global 'config_file_location'.  This function
- * will either succeed or cause the program to exit.
- *
- * Returns: string (or NULL) describing changes, exit(EXIT_FAILURE) on error
- */
-static char *parse_cli_args(int argc, char *argv[]){
-  int c, error=0;
-  int buff_size=512;
-  char buff[buff_size];
-  int buff_index=0;
-
-  CCSENTER("parse_cli_args");
-
-  config_file_location = strdup(DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE);
-  lockfile_location = strdup(DEFAULT_CCSD_LOCKFILE);
-
-  if(!config_file_location || !lockfile_location){
-    fprintf(stderr, "Insufficient memory.\n");
-    error = -ENOMEM;
-    goto fail;
-  }
-
-  memset(buff, 0, buff_size);
-
-  while((c = getopt(argc, argv, "46Icdf:hlm:nP:t:sVX")) != -1){
-    switch(c){
-    case '4':
-      if(IPv6 == 1){
-	fprintf(stderr,
-		"Setting protocol to IPv4 conflicts with multicast address.\n");
-	error = -EINVAL;
-	goto fail;
-      }
-      IPv6=0;
-      buff_index += snprintf(buff+buff_index, buff_size-buff_index,
-			     "  IP Protocol:: IPv4 only\n");
-      break;
-    case '6':
-      if(IPv6 == 0){
-	fprintf(stderr,
-		"Setting protocol to IPv6 conflicts with previous protocol choice.\n");
-	error = -EINVAL;
-	goto fail;
-      }
-      IPv6=1;
-      buff_index += snprintf(buff+buff_index, buff_size-buff_index,
-			     "  IP Protocol:: IPv6 only\n");
-      break;
-    case 'I':
-      if (use_local) {
-        buff_index += snprintf(buff+buff_index, buff_size-buff_index,
-			       "  Communication:: Local sockets disabled\n");
-      }
-      use_local = 0;
-      break;
-    case 'c':
-      fprintf(stderr, "The '-c' option is deprecated.\n"
-	      "Try '-h' for help.\n");
-      error = -EINVAL;
-      goto fail;
-    case 'd':
-      debug = 1;
-      break;
-    case 'f':  /* might be usable for upgrade */
-      free(config_file_location);
-      config_file_location = optarg;
-      buff_index += snprintf(buff+buff_index, buff_size-buff_index,
-			     "  Config file location:: %s\n", optarg);
-      break;
-    case 'h':
-      print_usage(stdout);
-      exit(EXIT_SUCCESS);
-    case 'l':
-      fprintf(stderr, "The '-l' option is deprecated.\n"
-	      "Try '-h' for help.\n");
-      error = -EINVAL;
-      goto fail;
-    case 'm':
-      if(strcmp("default", optarg)){
-	int type = is_multicast_addr(optarg);
-	if((IPv6 == 1) && (type != AF_INET6)){
-	  fprintf(stderr, "%s is not a valid IPv6 multicast address.\n", optarg);
-	  error = -EINVAL;
-	  goto fail;
-	} else if((IPv6 == 0) && (type != AF_INET)){
-	  fprintf(stderr, "%s is not a valid IPv4 multicast address.\n", optarg);
-	  error = -EINVAL;
-	  goto fail;
-	} else if(type == 0){
-	  fprintf(stderr, "%s is not a valid multicast address.\n", optarg);
-	  error = -EINVAL;
-	  goto fail;
-	} else {
-	  IPv6 = (type == AF_INET6)? 1: 0;
-	  buff_index += snprintf(buff+buff_index, buff_size-buff_index,
-				 "  IP Protocol:: %s only*\n",
-				 (IPv6)? "IPv6" : "IPv4");
-	}
-      }
-      multicast_address = optarg;
-      buff_index += snprintf(buff+buff_index, buff_size-buff_index,
-			     "  Multicast (%s):: SET\n", optarg);
-      break;
-    case 'n':
-      nodaemon = 1;
-      buff_index += snprintf(buff+buff_index, buff_size-buff_index,
-			     "  No Daemon:: SET\n");
-      break;
-    case 'p':
-      free(lockfile_location);
-      lockfile_location = optarg;
-      buff_index += snprintf(buff+buff_index, buff_size-buff_index,
-			     "  Lock file location:: %s\n", optarg);
-      break;
-    case 'P':
-      if(optarg[1] != ':'){
-	fprintf(stderr, "Bad argument to '-P' option.\n"
-		"Try '-h' for help.\n");
-	error = -EINVAL;
-	goto fail;
-      }
-      switch(optarg[0]){
-      case 'b': /* backend port number */
-	backend_port = atoi(optarg+2);
-	if(backend_port < 1024){
-	  fprintf(stderr, "Bad backend port number.\n");
-	  error = -EINVAL;
-	  goto fail;
-	}
-	buff_index += snprintf(buff+buff_index, buff_size-buff_index,
-			       "  Backend Port:: %d\n", backend_port);
-	break;
-      case 'c': /* cluster base port number */
-	cluster_base_port = atoi(optarg+2);
-	if(cluster_base_port < 1024){
-	  fprintf(stderr, "Bad cluster base port number.\n");
-	  error = -EINVAL;
-	  goto fail;
-	}
-	buff_index += snprintf(buff+buff_index, buff_size-buff_index,
-			       "  Cluster base port:: %d\n", cluster_base_port);
-	break;
-      case 'f': /* frontend port number */
-	frontend_port = atoi(optarg+2);
-	if(frontend_port < 1024){
-	  fprintf(stderr, "Bad frontend port number.\n");
-	  error = -EINVAL;
-	  goto fail;
-	}
-	buff_index += snprintf(buff+buff_index, buff_size-buff_index,
-			       "  Frontend Port:: %d\n", frontend_port);
-	break;
-      default:
-	fprintf(stderr, "Bad argument to '-P' option.\n"
-		"Try '-h' for help.\n");
-	error = -EINVAL;
-	goto fail;
-      }
-      break;
-    case 's':
-      fprintf(stderr, "The '-s' option is deprecated.\n"
-	      "Try '-h' for help.\n");
-      error = -EINVAL;
-      goto fail;
-    case 't':
-      ttl = atoi(optarg);
-      break;
-    case 'V':
-      printf("%s %s (built %s %s)\n", argv[0], RELEASE_VERSION, __DATE__, __TIME__);
-      printf("%s\n", REDHAT_COPYRIGHT);
-      exit(EXIT_SUCCESS);
-    case 'X':
-      no_manager_opt = 1;
-      quorate = 1;
-      break;
-    default:
-      print_usage(stderr);
-      error = -EINVAL;
-      goto fail;
-    }
-  }
-
- fail:
-  CCSEXIT("parse_cli_args");
-
-  if(error){
-    exit(EXIT_FAILURE);
-  }
-  if(strlen(buff)){
-    return(strdup(buff));
-  } else {
-    return NULL;
-  }
-}
-
-
-/*
- * check_cluster_conf - check validity of local copy of cluster.conf
- *
- * This function tries to parse the xml doc at 'config_file_location'.
- * If it fails, it gives instructions to the user.
- *
- * Returns: 0 on success, -1 on failure
- */
-static int check_cluster_conf(void){
-  struct stat stat_buf;
-  xmlDocPtr doc = NULL;
-
-  CCSENTER("check_cluster_conf");
-
-  if(!stat(config_file_location, &stat_buf)){
-    doc = xmlParseFile(config_file_location);
-    if(!doc){
-      fprintf(stderr, "\nUnable to parse %s.\n"
-	      "You should either:\n"
-	      " 1. Correct the XML mistakes, or\n"
-	      " 2. (Re)move the file and attempt to grab a "
-	      "valid copy from the network.\n", config_file_location);
-      return -1;
-    }
-  } else {
-    /* no cluster.conf file.  This is fine, just need to get it from the network */
-    if(no_manager_opt){
-      fprintf(stderr, "\nNo local config file found: %s\n", config_file_location);
-      return -1;
-    }
-  }
-
-  set_ccs_logging(doc, 0);
-  if(doc)
-	xmlFreeDoc(doc);
-
-  CCSEXIT("check_cluster_conf");
-  return 0;
-}
-
-
-/**
- * create_lockfile - create and lock a lock file
- * @lockfile: location of lock file
- *
- * Returns: 0 on success, -1 otherwise
- */
-static int create_lockfile(char *lockfile){
-  int fd, error=0;
-  struct stat stat_buf;
-  struct flock lock;
-  char buffer[50];
-
-  CCSENTER("create_lockfile");
-   
-  if(!strncmp(lockfile, "/var/run/cluster/", 17)){
-    if(stat("/var/run/cluster", &stat_buf)){
-      if(mkdir("/var/run/cluster", S_IRWXU)){
-        logt_print(LOG_ERR, "Cannot create lockfile directory");
-        error = -errno;
-	goto fail;
-      }
-    } else if(!S_ISDIR(stat_buf.st_mode)){
-      logt_print(LOG_ERR, "/var/run/cluster is not a directory.\n"
-              "Cannot create lockfile.\n");
-      error = -ENOTDIR;
-      goto fail;
-    }
-  }
- 
-  if((fd = open(lockfile, O_CREAT | O_WRONLY,
-                (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH))) < 0){
-    logt_print(LOG_ERR, "Cannot create lockfile");
-    error = -errno;
-    goto fail;
-  }
- 
-  lock.l_type = F_WRLCK;
-  lock.l_start = 0;
-  lock.l_whence = SEEK_SET;
-  lock.l_len = 0;
- 
-  if (fcntl(fd, F_SETLK, &lock) < 0) {
-    close(fd);
-    logt_print(LOG_ERR, "The ccsd process is already running.\n");
-    error = -errno;
-    goto fail;
-  }
- 
-  if (ftruncate(fd, 0) < 0) {
-    close(fd);
-    error = -errno;
-    goto fail;
-  }
- 
-  sprintf(buffer, "%d\n", getpid());
- 
-  if(write(fd, buffer, strlen(buffer)) < strlen(buffer)){
-    close(fd);
-    unlink(lockfile);
-    error = -errno;
-    goto fail;
-  }
-
- fail: 
-  CCSEXIT("create_lockfile");
-  
-  /* leave fd open - rely on exit to close it */
-  if(error){
-    return error;
-  } else {
-    return 0;
-  }
-}
-
-
-/**
- * parent_exit_handler: exit the parent
- * @sig: the signal
- *
- */
-static void parent_exit_handler(int sig){
-  CCSENTER("parent_exit_handler");
-  exit_now=1;
-  CCSEXIT("parent_exit_handler");
-}
-
-
-/**
- * sig_handler
- * @sig
- *
- * This handles signals which the daemon might receive.
- */
-static void sig_handler(int sig){
-  sigaddset(&signal_mask, sig);
-  ++signal_received;
-}
-
-static void process_signal(int sig){
-  int err;
-
-  CCSENTER("sig_handler");
-
-  switch(sig) {
-  case SIGINT:
-    logt_print(LOG_INFO, "Stopping ccsd, SIGINT received.\n");
-    err = EXIT_SUCCESS;
-    break;
-  case SIGQUIT:
-    logt_print(LOG_INFO, "Stopping ccsd, SIGQUIT received.\n");
-    err = EXIT_SUCCESS;
-    break;
-  case SIGTERM:
-    logt_print(LOG_INFO, "Stopping ccsd, SIGTERM received.\n");
-    err = EXIT_SUCCESS;
-    break;
-  case SIGHUP:
-    logt_print(LOG_INFO, "SIGHUP received.\n");
-    logt_print(LOG_INFO, "Use ccs_tool for updates.\n");
-    return;
-    break;
-  default:
-    logt_print(LOG_ERR, "Stopping ccsd, unknown signal %d received.\n", sig);
-    err = EXIT_FAILURE;
-  }
-
-  CCSEXIT("sig_handler");
-  exit(err);
-}
-
-
-static inline void process_signals(void)
-{
-  int x;
-
-  if (!signal_received)
-    return;
-
-  signal_received = 0;
-
-  for (x = 1; x < _NSIG; x++) {
-    if (sigismember(&signal_mask, x)) {
-      sigdelset(&signal_mask, x);
-      process_signal(x);
-    }
-  }
-}
-
-
-/**
- * daemonize
- *
- * This function will do the following:
- * - daemonize, if required
- * - set up the lockfile
- * - set up logging
- * - set up signal handlers
- * It will cause the program to exit if there is a failure.
- */
-static void daemonize(void){
-  int error=0;
-  int pid;
-
-  CCSENTER("daemonize");
-
-  if(nodaemon){
-    logt_print(LOG_DEBUG, "Entering non-daemon mode.\n");
-    if((error = create_lockfile(lockfile_location))){
-      goto fail;
-    }
-  } else {
-    logt_print(LOG_DEBUG, "Entering daemon mode.\n");
-
-    signal(SIGTERM, &parent_exit_handler);
-
-    pid = fork();
-
-    if(pid < 0){
-      logt_print(LOG_ERR, "Unable to fork().\n");
-      error = pid;
-      goto fail;
-    }
-
-    if(pid){
-      int status;
-      while(!waitpid(pid, &status, WNOHANG) && !exit_now);
-      if(exit_now) {
-	exit(EXIT_SUCCESS);
-      }
-
-      switch(WEXITSTATUS(status)){
-      case EXIT_CLUSTER_FAIL:
-	logt_print(LOG_ERR, "Failed to connect to cluster manager.\n");
-	break;
-      case EXIT_LOCKFILE:
-	logt_print(LOG_ERR, "Failed to create lockfile.\n");
-	logt_print(LOG_ERR, "Hint: ccsd is already running.\n");
-	break;
-      }
-      exit(EXIT_FAILURE);
-    }
-    ppid = getppid();
-    setsid();
-    if(chdir("/") < 0)
-	goto fail;
-    umask(0);
-
-    close(0); close(1); close(2);
-    open("/dev/null", O_RDONLY); /* reopen stdin */
-    open("/dev/null", O_WRONLY); /* reopen stdout */
-    open("/dev/null", O_WRONLY); /* reopen stderr */
-
-    if((error = create_lockfile(lockfile_location))){
-      exit(EXIT_LOCKFILE);
-    }
-
-    /* Make the parent stop waiting */
-    //logt_print(LOG_DEBUG, "Die early\n");
-    //kill(getppid(), SIGTERM);
-  }
-
-  signal(SIGINT, &sig_handler);
-  signal(SIGQUIT, &sig_handler);
-  signal(SIGTERM, &sig_handler);
-  signal(SIGHUP, &sig_handler);
-  signal(SIGPIPE, SIG_IGN);
-  sigemptyset(&signal_mask);
-  signal_received = 0;
-
- fail:
-  CCSEXIT("daemonize");
-
-  if(error){
-    exit(EXIT_FAILURE);
-  }
-}
-
-
-/**
- * print_start_msg
- *
- */
-static void print_start_msg(char *msg){
-  CCSENTER("print_start_msg");
-  /* We want the start message to print every time */
-  logt_print(LOG_INFO, "Starting ccsd %s:\n", RELEASE_VERSION);
-  logt_print(LOG_INFO, " Built: "__DATE__" "__TIME__"\n");
-  logt_print(LOG_INFO, " %s\n", REDHAT_COPYRIGHT);
-  if(msg){
-    logt_print(LOG_INFO, "%s\n", msg);
-  }
-  CCSEXIT("print_start_msg");
-}
-
-
-static int join_group(int sfd, int loopback, int port){
-  int error = 0;
-  char *addr_string;
-  struct sockaddr_storage addr;
-  struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr;
-  struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr;
- 
-  CCSENTER("join_group");
-  
-  if(IPv6){
-    if(!multicast_address || !strcmp("default", multicast_address)){
-      addr_string = "ff02::3:1";
-    } else {
-      addr_string = multicast_address;
-    }
-    inet_pton(AF_INET6, addr_string, &(addr6->sin6_addr));
-    addr6->sin6_family = AF_INET6;
-    addr6->sin6_port = htons(port);
-  } else {
-    if(!strcmp("default", multicast_address)){
-      addr_string = "224.0.2.5";
-    } else {
-      addr_string = multicast_address;
-    }
-    inet_pton(AF_INET, addr_string, &(addr4->sin_addr));
-    addr4->sin_family = AF_INET;
-    addr4->sin_port = htons(port);
-  }
-
-  if(addr.ss_family == AF_INET){
-    struct ip_mreq mreq;
-
-    mreq.imr_multiaddr.s_addr = addr4->sin_addr.s_addr;
-    mreq.imr_interface.s_addr = INADDR_ANY;
-
-    if(setsockopt(sfd, IPPROTO_IP, IP_MULTICAST_LOOP,
-		  &loopback, sizeof(loopback)) < 0){
-      logt_print(LOG_ERR, "Unable to %s loopback.\n", loopback?"SET":"UNSET");
-      error = -errno;
-      goto fail;
-    }
-    if(setsockopt(sfd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
-		  (const void *)&mreq, sizeof(mreq)) < 0){
-      logt_print(LOG_ERR, "Unable to add to membership.\n");
-      error = -errno;
-      goto fail;
-    }
-  } else if(addr.ss_family == AF_INET6){
-    struct ipv6_mreq mreq;
-
-    memcpy(&mreq.ipv6mr_multiaddr, &(addr6->sin6_addr), sizeof(struct in6_addr));
-
-    mreq.ipv6mr_interface = 0;
-
-    if(setsockopt(sfd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP,
-		  &loopback, sizeof(loopback)) < 0){
-      logt_print(LOG_ERR, "Unable to %s loopback.\n", loopback?"SET":"UNSET");
-      error = -errno;
-      goto fail;
-    }
-    if(setsockopt(sfd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP,
-		  (const void *)&mreq, sizeof(mreq)) < 0){
-      logt_print(LOG_ERR, "Unable to add to membership: %s\n", strerror(errno));
-      error = -errno;
-      goto fail;
-    }
-  } else {
-    logt_print(LOG_ERR, "Unknown address family.\n");
-    error = -EINVAL;
-  }
- fail:
-  CCSEXIT("join_group");
-  return 0;
-}
-
-int setup_local_socket(int backlog)
-{
-  int sock = -1;
-  struct sockaddr_un su;
-  mode_t om;
-
-  CCSENTER("setup_local_socket");
-  if (use_local == 0)
-    goto fail;
-
-  sock = socket(PF_LOCAL, SOCK_STREAM, 0);
-  if (sock < 0)
-    goto fail;
-
-  /* This is ours ;) */
-  unlink(COMM_LOCAL_SOCKET);
-  om = umask(077);
-  su.sun_family = PF_LOCAL;
-  snprintf(su.sun_path, sizeof(su.sun_path), COMM_LOCAL_SOCKET);
-
-  if (bind(sock, &su, sizeof(su)) < 0) {
-    umask(om);
-    goto fail;
-  }
-  umask(om);
-
-  if (listen(sock, backlog) < 0)
-    goto fail;
-
-  logt_print(LOG_DEBUG, "Set up local socket on %s\n", su.sun_path);
-  CCSEXIT("setup_local_socket");
-  return sock;
-fail:
-  if (sock >= 0)
-    close(sock);
-  CCSEXIT("setup_local_socket");
-  return -1;
-}
diff --git a/config/daemons/ccsd/cluster_mgr.c b/config/daemons/ccsd/cluster_mgr.c
deleted file mode 100644
index bdfcd59..0000000
--- a/config/daemons/ccsd/cluster_mgr.c
+++ /dev/null
@@ -1,688 +0,0 @@
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <pthread.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <errno.h>
-#include <libxml/parser.h>
-#include <liblogthread.h>
-
-#include "comm_headers.h"
-#include "debug.h"
-#include "misc.h"
-#include "globals.h"
-#include "libcman.h"
-
-typedef struct member_list {
-  int count;
-  int pad;
-  cman_node_t *nodes;
-} member_list_t;
-
-static member_list_t *members = NULL;
-
-static member_list_t *get_member_list(cman_handle_t handle);
-static void free_member_list(member_list_t *list);
-static char *member_id_to_name(member_list_t *list, int node);
-static int member_addr_to_id(member_list_t *list, struct sockaddr *addr);
-
-static int select_retry(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *xfds,
-			struct timeval *timeout);
-
-static ssize_t read_retry(int fd, void *buf, int count, struct timeval *timeout);
-
-static int check_update_doc(xmlDocPtr tmp_doc)
-{
-  int error = 0;
-
-  char *str1 = NULL;
-  char *str2 = NULL;
-
-  CCSENTER("check_update_doc");
-
-  if (!(str1 = get_cluster_name(tmp_doc))) {
-    logt_print(LOG_ERR, "Unable to get cluster name from new config file.\n");
-    error = -EINVAL;
-    goto fail;
-  }
-
-  if (master_doc && master_doc->od_doc &&
-      !(str2 = get_cluster_name(master_doc->od_doc))) {
-    logt_print(LOG_DEBUG, "Unable to get cluster name from current master doc.\n");
-  }
-
-  if (str2 && strcmp(str1, str2)) {
-    logt_print(LOG_ERR, "Cluster names for current and update configs do not match.\n");
-    logt_print(LOG_ERR, "  Current cluster name:: <%s>\n", str2);
-    logt_print(LOG_ERR, "  Proposed update name:: <%s>\n", str1);
-    error = -EINVAL;
-    goto fail;
-  }
-
-  if (master_doc && master_doc->od_doc &&
-      (get_doc_version(tmp_doc) <= get_doc_version(master_doc->od_doc))) {
-    logt_print(LOG_ERR, "Proposed updated config file does not have greater version number.\n");
-    logt_print(LOG_ERR, "  Current config_version :: %d\n", get_doc_version(master_doc->od_doc));
-    logt_print(LOG_ERR, "  Proposed config_version:: %d\n", get_doc_version(tmp_doc));
-    error = -EINVAL;
-  }
-
-fail:
-
-  if (str1) {
-    free(str1);
-  }
-
-  if (str2) {
-    free(str2);
-  }
-
-  CCSEXIT("check_update_doc");
-  return error;
-}
-
-static int handle_cluster_message(int fd)
-{
-  int error = 0;
-  int unlock = 0;
-  int socket = -1;
-
-  FILE *fp = NULL;
-  char *buffer = NULL;
-  xmlDocPtr tmp_doc = NULL;
-  comm_header_t ch;
-  uint64_t nodeid;
-  mode_t old_mode;
-  socklen_t client_len;
-
-  struct timeval tv;
-  struct sockaddr client_addr;
-  static uint64_t master_node = 0;
-
-  CCSENTER("handle_cluster_message");
-
-  logt_print(LOG_DEBUG, "Cluster message on socket: %d\n", fd);
-
-  client_len = sizeof(client_addr);
-
-  if ((socket = accept(fd, &client_addr, &client_len)) < 0) {
-    logt_print(LOG_ERR, "Failed to accept connection.\n");
-    goto fail;
-  }
-
-  if ((nodeid = member_addr_to_id(members, &client_addr)) < 0) {
-    logt_print(LOG_ERR, "Unable to determine node ID.\n");
-    goto fail;
-  }
-
-  logt_print(LOG_DEBUG, "Accept socket: %d\n", socket);
-
-  error = recv(socket, &ch, sizeof(comm_header_t), MSG_PEEK);
-
-  if (error < 0) {
-    logt_print(LOG_ERR, "Failed to receive message from %s\n",
-		member_id_to_name(members, nodeid));
-    goto fail;
-  }
-
-  logt_print(LOG_DEBUG, "Message (%d bytes) received from %s\n",
-	  error, member_id_to_name(members, nodeid));
-
-  swab_header(&ch);
-
-  if (ch.comm_type != COMM_UPDATE) {
-    logt_print(LOG_ERR, "Unexpected communication type (%d)... ignoring.\n",
-	    ch.comm_type);
-    error = -EINVAL;
-    goto fail;
-  }
-
-  if (ch.comm_flags == COMM_UPDATE_NOTICE) {
-    buffer = malloc(ch.comm_payload_size + sizeof(comm_header_t));
-    if (!buffer) {
-      logt_print(LOG_ERR, "Unable to allocate space to perform update.\n");
-      error = -ENOMEM;
-      goto fail;
-    }
-
-    logt_print(LOG_DEBUG, "Updated config size:: %d\n", ch.comm_payload_size);
-
-    tv.tv_sec = 5;
-    tv.tv_usec = 0;
-
-    error = read_retry(socket, buffer, ch.comm_payload_size + sizeof(comm_header_t), &tv);
-
-    if (error < 0) {
-      logt_print(LOG_ERR, "Unable to retrieve updated config");
-      goto fail;
-    }
-
-    pthread_mutex_lock(&update_lock);
-    unlock = 1;
-
-    logt_print(LOG_DEBUG, "Got lock 0\n");
-    
-    tmp_doc = xmlParseMemory(buffer+sizeof(comm_header_t), ch.comm_payload_size);
-
-    if (!tmp_doc) {
-      logt_print(LOG_ERR, "Unable to parse updated config file.\n");
-      /* ATTENTION -- need better error code */
-      error = -EIO;
-      goto fail;
-    }
-
-    if ((error = check_update_doc(tmp_doc)) < 0) {
-      goto fail;
-    }
-
-    old_mode = umask(026);
-
-    fp = fopen(DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE "-update", "w");
-
-    umask(old_mode);
-
-    if (!fp) {
-      logt_print(LOG_ERR, "Unable to open " DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE "-update");
-      error = -errno;
-      goto fail;
-    }
-
-    if (xmlDocDump(fp, tmp_doc) < 0) {
-      logt_print(LOG_ERR, "Unable to write " DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE "-update");
-      goto fail;
-    }
-
-    logt_print(LOG_DEBUG, "Upload of new config file from %s complete.\n",
-	    member_id_to_name(members, nodeid));
-
-    ch.comm_payload_size = 0;
-    ch.comm_flags = COMM_UPDATE_NOTICE_ACK;
-
-    logt_print(LOG_DEBUG, "Sending COMM_UPDATE_NOTICE_ACK.\n");
-
-    swab_header(&ch);
-
-    if ((error = write(socket, &ch, sizeof(comm_header_t))) < 0) {
-      logt_print(LOG_ERR, "Unable to send COMM_UPDATE_NOTICE_ACK.\n");
-      goto fail;
-    }
-
-    master_node = nodeid;
-    error = 0;
-  }
-
-  else if(ch.comm_flags == COMM_UPDATE_COMMIT) {
-
-    tv.tv_sec = 5;
-    tv.tv_usec = 0;
-
-    error = read_retry(socket, &ch, sizeof(comm_header_t), &tv);
-
-    if (master_node != nodeid) {
-      logt_print(LOG_ERR, "COMM_UPDATE_COMMIT received from node other than initiator.\n");
-      logt_print(LOG_ERR, "Hint: There may be multiple updates happening at once.\n");
-      error = -EPERM;
-      goto fail;
-    }
-
-    pthread_mutex_lock(&update_lock);
-
-    unlock = 1;
-
-    logt_print(LOG_DEBUG, "Got lock 1\n");
-
-    tmp_doc = xmlParseFile(DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE "-update");
-
-    if (!tmp_doc) {
-      logt_print(LOG_ERR, "Unable to parse updated config file.\n");
-      /* ATTENTION -- need better error code */
-      error = -EIO;
-      goto fail;
-    }
-
-    if ((error = check_update_doc(tmp_doc)) < 0) {
-      goto fail;
-    }
-
-    old_mode = umask(026);
-
-    fp = fopen(DEFAULT_CONFIG_DIR "/." DEFAULT_CONFIG_FILE, "w");
-
-    umask(old_mode);
-
-    if (!fp) {
-      logt_print(LOG_ERR, "Unable to open " DEFAULT_CONFIG_DIR "/." DEFAULT_CONFIG_FILE);
-      error = -errno;
-      goto fail;
-    }
-
-    if (xmlDocDump(fp, tmp_doc) < 0) {
-      logt_print(LOG_ERR, "Unable to write " DEFAULT_CONFIG_DIR "/." DEFAULT_CONFIG_FILE);
-      goto fail;
-    }
-
-    rename(DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE "-update", DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE);
-
-    update_required = 1;
-    ch.comm_flags = COMM_UPDATE_COMMIT_ACK;
-
-    logt_print(LOG_DEBUG, "Sending COMM_UPDATE_COMMIT_ACK.\n");
-
-    swab_header(&ch);
-
-    if ((error = write(socket, &ch, sizeof(comm_header_t))) < 0) {
-      logt_print(LOG_ERR, "Unable to send COMM_UPDATE_NOTICE_ACK.\n");
-      goto fail;
-    }
-
-    error = 0;
-  }
-
-fail:
-
-  if (fp) {
-    fclose(fp);
-  }
-
-  if (socket >= 0) {
-    close(socket);
-  }
-
-  if (buffer) {
-    free(buffer);
-  }
-
-  if (tmp_doc) {
-    xmlFreeDoc(tmp_doc);
-  }
-
-  if (unlock) {
-    pthread_mutex_unlock(&update_lock);
-  }
-
-  CCSEXIT("handle_cluster_message");
-  return error;
-}
-
-
-static void cman_callback(cman_handle_t handle, void *private, int reason, int arg)
-{
-  switch (reason) {
-    case CMAN_REASON_TRY_SHUTDOWN:
-      cman_replyto_shutdown(handle, 1);
-      break;
-
-    case CMAN_REASON_STATECHANGE:
-      quorate = cman_is_quorate(handle);
-      free_member_list(members);
-      members = get_member_list(handle);
-      break;
-
-    default:
-      break;
-  }
-}
-
-
-static int handle_cluster_event(cman_handle_t handle)
-{
-  CCSENTER("handle_cluster_event");
-
-  int rv = 1;
-  while (rv > 0) {
-    rv = cman_dispatch(handle, CMAN_DISPATCH_ALL);
-  }
-  if (rv < 0) {
-    return -1;
-  }
-
-  CCSEXIT("handle_cluster_event");
-  return 0;
-}
-
-
-static void cluster_communicator(void)
-{
-  int ccsd_fd = -1;
-  int cman_fd = -1;
-  int warn_user = 0;
-  int opt = 1;
-  int max_fd;
-  int n;
-  int cc_flags;
-
-  fd_set rset;
-  cman_handle_t handle = NULL;
-
-  struct sockaddr_storage addr;
-  struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr;
-  struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr;
-  int addr_size=0;
-
-  CCSENTER("cluster_communicator");
-
-  memset(&addr, 0, sizeof(struct sockaddr_storage));
-
-  if (IPv6) {
-    if ((ccsd_fd = socket(PF_INET6, SOCK_STREAM, 0)) < 0) {
-      if(IPv6 == -1) {
-	logt_print(LOG_DEBUG, "Unable to create IPv6 socket:: %s\n", strerror(errno));
-	IPv6=0;
-     }
-    }
-  }
-
-  if (!IPv6) {
-    if ((ccsd_fd = socket(PF_INET, SOCK_STREAM, 0)) < 0) {
-      logt_print(LOG_ERR, "Unable to create IPv4 socket.\n");
-      exit(EXIT_FAILURE);
-    }
-  }
-
-  if (setsockopt(ccsd_fd, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof(opt)) < 0) {
-    logt_print(LOG_ERR, "Unable to set socket option");
-    exit(EXIT_FAILURE);
-  }
-
-  if(IPv6){
-    addr_size = sizeof(struct sockaddr_in6);
-    addr6->sin6_family = AF_INET6;
-    addr6->sin6_addr = in6addr_any;
-    addr6->sin6_port = htons(cluster_base_port);
-  } else {
-    addr_size = sizeof(struct sockaddr_in);
-    addr4->sin_family = AF_INET;
-    addr4->sin_addr.s_addr = INADDR_ANY;
-    addr4->sin_port = htons(cluster_base_port);
-  }
-
-  cc_flags = fcntl(ccsd_fd, F_GETFD, 0);
-  cc_flags |= FD_CLOEXEC;
-  fcntl(ccsd_fd, F_SETFD, cc_flags);
-
-  if (bind(ccsd_fd, (struct sockaddr *)&addr, addr_size) < 0) {
-    logt_print(LOG_ERR, "Unable to bind to socket.\n");
-    close(ccsd_fd);
-    exit(EXIT_FAILURE);
-  }
-
-  if (listen(ccsd_fd, 15) < 0) {
-    logt_print(LOG_ERR, "Unable to listen to socket.\n");
-    close(ccsd_fd);
-    exit(EXIT_FAILURE);
-  }
-
-restart:
-
-  while (handle == NULL)
-  {
-    handle = cman_init(NULL);
-
-    if (handle == NULL) {
-
-      warn_user++;
-
-      if (!(warn_user % 30))
-      {
-	logt_print(LOG_ERR, "Unable to connect to cluster infrastructure after %d seconds.\n",
-		warn_user);
-      }
-
-      sleep(1);
-    }
-  }
-
-  if (ppid) {
-    kill(ppid, SIGTERM);	
-    ppid = 0;
-  }
-
-  cman_start_notification(handle, cman_callback);
-
-  quorate = cman_is_quorate(handle);
-
-  logt_print(LOG_INFO, "Initial status:: %s\n", (quorate)? "Quorate" : "Inquorate");
-
-  members = get_member_list(handle);
-
-  while (1)
-  {
-    FD_ZERO(&rset);
-    cman_fd = cman_get_fd(handle);
-
-    FD_SET(ccsd_fd, &rset);
-    FD_SET(cman_fd, &rset);
-
-    max_fd = (ccsd_fd > cman_fd) ? ccsd_fd : cman_fd;
-
-    logt_print(LOG_DEBUG, "Waiting for cluster event.\n");
-    
-    if ((n = select((max_fd + 1), &rset, NULL, NULL, NULL)) < 0) {
-      logt_print(LOG_ERR, "Select failed");
-      continue;
-    }
-
-    logt_print(LOG_DEBUG, "There are %d cluster messages waiting.\n", n);
-
-    while (n)
-    {
-      logt_print(LOG_DEBUG, "There are %d messages remaining.\n", n);
-
-      n--;
-
-      if (FD_ISSET(ccsd_fd, &rset)) {
-	handle_cluster_message(ccsd_fd);
-      }
-
-      if (FD_ISSET(cman_fd, &rset)) {
-        if (handle_cluster_event(handle)) {
-	  cman_finish(handle);
-	  handle = NULL;
-	  goto restart;
-	}
-      }
-    }
-  }
-
-  CCSEXIT("cluster_communicator");
-}
-
-
-int start_cluster_monitor_thread(void) {
-  int error = 0;
-  pthread_t thread;
-
-  CCSENTER("start_cluster_monitor_thread");
-
-  pthread_mutex_init(&update_lock, NULL);
-
-  error = pthread_create(&thread, NULL, (void *)cluster_communicator, NULL);
-
-  if (error) {
-    logt_print(LOG_ERR, "Failed to create thread: %s\n", strerror(-error));
-    goto fail;
-  }
-
-  pthread_detach(thread);
-
-fail:
-
-  CCSEXIT("start_cluster_monitor_thread");
-  return error;
-}
-
-
-static member_list_t *get_member_list(cman_handle_t handle)
-{
-  int count = 0;
-
-  member_list_t *list = NULL;
-  cman_node_t *nodes = NULL;
-
-  do
-  {
-
-    if (nodes != NULL) {
-      free(nodes);
-    }
-
-    count = cman_get_node_count(handle);
-
-    if (count <= 0) {
-      return NULL;
-    }
-
-    if (list == NULL) {
-      list = malloc(sizeof(*list));
-    }
-
-    if (list == NULL) {
-      return NULL;
-    }
-
-    nodes = malloc(sizeof(*nodes) * count);
-
-    if (nodes == NULL) {
-      free(list);
-      return NULL;
-    }
-
-    memset(list, 0, sizeof(*list));
-    memset(nodes, 0, sizeof(*nodes) * count);
-
-    cman_get_nodes(handle, count, &list->count, nodes);
-
-  } while (list->count != count);
-
-  list->count = count;
-  list->nodes = nodes;
-
-  return list;
-}
-
-
-static void free_member_list(member_list_t *list)
-{
-  if (list != NULL) {
-    if (list->nodes != NULL) {
-      free(list->nodes);
-    }
-    free(list);
-  }
-}
-
-
-static char *member_id_to_name(member_list_t *list, int node)
-{
-  int i;
-
-  for (i = 0; i < list->count; i++) {
-    if (list->nodes[i].cn_nodeid == node) {
-      return list->nodes[i].cn_name;
-    }
-  }
-
-  return NULL;
-}
-
-
-static int member_addr_to_id(member_list_t *list, struct sockaddr *addr)
-{
-  int i;
-
-  for (i = 0; i < list->count; i++) {
-	  if (memcmp(&list->nodes[i].cn_address.cna_address, addr,
-		sizeof(struct sockaddr))) {
-
-		return list->nodes[i].cn_nodeid;
-	  }
-  }
-
-  return -1;
-}
-
-
-static int select_retry(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *xfds,
-			struct timeval *timeout)
-{
-  int rv;
-
-  while (1) {
-    rv = select(max_fd, rfds, wfds, xfds, timeout);
-    if ((rv == -1) && (errno == EINTR)) {
-      /* return on EBADF/EINVAL/ENOMEM; continue on EINTR */
-      continue;
-    }
-    return rv;
-  }
-}
-
-
-static ssize_t read_retry(int fd, void *buf, int count, struct timeval *timeout)
-{
-  int n, total = 0, remain = count, rv = 0;
-  fd_set rfds, xfds;
-
-  while (total < count) 
-  {
-    FD_ZERO(&rfds);
-    FD_SET(fd, &rfds);
-    FD_ZERO(&xfds);
-    FD_SET(fd, &xfds);
-
-    /*
-     * Select on the socket, in case it closes while we're not
-     * looking...
-     */
-    rv = select_retry(fd + 1, &rfds, NULL, &xfds, timeout);
-    if (rv == -1) {
-      return -1;
-    }
-    else if (rv == 0) {
-      errno = ETIMEDOUT;
-      return -1;
-    }
-
-    if (FD_ISSET(fd, &xfds)) {
-      errno = EPIPE;
-      return -1;
-    }
-
-    /* 
-     * Attempt to read off the socket 
-     */
-    n = read(fd, buf + (off_t) total, remain);
-
-    /*
-     * When we know our socket was select()ed and we receive 0 bytes
-     * when we read, the socket was closed.
-     */
-    if ((n == 0) && (rv == 1)) {
-      errno = EPIPE;
-      return -1;
-    }
-
-    if (n == -1) {
-      if ((errno == EAGAIN) || (errno == EINTR)) {
-	/* 
-	 * Not ready? Wait for data to become available
-	 */
-	continue;
-      }
-
-      /* Other errors: EPIPE, EINVAL, etc */
-      return -1;
-    }
-
-    total += n;
-    remain -= n;
-  }
-
-  return total;
-}
diff --git a/config/daemons/ccsd/cluster_mgr.h b/config/daemons/ccsd/cluster_mgr.h
deleted file mode 100644
index b97b552..0000000
--- a/config/daemons/ccsd/cluster_mgr.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __CLUSTER_MGR_DOT_H__
-#define __CLUSTER_MGR_DOT_H__
-
-int start_cluster_monitor_thread(void);
-
-#endif /* __CLUSTER_MGR_DOT_H__ */
diff --git a/config/daemons/ccsd/cnx_mgr.c b/config/daemons/ccsd/cnx_mgr.c
deleted file mode 100644
index edd5724..0000000
--- a/config/daemons/ccsd/cnx_mgr.c
+++ /dev/null
@@ -1,1399 +0,0 @@
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <signal.h>
-#include <unistd.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <time.h>
-#include <limits.h>
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <libxml/xpath.h>
-#include <libxml/xpathInternals.h>
-#include <liblogthread.h>
-
-#include "comm_headers.h"
-#include "debug.h"
-#include "misc.h"
-#include "globals.h"
-
-/* Default descriptor expiration time, in seconds */
-#ifndef DEFAULT_EXPIRE
-#define DEFAULT_EXPIRE 30
-#endif
-
-/* Maximum open connection count */
-#ifndef MAX_OPEN_CONNECTIONS
-#define MAX_OPEN_CONNECTIONS 30
-#endif
-
-/* Conversion from descriptor to ocs index */
-#ifdef dindex
-#undef dindex
-#endif
-#define dindex(x) ((x) % MAX_OPEN_CONNECTIONS)
-
-static inline void _cleanup_descriptor(int desc);
-
-extern int no_manager_opt;
-
-typedef struct open_connection_s {
-  char *oc_cwp;
-  char *oc_query;
-  open_doc_t *oc_odoc;
-  xmlXPathContextPtr oc_ctx;
-  int oc_index;
-  int oc_desc;
-  time_t oc_expire;
-} open_connection_t;
-
-/* ATTENTION: need to lock on this if we start forking the daemon **
-**  Also would need to create a shared memory area for open cnx's */
-static open_connection_t **ocs = NULL;
-static int _descbase = 0;
-
-static int _update_config(char *location){
-  int error = 0;
-  int v1=0, v2=0;
-  open_doc_t *tmp_odoc = NULL;
-  xmlDocPtr tmp_doc = NULL;
-
-  CCSENTER("_update_config");
-
-  tmp_doc = xmlParseFile(location);
-  if(!tmp_doc){
-    logt_print(LOG_ERR, "Unable to parse %s\n", location);
-    error = -EINVAL;
-    goto fail;
-  } else if((v2 = get_doc_version(tmp_doc)) < 0){
-    logt_print(LOG_ERR, "Unable to get config_version from %s.\n", location);
-    error = v2;
-    goto fail;
-  } else if(master_doc && master_doc->od_doc){
-    v1 = get_doc_version(master_doc->od_doc);
-    if(v1 >= v2){
-      logt_print(LOG_ERR, "%s on-disk version is <= to in-memory version.\n", location);
-      logt_print(LOG_ERR, " On-disk version   : %d\n", v2);
-      logt_print(LOG_ERR, " In-memory version : %d\n", v1);
-      error = -EPERM;
-      goto fail;
-    }
-  } else {
-    v1 = 0;
-  }
-
-  if(!(tmp_odoc = malloc(sizeof(open_doc_t)))){
-    error = -ENOMEM;
-    goto fail;
-  }
-  memset(tmp_odoc, 0, sizeof(open_doc_t));
-
-  tmp_odoc->od_doc = tmp_doc;
-
-  logt_print(LOG_DEBUG, "There are %d references open on version %d of the config file.\n",
-	  (master_doc)?master_doc->od_refs:0, v1);
-  if(master_doc && !master_doc->od_refs){
-    logt_print(LOG_DEBUG, "Freeing version %d\n", v1);
-    xmlFreeDoc(master_doc->od_doc);
-    free(master_doc);
-    master_doc = tmp_odoc;
-  } else {
-    master_doc = tmp_odoc;
-  }
-
-  logt_print(LOG_INFO, "Update of "DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE " complete (version %d -> %d).\n", v1, v2);
- fail:
-  if(tmp_odoc != master_doc){
-    free(tmp_odoc);
-  }
-  if(tmp_doc != master_doc->od_doc){
-    xmlFreeDoc(tmp_doc);
-  }
-
-
-  CCSEXIT("_update_config");
-  return error;
-}
-
-
-static int update_config(void){
-  int error = 0;
-  CCSENTER("update_config");
-
-  /* If update_required is set, it means that there is still a pending **
-  ** update.  We need to pull this one in before doing anything else.  */
-  if(update_required){
-    error = _update_config(DEFAULT_CONFIG_DIR "/." DEFAULT_CONFIG_FILE);
-    update_required = 0;
-    if(error){
-      logt_print(LOG_ERR, "Previous update could not be completed.\n");
-      goto fail;
-    }
-  }
-
- fail:
-  CCSEXIT("update_config");
-  return error;
-}
-
-/**
- * broadcast_for_doc
- *
- * Returns: 0 on success, < 0 on error
- */
-static int broadcast_for_doc(char *cluster_name, int blocking){
-  int opt;
-  int error = 0;
-  int retry = 5;
-  int sfd = -1;
-  int trueint;
-  int v1, v2;
-  int write_to_disk = 0;
-  char *tmp_name = NULL;
-  struct sockaddr_storage addr, recv_addr;
-  struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr;
-  struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr;
-  unsigned int len = sizeof(struct sockaddr_storage);
-  int addr_size = 0;
-  comm_header_t *ch = NULL;
-  char *bdoc = NULL;
-  fd_set rset;
-  struct timeval tv;
-  xmlDocPtr tmp_doc = NULL;
-
-  CCSENTER("broadcast_for_doc");
-
- try_again:
-  if(!master_doc){
-    logt_print(LOG_ERR, "No master_doc!!!\n");
-    exit(EXIT_FAILURE);
-  }
-
-  if(quorate && !cluster_name){
-    logt_print(LOG_ERR, "Node is part of quorate cluster, but the cluster name is unknown.\n");
-    logt_print(LOG_ERR, " Unable to validate remote config files.  Refusing connection.\n");
-    error = -ECONNREFUSED;
-    goto fail;
-  }
-
-  ch = malloc(sizeof(comm_header_t));
-  if(!ch){
-    error = -ENOMEM;
-    goto fail;
-  }
-  memset(ch, 0, sizeof(comm_header_t));
-
-  if(IPv6 && (sfd = socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP)) <0){
-    logt_print(LOG_ERR, "Unable to create IPv6 socket");
-    error = -errno;
-    goto fail;
-  }
-
-  if(!IPv6 && ((sfd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)){
-    logt_print(LOG_ERR, "Unable to create socket for broadcast");
-    error = -errno;
-    goto fail;
-  }
-
-  memset(&addr, 0, sizeof(struct sockaddr_storage));
-
-  trueint = 1;
-  if(IPv6){
-    struct ipv6_mreq mreq;
-
-    addr6->sin6_family = AF_INET6;
-    addr6->sin6_port = htons(backend_port);
-
-    if(!multicast_address || !strcmp(multicast_address, "default")){
-      logt_print(LOG_DEBUG, "Trying IPv6 multicast (default).\n");
-      if(inet_pton(AF_INET6, "ff02::3:1", &(addr6->sin6_addr)) <= 0){
-	logt_print(LOG_ERR, "Unable to convert multicast address");
-	error = -errno;
-	goto fail;
-      }
-    } else {
-      logt_print(LOG_DEBUG, "Trying IPv6 multicast (%s).\n", multicast_address);
-      if(inet_pton(AF_INET6, multicast_address, &(addr6->sin6_addr)) <= 0){
-	logt_print(LOG_ERR, "Unable to convert multicast address");
-	error = -errno;
-	goto fail;
-      }
-    }
-
-    memcpy(&mreq.ipv6mr_multiaddr, &(addr6->sin6_addr), sizeof(struct in6_addr));
-    mreq.ipv6mr_interface = 0;
-    opt = 0;
-
-    if(setsockopt(sfd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP,
-                  &opt, sizeof(opt)) < 0){
-      logt_print(LOG_ERR, "Unable to %s loopback.\n", opt?"SET":"UNSET");
-      error = -errno;
-      goto fail;
-    }
-  } else {
-    addr4->sin_family = AF_INET;
-    addr4->sin_port = htons(backend_port);
-    if(!multicast_address){
-      logt_print(LOG_DEBUG, "Trying IPv4 broadcast.\n");
-
-      addr4->sin_addr.s_addr = INADDR_BROADCAST;
-      if((error = setsockopt(sfd, SOL_SOCKET, SO_BROADCAST, &trueint, sizeof(int)))){
-	logt_print(LOG_ERR, "Unable to set socket options");
-	error = -errno;
-	goto fail;
-      } else {
-	logt_print(LOG_DEBUG, "  Broadcast enabled.\n");
-      }
-    } else {
-      if(!strcmp(multicast_address, "default")){
-	logt_print(LOG_DEBUG, "Trying IPv4 multicast (default).\n");
-	if(inet_pton(AF_INET, "224.0.2.5", &(addr4->sin_addr)) <= 0){
-	  logt_print(LOG_ERR, "Unable to convert multicast address");
-	  error = -errno;
-	  goto fail;
-	}
-      } else {
-	logt_print(LOG_DEBUG, "Trying IPv4 multicast (%s).\n", multicast_address);
-	if(inet_pton(AF_INET, multicast_address, &(addr4->sin_addr)) <= 0){
-	  logt_print(LOG_ERR, "Unable to convert multicast address");
-	  error = -errno;
-	  goto fail;
-	}
-      }
-      opt = 0;
-      setsockopt(sfd, IPPROTO_IP, IP_MULTICAST_LOOP, &opt, sizeof(opt));
-      if(setsockopt(sfd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) < 0){
-	logt_print(LOG_ERR, "Unable to set multicast threshold.\n");
-      }
-    }
-  }
-  addr_size = IPv6? sizeof(struct sockaddr_in6):sizeof(struct sockaddr_in);
-
-  FD_ZERO(&rset);
-
-  do {
-    ch->comm_type = COMM_BROADCAST;
-
-    logt_print(LOG_DEBUG, "Sending broadcast.\n");
-    swab_header(ch);
-
-    if(sendto(sfd, (char *)ch, sizeof(comm_header_t), 0,
-	      (struct sockaddr *)&addr, addr_size) < 0){
-      logt_print(LOG_ERR, "Unable to perform sendto");
-      if(retry > 0){
-	retry--;
-	close(sfd);
-	free(ch);
-	sleep(2);
-	goto try_again;
-      } else {
-	error = -errno;
-	goto fail;
-      }
-    }
-
-    srandom(getpid());
-    FD_SET(sfd, &rset);
-    tv.tv_sec = 0;
-    
-    tv.tv_usec = 250000 + (random()%500000);
-#if defined(__sparc__)
-    logt_print(LOG_DEBUG, "Select waiting %d usec\n", tv.tv_usec);
-#else
-    logt_print(LOG_DEBUG, "Select waiting %ld usec\n", tv.tv_usec);
-#endif
-    while((error = select(sfd+1, &rset, NULL,NULL, &tv))){
-      logt_print(LOG_DEBUG, "Select returns %d\n", error);
-      if(error < 0){
-	logt_print(LOG_ERR, "Select failed");
-	error = -errno;
-	goto fail;
-      }
-      if(error){
-	logt_print(LOG_DEBUG, "Checking broadcast response.\n");
-	error = 0;
-	recvfrom(sfd, (char *)ch, sizeof(comm_header_t), MSG_PEEK,
-		 (struct sockaddr *)&recv_addr, (socklen_t *)&len);
-	swab_header(ch);
-	if(!ch->comm_payload_size || ch->comm_error){
-	  /* clean out this reply by not using MSG_PEEK */
-	  recvfrom(sfd, (char *)ch, sizeof(comm_header_t), 0,
-		   (struct sockaddr *)&recv_addr, (socklen_t *)&len);
-	  error = -ENODATA;
-	  FD_SET(sfd, &rset);
-	  goto reset_timer;
-	}
-	bdoc = malloc(ch->comm_payload_size + sizeof(comm_header_t));
-	if(!bdoc){
-	  error = -ENOMEM;
-	  goto fail;
-	}
-	memset(bdoc, 0, ch->comm_payload_size + sizeof(comm_header_t));
-	/* ATTENTION -- potential for incomplete package */
-	recvfrom(sfd, bdoc, ch->comm_payload_size + sizeof(comm_header_t),
-		 0, (struct sockaddr *)&recv_addr, &len);
-	tmp_doc = xmlParseMemory(bdoc+sizeof(comm_header_t),
-				 ch->comm_payload_size);
-	if(!tmp_doc){
-	  logt_print(LOG_ERR, "Unable to parse remote configuration.\n");
-	  free(bdoc); bdoc = NULL;
-	  goto reset_timer;
-	}
-
-	tmp_name = get_cluster_name(tmp_doc);
-	logt_print(LOG_DEBUG, "  Given cluster name = %s\n", cluster_name);
-	logt_print(LOG_DEBUG, "  Remote cluster name= %s\n", tmp_name);
-	if(!tmp_name){
-	  logt_print(LOG_ERR, "Unable to find cluster name in remote configuration.\n");
-	  free(bdoc); bdoc = NULL;
-	  xmlFreeDoc(tmp_doc); tmp_doc = NULL;
-	  goto reset_timer;
-	} else if(cluster_name && strcmp(cluster_name, tmp_name)){
-	  logt_print(LOG_DEBUG, "Remote and local configuration have different cluster names.\n");
-	  logt_print(LOG_DEBUG, "Skipping...\n");
-	  free(tmp_name); tmp_name = NULL;
-	  free(bdoc); bdoc = NULL;
-	  xmlFreeDoc(tmp_doc); tmp_doc = NULL;
-	  goto reset_timer;
-	}
-	free(tmp_name); tmp_name = NULL;
-	if(!master_doc->od_doc){
-	  if((v2 = get_doc_version(tmp_doc)) >= 0){
-	    logt_print(LOG_INFO, "Remote configuration copy (version = %d) found.\n", v2);
-	    master_doc->od_doc = tmp_doc;
-	    tmp_doc = NULL;
-	    write_to_disk = 1;
-	  }
-	} else {
-	  if(((v1 = get_doc_version(master_doc->od_doc)) >= 0) &&
-	     ((v2 = get_doc_version(tmp_doc)) >= 0)){
-	    if(ch->comm_flags & COMM_BROADCAST_FROM_QUORATE){
-	      logt_print(LOG_INFO, "Remote configuration copy is from quorate node.\n");
-	      logt_print(LOG_INFO, " Local version # : %d\n", v1);
-	      logt_print(LOG_INFO, " Remote version #: %d\n", v2);
-	      if(v1 != v2){
-		logt_print(LOG_INFO, "Switching to remote copy.\n");
-	      }
-	      if(master_doc->od_refs){
-		open_doc_t *tmp_odoc;
-		if(!(tmp_odoc = malloc(sizeof(open_doc_t)))){
-		  error = -ENOMEM;
-		  goto fail;
-		}
-		memset(tmp_odoc, 0, sizeof(open_doc_t));
-		tmp_odoc->od_doc = tmp_doc;
-		master_doc = tmp_odoc;
-	      } else {
-		xmlFreeDoc(master_doc->od_doc);
-		master_doc->od_doc = tmp_doc;
-	      }
-	      tmp_doc = NULL;
-	      write_to_disk = 1;
-	      goto out;
-	    } else if(v2 > v1){
-	      logt_print(LOG_INFO, "Remote configuration copy is newer than local copy.\n");
-	      logt_print(LOG_INFO, " Local version # : %d\n", v1);
-	      logt_print(LOG_INFO, " Remote version #: %d\n", v2);
-	      if(master_doc->od_refs){
-		open_doc_t *tmp_odoc;
-		if(!(tmp_odoc = malloc(sizeof(open_doc_t)))){
-		  error = -ENOMEM;
-		  goto fail;
-		}
-		memset(tmp_odoc, 0, sizeof(open_doc_t));
-		tmp_odoc->od_doc = tmp_doc;
-		master_doc = tmp_odoc;
-	      } else {
-		xmlFreeDoc(master_doc->od_doc);
-		master_doc->od_doc = tmp_doc;
-	      }
-	      tmp_doc = NULL;
-	      write_to_disk = 1;
-	    }
-	  } else {
-	    xmlFreeDoc(tmp_doc);
-	    tmp_doc = NULL;
-	  }
-	}
-	free(bdoc); bdoc = NULL;
-      }
-      FD_SET(sfd, &rset);
-      /* select will alter the timeout */
-    reset_timer:
-      tv.tv_sec = 0;
-      tv.tv_usec = 250000 + (random()%500000);
-#if defined(__sparc__)
-      logt_print(LOG_DEBUG, "Select waiting %d usec\n", tv.tv_usec);
-#else
-      logt_print(LOG_DEBUG, "Select waiting %ld usec\n", tv.tv_usec);
-#endif
-    }
-  } while(blocking && !master_doc);
- out:
-  if(error){
-    goto fail;
-  }
-
-  if(write_to_disk){
-    struct stat stat_buf;
-    mode_t old_mode;
-    FILE *f;
-    /* We did not have a copy available or we found a newer one, so write it out */
-
-    /* ATTENTION -- its bad if we fail here, because we have an in-memory version **
-    ** but it has not been written to disk....................................... */
-    if(stat(DEFAULT_CONFIG_DIR, &stat_buf)){
-      if(mkdir(DEFAULT_CONFIG_DIR, S_IRWXU | S_IRWXG)){
-	logt_print(LOG_ERR, "Unable to create directory " DEFAULT_CONFIG_DIR);
-	error = -errno;
-	goto fail;
-      }
-    } else if(!S_ISDIR(stat_buf.st_mode)){
-      logt_print(LOG_ERR, DEFAULT_CONFIG_DIR " is not a directory.\n");
-      error = -ENOTDIR;
-      goto fail;
-    }
-
-    old_mode = umask(026);
-    f = fopen(DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE, "w");
-    umask(old_mode);
-    if(!f){
-      logt_print(LOG_ERR, "Unable to open " DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE);
-      error = -errno;
-      goto fail;
-    }
-    if(xmlDocDump(f, master_doc->od_doc) < 0){
-      error = -EIO;
-      fclose(f);
-      goto fail;
-    }
-    fclose(f);
-  }
-
- fail:
-  if(ch) free(ch);
-  if(bdoc) free(bdoc);
-  if(tmp_doc) xmlFreeDoc(tmp_doc);
-  if(sfd >= 0) close(sfd);
-  CCSEXIT("broadcast_for_doc");
-  return error;
-}
-
-/**
- * process_connect: process a connect request
- * @afd: accepted socket connection
- * @cluster_name: optional cluster name
- *
- * Returns: 0 on success, < 0 on error
- */
-static int process_connect(comm_header_t *ch, char *cluster_name){
-  int i=0, error = 0;
-  int bcast_needed = 0;
-  char *tmp_name = NULL;
-  time_t now;
-
-  CCSENTER("process_connect");
-
-  ch->comm_payload_size = 0;
-
-  logt_print(LOG_DEBUG, "Given cluster name is = %s\n", cluster_name);
-
-  if(!ocs){
-    /* this will never be freed - unless exit */
-    ocs = malloc(sizeof(open_connection_t *)*MAX_OPEN_CONNECTIONS);
-    if(!ocs){
-      error = -ENOMEM;
-      goto fail;
-    }
-    memset(ocs, 0, sizeof(open_connection_t *)*MAX_OPEN_CONNECTIONS);
-  }
-
-  if(!quorate && !(ch->comm_flags & COMM_CONNECT_FORCE)){
-    logt_print(LOG_INFO, "Cluster is not quorate.  Refusing connection.\n");
-    error = -ECONNREFUSED;
-    goto fail;
-  }
-
-  if(!master_doc){
-    /* ATTENTION -- signal could come at any time.  It may be better to **
-    ** malloc to different var, then copy to master_doc when done       */
-    master_doc = malloc(sizeof(open_doc_t));
-    if(!master_doc){
-      error = -ENOMEM;
-      goto fail;
-    }
-    memset(master_doc, 0, sizeof(open_doc_t));
-  }
-
-  if(!master_doc->od_doc){
-    master_doc->od_doc = xmlParseFile(DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE);
-    if(!master_doc->od_doc){
-      logt_print(LOG_INFO, "Unable to parse " DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE "\n");
-      logt_print(LOG_INFO, "Searching cluster for valid copy.\n");
-    } else if((error = get_doc_version(master_doc->od_doc)) < 0){
-      logt_print(LOG_ERR, "Unable to get config_version from " DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE ".\n");
-      logt_print(LOG_ERR, "Discarding data and searching for valid copy.\n");
-      xmlFreeDoc(master_doc->od_doc);
-      master_doc->od_doc = NULL;
-    } else if(!(tmp_name = get_cluster_name(master_doc->od_doc))){
-      logt_print(LOG_ERR, "Unable to get cluster name from " DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE ".\n");
-      logt_print(LOG_ERR, "Discarding data and searching for valid copy.\n");
-      xmlFreeDoc(master_doc->od_doc);
-      master_doc->od_doc = NULL;
-    } else if(cluster_name && strcmp(cluster_name, tmp_name)){
-      logt_print(LOG_ERR, "Given cluster name does not match local " DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE ".\n");
-      logt_print(LOG_ERR, "Discarding data and searching for matching copy.\n");
-      xmlFreeDoc(master_doc->od_doc);
-      master_doc->od_doc = NULL;
-      free(tmp_name); tmp_name = NULL;
-    } else if(set_ccs_logging(master_doc->od_doc, 1) < 0){
-      logt_print(LOG_ERR, "Unable to set logging parameters.\n");
-    } else {  /* Either the names match, or a name wasn't specified. */
-      logt_print(LOG_INFO, DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE " (cluster name = %s, version = %d) found.\n",
-	      tmp_name, error);
-      /* We must check with the others to make sure this is valid. */
-    }
-    if (!no_manager_opt)
-      bcast_needed = 1;
-    error = 0;
-  } else {
-    tmp_name = get_cluster_name(master_doc->od_doc);
-
-    /* ATTENTION -- if not quorate, consider swapping out in-memory config **
-    ** for the config of the name specified............................... */
-
-    if(cluster_name && strcmp(cluster_name, tmp_name)){
-      logt_print(LOG_ERR, "Request for configuration with cluster name, %s\n", cluster_name);
-      logt_print(LOG_ERR, " However, a configuration with cluster name, %s, is already loaded.\n",
-	      tmp_name);
-      error = -EINVAL;
-      goto fail;
-    }
-    if(!quorate){
-      bcast_needed = 1;
-    }
-  }
-  
-  if(cluster_name && !tmp_name){
-    tmp_name = strdup(cluster_name);
-    if(!tmp_name){
-      error = -ENOMEM;
-      goto fail;
-    }
-  }
-
-  logt_print(LOG_DEBUG, "Blocking is %s.\n",
-	  (ch->comm_flags & COMM_CONNECT_BLOCKING)? "SET": "UNSET");
-  logt_print(LOG_DEBUG, "Flags = 0x%x\n", ch->comm_flags);
-
-  /* Need to broadcast regardless (unless quorate) to check version # */
-  if(bcast_needed){
-    logt_print(LOG_DEBUG, "Broadcast is neccessary.\n");
-  }
-  if(bcast_needed &&
-     (error = broadcast_for_doc(tmp_name, ch->comm_flags & COMM_CONNECT_BLOCKING)) &&
-     !master_doc->od_doc){
-    logt_print(LOG_ERR, "Broadcast for config file failed: %s\n", strerror(-error));
-    goto fail;
-  }
-  error = 0;
-
-  if(!master_doc || !master_doc->od_doc){
-    logt_print(LOG_ERR, "The appropriate config file could not be loaded.\n");
-    error = -ENODATA;
-    goto fail;
-  }
-
-  if(update_required){
-    logt_print(LOG_DEBUG, "Update is required.\n");
-    if((error = update_config())){
-      logt_print(LOG_ERR, "Failed to update config file, required by cluster.\n");
-      /* ATTENTION -- remove all open_doc_t's ? */
-      goto fail;
-    }
-  }
-
-  /* Locate the connection descriptor */
-  now = time(NULL); 
-  for(i=0; i < MAX_OPEN_CONNECTIONS; i++){
-    if (!ocs[i])
-      continue;
-    if (now >= ocs[i]->oc_expire) {
-      logt_print(LOG_DEBUG, "Recycling connection descriptor %d: Expired\n",
-	      ocs[i]->oc_desc );
-      _cleanup_descriptor(i);
-    }
-  }
-
-  for(i=0; i < MAX_OPEN_CONNECTIONS; i++){
-    if(!ocs[i])
-      break;
-  }
-
-  if(i >= MAX_OPEN_CONNECTIONS){
-    error = -EAGAIN;
-    goto fail;
-  }
-
-  ocs[i] = (open_connection_t *)malloc(sizeof(open_connection_t));
-  if(!ocs[i]){
-    error = -ENOMEM;
-    goto fail;
-  }
-
-  memset(ocs[i], 0, sizeof(open_connection_t));
-
-  master_doc->od_refs++;
-  ocs[i]->oc_odoc = master_doc;
-  ocs[i]->oc_ctx = xmlXPathNewContext(ocs[i]->oc_odoc->od_doc);
-  ocs[i]->oc_expire = now + DEFAULT_EXPIRE;
-
-  /* using error as a temp var */
-  error = i + _descbase++ * MAX_OPEN_CONNECTIONS;
-  if (error > INT_MAX || error < 0) {
-    error = i;
-    _descbase = 0;
-  }
-  ocs[i]->oc_desc = error;
- 
-  /* reset error */
-  error = 0;
-
-  if(!ocs[i]->oc_ctx){
-    ocs[i]->oc_odoc->od_refs--;
-    free(ocs[i]);
-    logt_print(LOG_ERR, "Error: unable to create new XPath context.\n");
-    error = -EIO;  /* ATTENTION -- what should this be? */
-    goto fail;
-  }
-
-  /* return desc to requestor */
-  
- fail:
-  if(master_doc && master_doc->od_doc == NULL){
-    free(master_doc);
-    master_doc = NULL;
-  }
-  if(tmp_name){
-    free(tmp_name);
-  }
-  if(error){
-    ch->comm_error = error;
-  } else {
-    ch->comm_desc = ocs[i]->oc_desc;
-  }
-  CCSEXIT("process_connect");
-  return error;
-}
-
-
-static inline void
-_cleanup_descriptor(int desc)
-{
-  open_doc_t *tmp_odoc;
-
-  if(ocs[desc]->oc_ctx){
-    xmlXPathFreeContext(ocs[desc]->oc_ctx);
-  }
-  if(ocs[desc]->oc_cwp){
-    free(ocs[desc]->oc_cwp);
-  }
-  if(ocs[desc]->oc_query){
-    free(ocs[desc]->oc_query);
-  }
-  tmp_odoc = ocs[desc]->oc_odoc;
-  if(tmp_odoc->od_refs < 1){
-    logt_print(LOG_ERR, "Number of references on an open doc should never be < 1.\n");
-    logt_print(LOG_ERR, "This is a fatal error.  Exiting...\n");
-    exit(EXIT_FAILURE);
-  }
-  if(tmp_odoc != master_doc && tmp_odoc->od_refs == 1){
-    logt_print(LOG_DEBUG, "No more references on version %d of config file, freeing...\n",
-	      get_doc_version(tmp_odoc->od_doc));
-    xmlFreeDoc(tmp_odoc->od_doc);
-    free(tmp_odoc);
-  } else {
-    tmp_odoc->od_refs--;
-  }
-
-  free(ocs[desc]);
-  ocs[desc] = NULL;
-}
-
-
-/**
- * process_disconnect: close an open session
- * @afd: accepted socket connection
- * @desc: descriptor describing the open connection
- *
- * This fuction frees all memory associated with an open session.
- *
- * Returns: 0 on success, < 0 on error
- */
-static int process_disconnect(comm_header_t *ch){
-  int desc = dindex(ch->comm_desc);
-  int error=0;
-  CCSENTER("process_disconnect");
-
-  ch->comm_payload_size = 0;
-
-  if(desc < 0){
-    logt_print(LOG_ERR, "Invalid descriptor specified (%d).\n", desc);
-    logt_print(LOG_ERR, "Someone may be attempting something evil.\n");
-    error = -EBADR;
-    goto fail;
-  }
-
-  if(!ocs || !ocs[desc] || (ocs[desc]->oc_desc != ch->comm_desc)){
-    /* send failure to requestor ? */
-    logt_print(LOG_ERR, "Attempt to close an unopened CCS descriptor (%d).\n",
-	    ch->comm_desc);
-
-    error = -EBADR;
-    goto fail;
-  } else {
-    _cleanup_descriptor(desc);
-  }
-
- fail:
-  if(error){
-    ch->comm_error = error;
-  } else {
-    ch->comm_desc = -1;
-  }
-  CCSEXIT("process_disconnect");
-  return error;
-}
-
-/*
- * _process_get
- * @ch
- * @payload
- *
- * This function runs the xml query.  If the query is different from the
- * previous query, it will always fill the payload with the first match.
- * If the current query and the previous query are the same, it fills the
- * payload with next match.  If the last of all possible matches was
- * returned by the previous query and the current query is the same,
- * the payload will be filled with the 1st match and 1 will be returned
- * as the result of the function.
- *
- * Returns: -EXXX on error, 1 if restarting list, 0 otherwise
- */
-static int _process_get(comm_header_t *ch, char **payload){
-  int error = 0, desc = dindex(ch->comm_desc);
-  xmlXPathObjectPtr obj = NULL;
-  char *query = NULL;
-
-  CCSENTER("_process_get");
-  if(!ch->comm_payload_size){
-    logt_print(LOG_ERR, "process_get: payload size is zero.\n");
-    error = -EINVAL;
-    goto fail;
-  }
-
-  if(ch->comm_desc < 0){
-    logt_print(LOG_ERR, "Invalid descriptor specified (%d).\n", ch->comm_desc);
-    logt_print(LOG_ERR, "Someone may be attempting something evil.\n");
-    error = -EBADR;
-    goto fail;
-  }
-
-  if(!ocs || !ocs[desc] || (ocs[desc]->oc_desc != ch->comm_desc)){
-    logt_print(LOG_ERR, "process_get: Invalid connection descriptor received.\n");
-    error = -EBADR;
-    goto fail;
-  }
-
-  if(ocs[desc]->oc_query && !strcmp(*payload,ocs[desc]->oc_query)){
-    ocs[desc]->oc_index++;
-    logt_print(LOG_DEBUG, "Index = %d\n",ocs[desc]->oc_index);
-    logt_print(LOG_DEBUG, " Query = %s\n", *payload);
-  } else {
-    logt_print(LOG_DEBUG, "Index reset (new query).\n");
-    logt_print(LOG_DEBUG, " Query = %s\n", *payload);
-    ocs[desc]->oc_index = 0;
-    if(ocs[desc]->oc_query){
-      free(ocs[desc]->oc_query);
-    }
-    ocs[desc]->oc_query = (char *)strdup(*payload);
-  }
-
-  /* ATTENTION -- should path expansion go before index inc ? */
-  if(((ch->comm_payload_size > 1) &&
-      ((*payload)[0] == '/')) ||
-     !ocs[desc]->oc_cwp){
-    logt_print(LOG_DEBUG, "Query involves absolute path or cwp is not set.\n");
-    query = (char *)strdup(*payload);
-    if(!query){
-      error = -ENOMEM;
-      goto fail;
-    }
-  } else {
-    /* +2 because of NULL and '/' character */
-    logt_print(LOG_DEBUG, "Query involves relative path.\n");
-    query = malloc(strlen(*payload)+strlen(ocs[desc]->oc_cwp)+2);
-    if(!query){
-      error = -ENOMEM;
-      goto fail;
-    }
-    sprintf(query, "%s/%s", ocs[desc]->oc_cwp, *payload);
-  }
-
-  /* Bump expiration time */
-  ocs[desc]->oc_expire = time(NULL) + DEFAULT_EXPIRE;
-
-  obj = xmlXPathEvalExpression((xmlChar *)query, ocs[desc]->oc_ctx);
-  if(obj){
-    logt_print(LOG_DEBUG, "Obj type  = %d (%s)\n", obj->type, (obj->type == 1)?"XPATH_NODESET":"");
-    logt_print(LOG_DEBUG, "Number of matches: %d\n", (obj->nodesetval)?obj->nodesetval->nodeNr:0);
-    if(obj->nodesetval && (obj->nodesetval->nodeNr > 0) ){
-      xmlNodePtr node;
-      int size=0;
-      int nnv=0, child=0; /* name 'n' value */
-
-      if(ocs[desc]->oc_index >= obj->nodesetval->nodeNr){
-	ocs[desc]->oc_index = 0;
-	error = 1;
-	logt_print(LOG_DEBUG, "Index reset to zero (end of list).\n");
-      }
-	  
-      node = obj->nodesetval->nodeTab[ocs[desc]->oc_index];
-	
-      logt_print(LOG_DEBUG, "Node (%s) type = %d (%s)\n", node->name, node->type,
-	      (node->type == 1)? "XML_ELEMENT_NODE":
-	      (node->type == 2)? "XML_ATTRIBUTE_NODE":"");
-
-      if(!node) {
-	logt_print(LOG_DEBUG, "No content found.\n");
-	error = -ENODATA;
-	goto fail;
-      }
-
-      if(((node->type == XML_ATTRIBUTE_NODE) && strstr(query, "@*")) ||
-	 ((node->type == XML_ELEMENT_NODE) && strstr(query, "child::*"))){
-	/* add on the trailing NULL and the '=' separator for a list of attrs
-	   or an element node + CDATA*/
- 	if (node->children && node->children->content) {
- 	  size = strlen((char *)node->children->content) +
-		 strlen((char *)node->name)+2;
-	  child = 1;
- 	} else 
- 	  size = strlen((char *)node->name)+2;
-	nnv= 1;
-      } else {
- 	if (node->children && node->children->content) {
- 	  size = strlen((char *)node->children->content)+1;
-	} else {
-          error = -ENODATA;
- 	  goto fail;
-        }
-      }
-
-      if(size <= ch->comm_payload_size){  /* do we already have enough space? */
-	logt_print(LOG_DEBUG, "No extra space needed.\n");
-	if(nnv){
-	  if(child)
- 	    sprintf(*payload, "%s=%s", node->name, (char *)node->children->content);
-	  else
-	    sprintf(*payload, "%s=", node->name);
-	} else {
- 	  sprintf(*payload, "%s", node->children ? node->children->content :
- 				  node->name);
-	}
-
-      } else {
-	logt_print(LOG_DEBUG, "Extra space needed.\n");
-	free(*payload);
-	*payload = (char *)malloc(size);
-	if(!*payload){
-	  error = -ENOMEM;
-	  goto fail;
-	}
-	memset(*payload,0,size);
-	if(nnv){
-	  if(child)
- 	    sprintf(*payload, "%s=%s", node->name, (char *)node->children->content);
-	  else
-	    sprintf(*payload, "%s=", node->name);
-	} else {
- 	  sprintf(*payload, "%s", node->children ? node->children->content :
- 				  node->name);
-	}
-      }
-      logt_print(LOG_DEBUG, "Query results:: %s\n", *payload);
-      ch->comm_payload_size = size;
-    } else {
-      logt_print(LOG_DEBUG, "No nodes found.\n");
-      ch->comm_payload_size = 0;
-      error = -ENODATA;
-      goto fail;
-    }
-  } else {
-    logt_print(LOG_ERR, "Error: unable to evaluate xpath query \"%s\"\n", *payload);
-    error = -EINVAL;
-    goto fail;
-  }
-
- fail:
-  if(obj){
-    xmlXPathFreeObject(obj);
-  }
-  if(error < 0){
-    ch->comm_error = error;
-    ch->comm_payload_size = 0;
-  }
-  if(query) { free(query); }
-  CCSEXIT("_process_get");
-  return error;
-}
-
-static int process_get(comm_header_t *ch, char **payload){
-  int error;
-  CCSENTER("process_get");
-
-  error = _process_get(ch, payload);
-
-  CCSEXIT("process_get");
-  return (error < 0)? error: 0;  
-}
-
-static int process_get_list(comm_header_t *ch, char **payload){
-  int error;
-  CCSENTER("process_get_list");
-
-  error = _process_get(ch, payload);
-  if(error){
-    ch->comm_payload_size = 0;
-    if(ocs && ocs[dindex(ch->comm_desc)])
-      ocs[dindex(ch->comm_desc)]->oc_index = -1;
-  }
-
-  CCSEXIT("process_get_list");
-  return (error < 0)? error: 0;
-}
-
-static int process_set(comm_header_t *ch, char *payload){
-  int error = 0;
-  int desc = dindex(ch->comm_desc);
-
-  CCSENTER("process_set");
-  if(!ch->comm_payload_size){
-    logt_print(LOG_ERR, "process_set: payload size is zero.\n");
-    error = -EINVAL;
-    goto fail;
-  }
-
-  if(ch->comm_desc < 0){
-    logt_print(LOG_ERR, "Invalid descriptor specified (%d).\n", ch->comm_desc);
-    logt_print(LOG_ERR, "Someone may be attempting something evil.\n");
-    error = -EBADR;
-    goto fail;
-  }
-
-  if(!ocs || !ocs[desc] || (ocs[desc]->oc_desc != ch->comm_desc)){
-    logt_print(LOG_ERR, "process_set: Invalid connection descriptor received.\n");
-    error = -EBADR;
-    goto fail;
-  }
-
-  error = -ENOSYS;  
-
- fail:
-  free(payload);
-  ch->comm_payload_size = 0;
-  if(error){
-    ch->comm_error = error;
-  }
-  CCSEXIT("process_set");
-  return error;
-}
-
-
-static int process_get_state(comm_header_t *ch, char **payload){
-  int error = 0, desc = dindex(ch->comm_desc);
-  char *load = NULL;
-
-  CCSENTER("process_get_state");
-  if(ch->comm_payload_size){
-    logt_print(LOG_ERR, "process_get_state: payload size is nonzero.\n");
-    error = -EINVAL;
-    goto fail;
-  }
-
-  if(ch->comm_desc < 0){
-    logt_print(LOG_ERR, "Invalid descriptor specified (%d).\n", ch->comm_desc);
-    logt_print(LOG_ERR, "Someone may be attempting something evil.\n");
-    error = -EBADR;
-    goto fail;
-  }
-
-  if(!ocs || !ocs[desc] || (ocs[desc]->oc_desc != ch->comm_desc)){
-    logt_print(LOG_ERR, "process_get_state: Invalid connection descriptor received.\n");
-    error = -EBADR;
-    goto fail;
-  }
-
-  if(ocs[desc]->oc_cwp && ocs[desc]->oc_query){
-    int size = strlen(ocs[desc]->oc_cwp) +
-      strlen(ocs[desc]->oc_query) + 2;
-    logt_print(LOG_DEBUG, "Both cwp and query are set.\n");
-    load = malloc(size);
-    if(!load){
-      error = -ENOMEM;
-      goto fail;
-    }
-    strcpy(load, ocs[desc]->oc_cwp);
-    strcpy(load+strlen(ocs[desc]->oc_cwp)+1, ocs[desc]->oc_query);
-    ch->comm_payload_size = size;
-  } else if(ocs[desc]->oc_cwp){
-    logt_print(LOG_DEBUG, "Only cwp is set.\n");
-    load = (char *)strdup(ocs[desc]->oc_cwp);
-    if(!load){
-      error = -ENOMEM;
-      goto fail;
-    }
-    ch->comm_payload_size = strlen(load)+1;
-  } else if(ocs[desc]->oc_query){
-    int size = strlen(ocs[desc]->oc_query) + 2;
-    logt_print(LOG_DEBUG, "Only query is set.\n");
-    load = malloc(size);
-    if(!load){
-      error = -ENOMEM;
-      goto fail;
-    }
-    memset(load, 0, size);
-    strcpy(load+1, ocs[desc]->oc_query);
-    ch->comm_payload_size = size;
-  }
-
-  ocs[desc]->oc_expire = time(NULL) + DEFAULT_EXPIRE;
-  *payload = load;
-
- fail:
-  if(error){
-    if(load) { free(load); }
-    ch->comm_error = error;
-    ch->comm_payload_size = 0;
-  }
-  CCSEXIT("process_get_state");
-  return error;
-}
-
-
-static int process_set_state(comm_header_t *ch, char *payload){
-  int error = 0, desc = dindex(ch->comm_desc);
-
-  CCSENTER("process_set_state");
-  if(!ch->comm_payload_size){
-    logt_print(LOG_ERR, "process_set_state: payload size is zero.\n");
-    error = -EINVAL;
-    goto fail;
-  }
-
-  if(ch->comm_desc < 0){
-    logt_print(LOG_ERR, "Invalid descriptor specified (%d).\n", ch->comm_desc);
-    logt_print(LOG_ERR, "Someone may be attempting something evil.\n");
-    error = -EBADR;
-    goto fail;
-  }
-
-  if(!ocs || !ocs[desc] || (ocs[desc]->oc_desc != ch->comm_desc)){
-    logt_print(LOG_ERR, "process_set_state: Invalid connection descriptor received.\n");
-    error = -EBADR;
-    goto fail;
-  }
-
-  if(ocs[desc]->oc_cwp){
-    free(ocs[desc]->oc_cwp);
-    ocs[desc]->oc_cwp = NULL;
-  }
-
-  if((ch->comm_flags & COMM_SET_STATE_RESET_QUERY) && ocs[desc]->oc_query){
-    free(ocs[desc]->oc_query);
-    ocs[desc]->oc_query = NULL;
-  }
-
-  ocs[desc]->oc_expire = time(NULL) + DEFAULT_EXPIRE;
-  ocs[desc]->oc_cwp = (char *)strdup(payload);
-
- fail:
-  ch->comm_payload_size = 0;
-  if(error){
-    ch->comm_error = error;
-  }
-
-  CCSEXIT("process_set_state");
-  return error;
-}
-
-
-/**
- * process_request
- * @afd
- *
- * This function operates as a switch, passing the request to the
- * appropriate function.
- *
- * Returns: 0 on success, < 0 on error
- */
-int process_request(int afd){
-  int error=0;
-  comm_header_t *ch = NULL, *tmp_ch;
-  char *payload = NULL;
-  
-  CCSENTER("process_request");
-
-  if(!(ch = (comm_header_t *)malloc(sizeof(comm_header_t)))){
-    error = -ENOMEM;
-    goto fail;
-  }
-
-  error = read(afd, ch, sizeof(comm_header_t));
-  if(error < 0){
-    logt_print(LOG_ERR, "Unable to read comm_header_t");
-    goto fail;
-  } else if(error < sizeof(comm_header_t)){
-    logt_print(LOG_ERR, "Unable to read complete comm_header_t.\n");
-    error = -EBADE;
-    goto fail;
-  }
-
-  if(ch->comm_payload_size){
-    if(!(payload = (char *)malloc(ch->comm_payload_size))){
-      error = -ENOMEM;
-      goto fail;
-    }
-    error = read(afd, payload, ch->comm_payload_size);
-    if(error < 0){
-      logt_print(LOG_ERR, "Unable to read payload");
-      goto fail;
-    } else if(error < ch->comm_payload_size){
-      logt_print(LOG_ERR, "Unable to read complete payload.\n");
-      error = -EBADE;
-      goto fail;
-    }
-  }
-
-  switch(ch->comm_type){
-  case COMM_CONNECT:
-    if((error = process_connect(ch, payload)) < 0){
-      logt_print(LOG_ERR, "Error while processing connect: %s\n", strerror(-error));
-      goto fail;
-    }
-    break;
-  case COMM_DISCONNECT:
-    if((error = process_disconnect(ch)) < 0){
-      logt_print(LOG_ERR, "Error while processing disconnect: %s\n", strerror(-error));
-      goto fail;
-    }
-    break;
-  case COMM_GET:
-    if((error = process_get(ch, &payload)) < 0){
-      if(error != -ENODATA){
-	logt_print(LOG_ERR, "Error while processing get: %s\n", strerror(-error));
-      }
-      goto fail;
-    }
-    break;
-  case COMM_GET_LIST:
-    if((error = process_get_list(ch, &payload)) < 0){
-      if(error != -ENODATA){
-	logt_print(LOG_ERR, "Error while processing get: %s\n", strerror(-error));
-      }
-      goto fail;
-    }
-    break;
-  case COMM_SET:
-    if((error = process_set(ch, payload)) < 0){
-      logt_print(LOG_ERR, "Error while processing set: %s\n", strerror(-error));
-      goto fail;
-    }
-    break;
-  case COMM_GET_STATE:
-    if((error = process_get_state(ch, &payload)) < 0){
-      logt_print(LOG_ERR, "Error while processing get_state: %s\n", strerror(-error));
-      goto fail;
-    }
-    break;
-  case COMM_SET_STATE:
-    if((error = process_set_state(ch, payload)) < 0){
-      logt_print(LOG_ERR, "Error while processing set_state: %s\n", strerror(-error));
-      goto fail;
-    }
-    break;
-  default:
-    logt_print(LOG_ERR, "Unknown connection request received.\n");
-    error = -EINVAL;
-    ch->comm_error = error;
-    ch->comm_payload_size = 0;
-  }
-
-  if(ch->comm_payload_size){
-    logt_print(LOG_DEBUG, "Reallocating transfer buffer.\n");
-    tmp_ch = (comm_header_t *)
-      realloc(ch,sizeof(comm_header_t)+ch->comm_payload_size);
-
-    if(tmp_ch) { ch = tmp_ch; } else {
-      logt_print(LOG_ERR, "Not enough memory to complete request.\n");
-      error = -ENOMEM;
-      goto fail;
-    }
-    memcpy((char *)ch+sizeof(comm_header_t), payload, ch->comm_payload_size);
-  }
-
- fail:
-  error = write(afd, ch, sizeof(comm_header_t)+ch->comm_payload_size);
-  if(error < 0){
-    if (errno == EINTR)
-      goto fail;
-    if (errno == EPIPE) {
-      error = 0;
-    } else {
-      logt_print(LOG_ERR, "Unable to write package back to sender");
-    }
-  } else if(error < (sizeof(comm_header_t)+ch->comm_payload_size)){
-    logt_print(LOG_ERR, "Unable to write complete package.\n");
-    error = -EBADE;
-    goto fail;
-  } else {
-    error = 0;
-  }
-
-  if(ch){ free(ch); }
-  if(payload){ free(payload); }
-
-  CCSEXIT("process_request");
-  return error;
-}
-
-
-/**
- * process_broadcast
- * @sfd: the UDP socket
- *
- * Returns: 0 on success, < 0 on failure
- */
-int process_broadcast(int sfd){
-  int error = 0;
-  comm_header_t *ch = NULL;
-  xmlChar *payload = NULL;
-  char *buffer = NULL;
-  struct sockaddr_storage addr;
-  unsigned int len = sizeof(struct sockaddr_storage);  /* value/result for recvfrom */
-  int sendlen;
-  int discard = 0;
-
-  CCSENTER("process_broadcast");
-
-  ch = malloc(sizeof(comm_header_t));
-  if(!ch){
-    error = -ENOMEM;
-    goto fail;
-  }
-  memset(ch, 0, sizeof(comm_header_t));
-  memset(&addr, 0, sizeof(struct sockaddr_storage)); /* just to make sure */
-
-  logt_print(LOG_DEBUG, "Waiting to receive broadcast request.\n");
-  if(recvfrom(sfd, ch, sizeof(comm_header_t), 0, (struct sockaddr *)&addr, &len) < 0){
-    logt_print(LOG_ERR, "Unable to perform recvfrom");
-    error = -errno;
-    goto fail;
-  }
-  swab_header(ch);
-
-  if(ch->comm_type != COMM_BROADCAST){
-    /* Either someone is pinging this port, or there is an older version **
-    ** of ccs trying to get bcast response.  Either way, we should not   **
-    ** respond to them.................................................. */
-    logt_print(LOG_DEBUG, "Received invalid request on broadcast port. %x\n",ch->comm_type);
-    error = -EINVAL;
-    goto fail;
-  }
-
-  /* need to ignore my own broadcasts */
-
-  if(ch->comm_payload_size){
-    /* cluster name was sent, need to read it */
-  }
-
-  if(!master_doc){
-    discard = 1;
-    logt_print(LOG_DEBUG, "master_doc not loaded.  Attempting to load it.\n");
-    if(!(master_doc = malloc(sizeof(open_doc_t)))){
-      error = -ENOMEM;
-      goto fail;
-    }
-    memset(master_doc, 0, sizeof(open_doc_t));
-    master_doc->od_doc = xmlParseFile(DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE);
-    if(!master_doc->od_doc){
-      free(master_doc);
-      master_doc = NULL;
-      logt_print(LOG_ERR, "Unable to parse " DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE ".\n");
-      error = -ENODATA;
-      goto fail;
-    }
-    logt_print(LOG_DEBUG, "master_doc found and loaded.\n");
-  } else if(update_required){
-    logt_print(LOG_DEBUG, "Update is required.\n");
-    if((error = update_config())){
-      logt_print(LOG_ERR, "Failed to update config file, required by cluster.\n");
-      /* ATTENTION -- remove all open_doc_t's ? */
-      goto fail;
-    }
-  }
-
-  /* allocates space for the payload */
-  xmlDocDumpFormatMemory(master_doc->od_doc,
-			 &payload,
-			 &(ch->comm_payload_size),
-			 0);
-  if(!ch->comm_payload_size){
-    error = -ENOMEM;
-    logt_print(LOG_ERR, "Document dump to memory failed.\n");
-    goto fail;
-  }
-
-  buffer = malloc(ch->comm_payload_size + sizeof(comm_header_t));
-  if(!buffer){
-    error = -ENOMEM;
-    goto fail;
-  }
-
-  if(quorate){
-    ch->comm_flags |= COMM_BROADCAST_FROM_QUORATE;
-  }
-
-  swab_header(ch);
-  memcpy(buffer, ch, sizeof(comm_header_t));
-  swab_header(ch); /* Swab back to dip into ch for payload_size */
-  memcpy(buffer+sizeof(comm_header_t), payload, ch->comm_payload_size);
-
-  logt_print(LOG_DEBUG, "Sending configuration (version %d)...\n", get_doc_version(master_doc->od_doc));
-  sendlen = ch->comm_payload_size + sizeof(comm_header_t);
-  if(sendto(sfd, buffer, sendlen, 0,
-	    (struct sockaddr *)&addr, (socklen_t)len) < 0){
-    logt_print(LOG_ERR, "Sendto failed");
-    error = -errno;
-  }
-
- fail:
-  if(buffer) free(buffer);
-  if(payload) free(payload);
-  if(ch) free(ch);
-  if(discard){
-    if(master_doc && master_doc->od_doc)
-      xmlFreeDoc(master_doc->od_doc);
-    if(master_doc) free(master_doc);
-    master_doc = NULL;
-  }
-  CCSEXIT("process_broadcast");
-  return error;
-}
diff --git a/config/daemons/ccsd/cnx_mgr.h b/config/daemons/ccsd/cnx_mgr.h
deleted file mode 100644
index 220628a..0000000
--- a/config/daemons/ccsd/cnx_mgr.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __CNX_MGR_DOT_H__
-#define __CNX_MGR_DOT_H__
-
-int process_request(int afd);
-int process_broadcast(int sfd);
-
-#endif /* __CNX_MGR_DOT_H__ */
diff --git a/config/daemons/ccsd/comm_headers.h b/config/daemons/ccsd/comm_headers.h
deleted file mode 100644
index 4187fba..0000000
--- a/config/daemons/ccsd/comm_headers.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef __COMM_HEADERS_DOT_H__
-#define __COMM_HEADERS_DOT_H__
-
-#include <byteswap.h>
-#include <endian.h>
-
-/* Types of requests */
-#define COMM_CONNECT    1
-#define COMM_DISCONNECT 2
-#define COMM_GET        3
-#define COMM_GET_LIST   4
-#define COMM_SET        5
-#define COMM_GET_STATE  6
-#define COMM_SET_STATE  7
-#define COMM_BROADCAST  8
-#define COMM_UPDATE     9
-
-/* Request flags */
-#define COMM_CONNECT_FORCE          1
-#define COMM_CONNECT_BLOCKING       2
-#define COMM_SET_STATE_RESET_QUERY  4
-#define COMM_BROADCAST_FROM_QUORATE 8
-#define COMM_UPDATE_NOTICE	    16
-#define COMM_UPDATE_NOTICE_ACK	    32
-#define COMM_UPDATE_COMMIT	    64
-#define COMM_UPDATE_COMMIT_ACK	    128
-
-typedef struct comm_header_s {
-  int comm_type;
-  int comm_flags;  /* flags that tune a particular type of operation */
-  int comm_desc;
-  int comm_error;
-  int comm_payload_size;
-} comm_header_t;
-
-#define COMM_LOCAL_SOCKET "/var/run/cluster/ccsd.sock"
-
-static inline void swab_header(comm_header_t *head) {
-#if __BYTE_ORDER == __BIG_ENDIAN
-  head->comm_type = bswap_32(head->comm_type);
-  head->comm_flags = bswap_32(head->comm_flags);
-  head->comm_desc = bswap_32(head->comm_desc);
-  head->comm_error = bswap_32(head->comm_error);
-  head->comm_payload_size = bswap_32(head->comm_payload_size);
-#endif
-}
-
-#endif /* __COMM_HEADERS_DOT_H__ */
diff --git a/config/daemons/ccsd/debug.h b/config/daemons/ccsd/debug.h
deleted file mode 100644
index 00b9db9..0000000
--- a/config/daemons/ccsd/debug.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __DEBUG_DOT_H__
-#define __DEBUG_DOT_H__
-
-#define CCSENTER(x) logt_print(LOG_DEBUG, "Entering " x "\n")
-#define CCSEXIT(x) logt_print(LOG_DEBUG, "Exiting " x "\n")
-
-extern int debug;
-
-#endif /* __DEBUG_DOT_H__ */
diff --git a/config/daemons/ccsd/globals.c b/config/daemons/ccsd/globals.c
deleted file mode 100644
index 6f2e582..0000000
--- a/config/daemons/ccsd/globals.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdio.h>
-
-int ppid = 0;
-
-char *config_file_location = NULL;
-char *lockfile_location = NULL;
-
-int frontend_port = 50006;
-int backend_port  = 50007;
-int cluster_base_port = 50008;
-
-/* -1 = no preference, 0 = IPv4, 1 = IPv6 */
-int IPv6=-1;
-
-/* 1 = allow and use UNIX domain sockets for local ccs queries */
-int use_local = 1;
-
-char *multicast_address = NULL;
-int ttl=1;
diff --git a/config/daemons/ccsd/globals.h b/config/daemons/ccsd/globals.h
deleted file mode 100644
index 91fbe53..0000000
--- a/config/daemons/ccsd/globals.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef __GLOBALS_H__
-#define __GLOBALS_H__
-
-#define DEFAULT_CCSD_LOCKFILE "/var/run/cluster/ccsd.pid"
-
-#define EXIT_MAGMA_PLUGINS 2  /* Magma plugins are not available */
-#define EXIT_CLUSTER_FAIL  3  /* General failure to connect to cluster */
-#define EXIT_LOCKFILE      4  /* Failed to create lock file */
-
-extern int ppid;
-
-extern char *config_file_location;
-extern char *lockfile_location;
-
-extern int frontend_port;
-extern int backend_port;
-extern int cluster_base_port;
-
-extern int IPv6;
-extern int use_local;
-extern char *multicast_address;
-extern int ttl;
-#endif /* __GLOBALS_H__ */
diff --git a/config/daemons/ccsd/misc.c b/config/daemons/ccsd/misc.c
deleted file mode 100644
index b39833e..0000000
--- a/config/daemons/ccsd/misc.c
+++ /dev/null
@@ -1,388 +0,0 @@
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <pthread.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <errno.h>
-#include <limits.h>
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <libxml/xpath.h>
-#include <libxml/xpathInternals.h>
-#define SYSLOG_NAMES
-#include <syslog.h>
-#include <liblogthread.h>
-
-#include "comm_headers.h"
-#include "debug.h"
-#include "misc.h"
-
-volatile int quorate = 0;
-
-int update_required = 0;
-pthread_mutex_t update_lock;
-
-open_doc_t *master_doc = NULL;
-
-extern int nodaemon;
-
-/**
- * do_simple_xml_query
- * @ctx: xml context
- * @query: "/cluster/@name"
- *
- * it only handles this kind of query
- */
-static char *do_simple_xml_query(xmlXPathContextPtr ctx, char *query) {
-  xmlXPathObjectPtr  obj = NULL;
-  xmlNodePtr        node = NULL;
-
-  CCSENTER("do_simple_xml_query");
-
-  obj = xmlXPathEvalExpression((xmlChar *)query, ctx);
-  if(!obj || !obj->nodesetval || (obj->nodesetval->nodeNr != 1))
-    logt_print(LOG_DEBUG, "Error processing query: %s.\n", query);
-  else {
-    node = obj->nodesetval->nodeTab[0];
-    if(node->type != XML_ATTRIBUTE_NODE)
-      logt_print(LOG_DEBUG, "Object returned is not of attribute type.\n");
-    else {
-      if(!node->children->content || !strlen((char *)node->children->content))
-	logt_print(LOG_DEBUG, "No content found.\n");
-      else {
-        CCSEXIT("do_simple_xml_query");
-	return strdup((char *)node->children->content);
-      }
-    }
-  }
-
-  if(obj)
-    xmlXPathFreeObject(obj);
-
-  CCSEXIT("do_simple_xml_query");
-  return NULL;
-}
-
-int get_doc_version(xmlDocPtr ldoc){
-  int i;
-  int error = 0;
-  xmlXPathContextPtr ctx = NULL;
-  char *res = NULL;
-
-  CCSENTER("get_doc_version");
-
-  ctx = xmlXPathNewContext(ldoc);
-  if(!ctx){
-    logt_print(LOG_ERR, "Error: unable to create new XPath context.\n");
-    error = -EIO;  /* ATTENTION -- what should this be? */
-    goto fail;
-  }
-
-  res =  do_simple_xml_query(ctx, "/cluster/@config_version");
-  if(res) {
-    for(i=0; i < strlen(res); i++){
-      if(!isdigit(res[i])){
-        logt_print(LOG_ERR, "config_version is not a valid integer.\n");
-        error = -EINVAL;
-        goto fail;
-      }
-    }
-    error = atoi(res);
-  } else
-    error = -EINVAL;
-
-fail:
-
-  if(res)
-	free(res);
-
-  if(ctx){
-    xmlXPathFreeContext(ctx);
-  }
-
-  CCSEXIT("get_doc_version");
-  return error;
-}
-
-
-/**
- * get_cluster_name
- * @ldoc:
- *
- * The caller must remember to free the string that is returned.
- *
- * Returns: NULL on failure, (char *) otherwise
- */
-char *get_cluster_name(xmlDocPtr ldoc){
-  int error = 0;
-  char *rtn = NULL;
-  xmlXPathContextPtr ctx = NULL;
-
-  CCSENTER("get_cluster_name");
-
-  ctx = xmlXPathNewContext(ldoc);
-  if(!ctx){
-    logt_print(LOG_ERR, "Error: unable to create new XPath context.\n");
-    error = -EIO;  /* ATTENTION -- what should this be? */
-    goto fail;
-  }
-
-  rtn = do_simple_xml_query(ctx, "/cluster/@name");
-
-fail:
-
-  if(ctx){
-    xmlXPathFreeContext(ctx);
-  }
-  CCSEXIT("get_cluster_name");
-  return rtn;
-}
-
-static int facility_id_get(char *name)
-{
-  unsigned int i;
-
-  for (i = 0; facilitynames[i].c_name != NULL; i++) {
-    if (strcasecmp(name, facilitynames[i].c_name) == 0) {
-      return (facilitynames[i].c_val);
-    }
-  }
-  return (-1);
-}
-
-static int priority_id_get(char *name)
-{
-  unsigned int i;
-
-  for (i = 0; prioritynames[i].c_name != NULL; i++) {
-    if (strcasecmp(name, prioritynames[i].c_name) == 0) {
-      return (prioritynames[i].c_val);
-    }
-  }
-  return (-1);
-}
-
-/**
- * set_ccs_logging
- * @ldoc:
- *
- * Returns: -1 on failure. NULL on success.
- */
-int set_ccs_logging(xmlDocPtr ldoc, int reconf){
-  int mode = LOG_MODE_OUTPUT_FILE | LOG_MODE_OUTPUT_SYSLOG;
-  int syslog_facility = SYSLOGFACILITY;
-  int syslog_priority = SYSLOGLEVEL;
-  char logfile[PATH_MAX];
-  int logfile_priority = SYSLOGLEVEL;
-  int val;
-  char *res = NULL;
-  xmlXPathContextPtr ctx = NULL;
-
-  CCSENTER("set_ccs_logging");
-
-  /* defaults */
-  memset(logfile, 0, PATH_MAX);
-  sprintf(logfile, LOGDIR "/ccs.log");
-
-  if(nodaemon)
-    mode |= LOG_MODE_OUTPUT_STDERR;
-
-  if(!reconf) /* init defaults here */
-    logt_init("CCS", mode, syslog_facility, syslog_priority, logfile_priority, logfile);
-
-  if(!ldoc) {
-    CCSEXIT("set_ccs_logging (default settings)");
-    return 0;
-  }
-
-  if(!ldoc && reconf) {
-    CCSEXIT("set_ccs_logging (reconf with no doc?)");
-    return -1;
-  }
-
-  ctx = xmlXPathNewContext(ldoc);
-  if(!ctx){
-    logt_print(LOG_ERR, "Error: unable to create new XPath context.\n");
-    return -1;
-  }
-
-  /** This clone the same stuff in ccs_read_logging
-   ** that unfortunately we cannot use in ccsd itself..
-   **/
-
-  /* to_syslog */
-  res = do_simple_xml_query(ctx, "/cluster/logging/@to_syslog");
-  if(res) {
-    if(!strcmp(res, "yes"))
-      mode |= LOG_MODE_OUTPUT_SYSLOG;
-    else if(!strcmp(res, "no"))
-      mode &= ~LOG_MODE_OUTPUT_SYSLOG;
-
-    free(res);
-    res=NULL;
-  }
-
-  res = do_simple_xml_query(ctx, "/cluster/logging/logging_subsys[@subsys=\"CCS\"]/@to_syslog");
-  if(res) {
-    if(!strcmp(res, "yes"))
-      mode |= LOG_MODE_OUTPUT_SYSLOG;
-    else if(!strcmp(res, "no"))
-      mode &= ~LOG_MODE_OUTPUT_SYSLOG;
-
-    free(res);
-    res=NULL;
-  }
-
-  /* to logfile */
-  res = do_simple_xml_query(ctx, "/cluster/logging/@to_logfile");
-  if(res) {
-    if(!strcmp(res, "yes"))
-      mode |= LOG_MODE_OUTPUT_FILE;
-    else if(!strcmp(res, "no"))
-      mode &= ~LOG_MODE_OUTPUT_FILE;
-
-    free(res);
-    res=NULL;
-  }
-
-  res = do_simple_xml_query(ctx, "/cluster/logging/logging_subsys[@subsys=\"CCS\"]/@to_logfile");
-  if(res) {
-    if(!strcmp(res, "yes"))
-      mode |= LOG_MODE_OUTPUT_FILE;
-    else if(!strcmp(res, "no"))
-      mode &= ~LOG_MODE_OUTPUT_FILE;
-
-    free(res);
-    res=NULL;
-  }
-
-  /* syslog_facility */
-  res = do_simple_xml_query(ctx, "/cluster/logging/@syslog_facility");
-  if(res) {
-    val = facility_id_get(res);
-    if (val >= 0)
-      syslog_facility = val;
-
-    free(res);
-    res=NULL;
-  }
-
-  res = do_simple_xml_query(ctx, "/cluster/logging/logging_subsys[@subsys=\"CCS\"]/@syslog_facility");
-  if(res) {
-    val = facility_id_get(res);
-    if (val >= 0)
-      syslog_facility = val;
-
-    free(res);
-    res=NULL;
-  }
-
-  /* syslog_priority */
-  res = do_simple_xml_query(ctx, "/cluster/logging/@syslog_priority");
-  if(res) {
-    val = priority_id_get(res);
-    if (val >= 0)
-      syslog_priority = val;
-
-    free(res);
-    res=NULL;
-  }
-
-  res = do_simple_xml_query(ctx, "/cluster/logging/logging_subsys[@subsys=\"CCS\"]/@syslog_priority");
-  if(res) {
-    val = priority_id_get(res);
-    if (val >= 0)
-      syslog_priority = val;
-
-    free(res);
-    res=NULL;
-  }
-
-  /* logfile */
-  res = do_simple_xml_query(ctx, "/cluster/logging/@logfile");
-  if(res) {
-    memset(logfile, 0, PATH_MAX);
-    strcpy(logfile, res);
-
-    free(res);
-    res=NULL;
-  }
-
-  res = do_simple_xml_query(ctx, "/cluster/logging/logging_subsys[@subsys=\"CCS\"]/@logfile");
-  if(res) {
-    memset(logfile, 0, PATH_MAX);
-    strcpy(logfile, res);
-
-    free(res);
-    res=NULL;
-  }
-
-  if(debug) {
-    logfile_priority = LOG_DEBUG;
-    goto debug_out;
-  }
-
-  /* debug */
-  res = do_simple_xml_query(ctx, "/cluster/logging/@debug");
-  if(res) {
-    if(!strcmp(res, "on"))
-      debug = 1;
-
-    free(res);
-    res=NULL;
-  }
-
-  res = do_simple_xml_query(ctx, "/cluster/logging/logging_subsys[@subsys=\"CCS\"]/@debug");
-  if(res) {
-    if(!strcmp(res, "on"))
-      debug = 1;
-    else if(!strcmp(res, "off"))
-      debug = 0;
-
-    free(res);
-    res=NULL;
-  }
-
-  if (debug) {
-    logfile_priority = LOG_DEBUG; 
-    goto debug_out;
-  }
-
-  /* logfile_priority */
-  res = do_simple_xml_query(ctx, "/cluster/logging/@logfile_priority");
-  if(res) {
-    val = priority_id_get(res);
-    if (val >= 0)
-      syslog_priority = val;
-
-    free(res);
-    res=NULL;
-  }
-
-  res = do_simple_xml_query(ctx, "/cluster/logging/logging_subsys[@subsys=\"CCS\"]/@logfile_priority");
-  if(res) {
-    val = priority_id_get(res);
-    if (val >= 0)
-      syslog_priority = val;
-
-    free(res);
-    res=NULL;
-  }
-
-debug_out:
-  if(ctx){
-    xmlXPathFreeContext(ctx);
-  }
-
-  logt_conf("CCS", mode, syslog_facility, syslog_priority, logfile_priority, logfile);
-
-  CCSEXIT("set_ccs_logging");
-  return 0;
-}
diff --git a/config/daemons/ccsd/misc.h b/config/daemons/ccsd/misc.h
deleted file mode 100644
index 706d605..0000000
--- a/config/daemons/ccsd/misc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __MISC_H__
-#define __MISC_H__
-
-typedef struct open_doc {
-  int od_refs;
-  xmlDocPtr od_doc;
-} open_doc_t;
-
-
-extern volatile int quorate;
-extern int update_required;
-extern pthread_mutex_t update_lock;
-extern open_doc_t *master_doc;
-
-char *get_cluster_name(xmlDocPtr ldoc);
-int get_doc_version(xmlDocPtr ldoc);
-int set_ccs_logging(xmlDocPtr ldoc, int reconf);
-
-#endif /* __MISC_H__ */
diff --git a/config/daemons/man/Makefile b/config/daemons/man/Makefile
deleted file mode 100644
index cdb7712..0000000
--- a/config/daemons/man/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-TARGET=
-
-include ../../../make/defines.mk
-
-ifdef legacy_code
-TARGET += ccsd.8
-endif
-
-include $(OBJDIR)/make/man.mk
diff --git a/config/daemons/man/ccsd.8 b/config/daemons/man/ccsd.8
deleted file mode 100644
index bcf0957..0000000
--- a/config/daemons/man/ccsd.8
+++ /dev/null
@@ -1,74 +0,0 @@
-.TH ccsd 8
-
-.SH NAME
-ccsd - manages the /etc/cluster/cluster.conf file
-
-.SH SYNOPSIS
-.B ccsd
-[\fIOPTION\fR]..
-
-.SH DESCRIPTION
-
-\fBccsd\fP is part of the Cluster Configuration System (CCS) and manages
-the cluster.conf file in a cman cluster.  It handles requests for
-cluster.conf information made through libccs.  It also keeps the
-cluster.conf file in sync among cluster nodes based on the value of
-cluster.conf:cluster/config_version.  ccsd may replace the local
-cluster.conf file if it discovers a newer version on another node.
-
-.SH OPTIONS
-.TP
-\fB-X\fP
-Disable all cluster manager (cman) and inter-node interactions. Simply
-respond to local libccs requests based on the current cluster.conf file.
-.TP
-\fB-4\fP
-Use IPv4 for inter-node communication.  By default, IPv6 is tried, then IPv4.
-.TP
-\fB-6\fP
-Use IPv6 for inter-node communication.  By default, IPv6 is tried, then IPv4.
-.TP
-\fB-I\fP
-Force use of IP for local communication (disables use of UNIX domain sockets).
-If set, \fBccsd\fP will use the specified inter-node communication protocol
-(see the \fB-4\fP and \fB-6\fP options).  If one is not specified,
-IPv6 is tried, then IPv4.  For backward compatibility, IP connections are
-still allowed even when UNIX domain sockets are available.
-.TP
-\fB-h\fP
-Help.  Print out the usage syntax.
-.TP
-\fB-m <multicast address>\fP
-Used to specify the multicast address.  The keyword "default" can be used,
-in which case "ff02::3:1" is used for IPv6 and "224.0.2.5" is used for IPv4.
-
-If you are using IPv4, the default action is to use broadcast.  Specifying
-this option will cause multicast to be used in that instance.
-.TP
-\fB-n\fP
-No daemon.  Run in the foreground.
-.TP
-\fB-P <port identifier>:<port number>\fP
-You have the option of specifying the port numbers used by ccsd.  The port
-identifier is either: b, c, or f.  "b" is the port which ccsd attempts to
-communicate with ccsd processes on other machines, via broadcast/multicast, to
-obtain or validate its config file (cluster.conf).  This is known as the backend
-port.  "c" is the base port number of two consecutive ports used by ccsd
-processes to communicate cluster membership information.  This is known as the
-cluster base port.  "f" is the port number that listens for information requests
-from the CCS library (or programs using it).  This is known as the frontend port.
-
-So, to change the frontend port one might specify \fI-P f:60000\fP.
-.TP
-\fB-t <ttl>\fP
-Set the multicast threshold (aka time to live).
-.TP
-\fB-V\fP
-Print the version information.
-.TP
-\fB-d\fP
-Enable debugging output.
-
-.SH SEE ALSO
-ccs(7), cman(5), ccs_tool(8), ccs_test(8), cluster.conf(5)
-
diff --git a/config/libs/Makefile b/config/libs/Makefile
index 25ea858..8fd2879 100644
--- a/config/libs/Makefile
+++ b/config/libs/Makefile
@@ -2,6 +2,3 @@ include ../../make/defines.mk
 include $(OBJDIR)/make/passthrough.mk
 
 SUBDIRS = libccsconfdb
-ifdef legacy_code
-SUBDIRS += libccscompat
-endif
diff --git a/config/libs/libccscompat/Makefile b/config/libs/libccscompat/Makefile
deleted file mode 100644
index dd7db01..0000000
--- a/config/libs/libccscompat/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-TARGET= libccscompat
-
-MAKESTATICLIB = 1
-
-include ../../../make/defines.mk
-include $(OBJDIR)/make/libs.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-CFLAGS += -D_FILE_OFFSET_BITS=64
-CFLAGS += -fPIC
-CFLAGS += -I$(SRCDIR)/config/daemons/ccsd
-CFLAGS += -I${incdir}
diff --git a/config/libs/libccscompat/libccscompat.c b/config/libs/libccscompat/libccscompat.c
deleted file mode 100644
index ec3c0a4..0000000
--- a/config/libs/libccscompat/libccscompat.c
+++ /dev/null
@@ -1,752 +0,0 @@
-#include <stdlib.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include "comm_headers.h"
-#include "libccscompat.h"
-
-#include <stdio.h>
-
-static int fe_port = 50006;
-static int comm_proto=-1;
-
-static int setup_interface_ipv6(int *sp, int port){
-  int sock = -1;
-  int error = 0;
-  struct sockaddr_in6 addr;
-  int trueint = 1;
-
-  memset(&addr, 0, sizeof(struct sockaddr_in6));
-
-  sock = socket(PF_INET6, SOCK_STREAM, 0);
-  if(sock < 0){
-    error = -errno;
-    goto fail;
-  }
-
-  setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &trueint, sizeof(int));
-
-  addr.sin6_family = AF_INET6;
-  addr.sin6_port = htons(port);
-  addr.sin6_addr = in6addr_loopback;
-
-  if(bind(sock, (struct sockaddr *)&addr, sizeof(struct sockaddr_in6))){
-    error = -errno;
-    goto fail;
-  }
-
-  addr.sin6_family = AF_INET6;
-  addr.sin6_addr = in6addr_any;
-  addr.sin6_port = htons(fe_port);
-  error = connect(sock, (struct sockaddr *)&addr,
-		  sizeof(struct sockaddr_in6));
-  if(error < 0){
-    error = -errno;
-    goto fail;
-  }
-
-  *sp = sock;
-  return 0;
-
- fail:
-  if(sock >= 0){
-    close(sock);
-  }
-  return error;
-}
-
-static int setup_interface_ipv4(int *sp, int port){
-  int sock = -1;
-  int error = 0;
-  struct sockaddr_in addr;
-
-  memset(&addr, 0, sizeof(struct sockaddr_in));
-  sock = socket(PF_INET, SOCK_STREAM, 0);
-  if(sock < 0){
-    error = -errno;
-    goto fail;
-  }
-
-  addr.sin_family = AF_INET;
-  inet_aton("127.0.0.1", (struct in_addr *)&addr.sin_addr.s_addr);
-  addr.sin_port = htons(port);
-
-  if(bindresvport(sock, &addr)){
-    error = -errno;
-    goto fail;
-  }
-
-  addr.sin_family = AF_INET;
-  addr.sin_addr.s_addr = INADDR_ANY;
-  addr.sin_port = htons(fe_port);
-  error = connect(sock, (struct sockaddr *)&addr,
-		  sizeof(struct sockaddr_in));
-  if(error < 0){
-    error = -errno;
-    goto fail;
-  }
-
-  *sp = sock;
-  return 0;
-
- fail:
-  if(sock >= 0){
-    close(sock);
-  }
-  return error;
-}
-
-
-static int
-setup_interface_local(int *sp)
-{
-  struct sockaddr_un sun;
-  int sock = -1, error = 0;
-
-  sun.sun_family = PF_LOCAL;
-  snprintf(sun.sun_path, sizeof(sun.sun_path), COMM_LOCAL_SOCKET);
-
-  sock = socket(PF_LOCAL, SOCK_STREAM, 0);
-  if (sock < 0) {
-    error = errno;
-    goto fail;
-  }
-
-  error = connect(sock, (struct sockaddr *)&sun, sizeof(sun));
-  if (error < 0) {
-    error = errno;
-    goto fail;
-  }
-
-  *sp = sock;
-  return PF_LOCAL;
-
-fail:
-  if (sock >= 0){
-    close(sock);
-  }
-  return -error;
-}
-
-
-/**
- * setup_interface
- * @sp: pointer gets filled in with open socket
- *
- * This function (through helper functions) handles the details
- * of creating and binding a socket followed be the connect.
- *
- * Returns: AF_INET | AF_INET6 on success, or -errno on error
- */
-static int setup_interface(int *sp){
-  int error=-1;
-  int res_port = IPPORT_RESERVED-1;
-  int timo=1;
-  int ipv4 = (comm_proto < 0) ? 1 : (comm_proto == PF_INET);
-  int ipv6 = (comm_proto < 0) ? 1 : (comm_proto == PF_INET6);
-  int local = (comm_proto < 0) ? 1 : (comm_proto == PF_LOCAL);
-
-  srandom(getpid());
-
-  /* Try to do a local connect first */
-  if (local && !(error = setup_interface_local(sp)))
-    error = PF_LOCAL;
-
-  if (error < 0) {
-    for(; res_port >= 512; res_port--){
-      if (ipv6 && !(error = setup_interface_ipv6(sp, res_port))){
-        error = PF_INET6;
-        break;
-      } else if (ipv4 && !(error = setup_interface_ipv4(sp, res_port))){
-        error = PF_INET;
-        break;
-      }
-      if(error == -ECONNREFUSED){
-        break;
-      }
-
-      /* Connections could have colided, giving ECONNREFUSED, or **
-      ** the port we are trying to bind to may already be in use **
-      ** and since we don't want to collide again, wait a random **
-      ** amount of time......................................... */
-      timo = random();
-      timo /= (RAND_MAX/4);
-      sleep(timo);
-    }
-  }
-  return error;
-}
-
-
-/**
- * do_request: send request an receive results
- * @buffer: package to send
- *
- * This function does not interpret the contents of the package, except
- * to check the 'comm_err' field.
- *
- * Returns: 0 on success, < 0 on error
- */
-static int do_request(char *buffer){
-  int error=0;
-  int sock=-1;
-  char *proto;
-  comm_header_t *ch = (comm_header_t *)buffer;
- 
-  if((error = setup_interface(&sock)) < 0){
-    goto fail;
-  }
-
-  /* In the future, we will only try the protocol that worked first */
-  if (comm_proto < 0){
-    if (error == AF_INET) {
-      proto = "IPv4";
-    } else if (error == AF_INET6) {
-      proto = "IPv6";
-    } else if (error == PF_LOCAL) {
-      proto = "Local Domain";
-    } else {
-      proto = "Unknown";
-    }
-
-    comm_proto = error;
-  }
-
-  error = write(sock, buffer, sizeof(comm_header_t)+ch->comm_payload_size);
-  if(error < 0){
-    goto fail;
-  } else if(error < (sizeof(comm_header_t)+ch->comm_payload_size)){
-    error = -EBADE;
-    goto fail;
-  }
-
-  /* ok to take in two passes ? */
-  error = read(sock, buffer, sizeof(comm_header_t));
-  if(error < 0){
-    goto fail;
-  } else if(error < sizeof(comm_header_t)){
-    error = -EBADE;
-    goto fail;
-  } else if(ch->comm_error){
-    error = ch->comm_error;
-    goto fail;
-  } else {
-    error = 0;
-  }
-  if(ch->comm_payload_size){
-    error = read(sock, buffer+sizeof(comm_header_t), ch->comm_payload_size);
-    if(error < 0){
-      goto fail;
-    } else if(error < ch->comm_payload_size){
-      error = -EBADE;
-      goto fail;
-    } else {
-      error = 0;
-    }
-  }
- fail:
-  if(sock >= 0) { close(sock); }
-  return error;
-}
-
-
-/**
-* _ccs_connect
-* @cluster_name: name of the cluster (optional)
-* @flags: blocking or force
-*
-* This function will return a descriptor on success that should be
-* used with the other functions for proper operation.
-*
-* Returns: >= 0 on success, < 0 on error
-*/
-static int _ccs_connect(const char *cluster_name, int flags){
-  int error = 0;
-  char *buffer = NULL;
-  comm_header_t *ch = NULL;
-  char *payload = NULL;
-
-  if(!(buffer = malloc(512))){
-    error = -ENOMEM;
-    goto fail;
-  }    
-
-  memset(buffer, 0, 512);
-  ch = (comm_header_t *)buffer;
-  payload = (buffer + sizeof(comm_header_t));
-
-  ch->comm_type = COMM_CONNECT;
-  if(flags & COMM_CONNECT_BLOCKING){
-    ch->comm_flags |= COMM_CONNECT_BLOCKING;
-  }
-
-  if(flags & COMM_CONNECT_FORCE){
-    ch->comm_flags |= COMM_CONNECT_FORCE;
-  }
-
-  if(cluster_name){
-    ch->comm_payload_size = strlen(cluster_name)+1;
-    if(ch->comm_payload_size > (512 - sizeof(comm_header_t))){
-      error = -ENAMETOOLONG;
-      goto fail;
-    }
-
-    strcpy(payload, cluster_name); /* already checked if it will fit */
-  }
-
-  if(!(error = do_request(buffer))){
-    /* Not an error, just reusing the 'error' variable */
-    error = ch->comm_desc;
-  }
-
- fail:
-  if(buffer) { free(buffer); }
-  return error;
-}
-
-
-/**
- * ccs_connect
- *
- * This function will only allow a connection if the node is part of
- * a quorate cluster.
- *
- * Returns: ccs_desc on success, < 0 on failure
- */
-int ccs_connect(void){
-  return _ccs_connect(NULL, 0);
-}
-
-
-/**
- * ccs_force_connect
- *
- * This function will only allow a connection even if the node is not
- * part of a quorate cluster.  It will use the configuration file
- * as specified at build time (default: /etc/cluster/cluster.conf).  If that
- * file does not exist, a copy of the file will be broadcasted for.  If
- * blocking is specified, the broadcasts will be retried until a config file
- * is located.  Otherwise, the fuction will return an error if the initial
- * broadcast is not successful.
- *
- * Returns: ccs_desc on success, < 0 on failure
- */
-int ccs_force_connect(const char *cluster_name, int blocking){
-  if(blocking){
-    return _ccs_connect(cluster_name, COMM_CONNECT_FORCE | COMM_CONNECT_BLOCKING);
-  } else {
-    return _ccs_connect(cluster_name, COMM_CONNECT_FORCE);
-  }
-}
-
-
-/**
- * ccs_disconnect
- * @desc: the descriptor returned by ccs_connect
- *
- * This function frees all associated state kept with an open connection
- *
- * Returns: 0 on success, < 0 on error
- */
-int ccs_disconnect(int desc){
-  int error = 0;
-  char *buffer = NULL;
-  comm_header_t *ch = NULL;
-  char *payload = NULL;
-
-  if (desc < 0)
-	  return -EINVAL;
-
-  if(!(buffer = malloc(512))){
-    error = -ENOMEM;
-    goto fail;
-  }    
-
-  memset(buffer, 0, 512);
-  ch = (comm_header_t *)buffer;
-  payload = (buffer + sizeof(comm_header_t));
-
-  ch->comm_type = COMM_DISCONNECT;
-  ch->comm_desc = desc;
-
-  error = do_request(buffer);
-
- fail:
-  if(buffer) { free(buffer); }
-
-  return error;
-}
-
-
-/**
- * _ccs_get
- * @desc:
- * @query:
- * @rtn: value returned
- * @list: 1 to operate in list fashion
- *
- * This function will allocate space for the value that is the result
- * of the given query.  It is the user's responsibility to ensure that
- * the data returned is freed.
- *
- * Returns: 0 on success, < 0 on failure
- */
-static int _ccs_get(int desc, const char *query, char **rtn, int list){
-  int error = 0;
-  char *buffer = NULL;
-  comm_header_t *ch = NULL;
-  char *payload = NULL;
-
-  if (desc < 0)
-	  return -EINVAL;
-
-  if(!(buffer = malloc(512))){
-    error = -ENOMEM;
-    goto fail;
-  }    
-
-  memset(buffer, 0, 512);
-  ch = (comm_header_t *)buffer;
-  payload = (buffer + sizeof(comm_header_t));
-
-  ch->comm_type = (list)?COMM_GET_LIST:COMM_GET;
-  ch->comm_desc = desc;
-
-  ch->comm_payload_size = sprintf(payload, "%s", query)+1;
-
-  error = do_request(buffer);
-
-  if(!error){
-    if(ch->comm_payload_size){
-      *rtn = (char *)strdup(payload);
-      if(!*rtn){ error = -ENOMEM; }
-    } else {
-      *rtn = NULL;
-    }
-  }
-
- fail:
-  if(buffer) { free(buffer); }
-
-  return error;
-}
-
-int ccs_get(int desc, const char *query, char **rtn){
-  return _ccs_get(desc, query, rtn, 0);
-}
-
-int ccs_get_list(int desc, const char *query, char **rtn){
-  return _ccs_get(desc, query, rtn, 1);
-}
-
-
-/**
- * ccs_set: set an individual element's value in the config file.
- * @desc:
- * @path:
- * @val:
- *
- * This function is used to update individual elements in a config file.
- * It's effects are cluster wide.  It only succeeds when the node is part
- * of a quorate cluster.
- *
- * Note currently implemented.
- * 
- * Returns: 0 on success, < 0 on failure
- */
-int ccs_set(int desc, const char *path, char *val){
-  return -ENOSYS;
-}
-
-
-/**
- * ccs_get_state: return the stored state of the connection
- * @desc:
- * @cw_path:
- * @prev_query:
- *
- * This function will return the current working path and the
- * previous query.  It is the user's responsibility to free
- * both returned values.
- *
- * Returns: 0 on success, < 0 on failure
- */
-int ccs_get_state(int desc, char **cw_path, char **prev_query){
-  int error = 0;
-  char *buffer = NULL;
-  comm_header_t *ch = NULL;
-  char *payload = NULL;
-
-  if (desc < 0)
-	  return -EINVAL;
-
-  if(!(buffer = malloc(512))){
-    error = -ENOMEM;
-    goto fail;
-  }    
-
-  *cw_path = *prev_query = NULL;
-
-  memset(buffer, 0, 512);
-  ch = (comm_header_t *)buffer;
-  payload = (buffer + sizeof(comm_header_t));
-
-  ch->comm_type = COMM_GET_STATE;
-  ch->comm_desc = desc;
-
-  error = do_request(buffer);
-  if(!error){
-    *cw_path = (char *)strdup(payload);
-    if(!*cw_path){
-      error = -ENOMEM;
-      goto fail;
-    }
-    *prev_query = (char *)strdup(payload+strlen(payload)+1);
-    if(!*prev_query){
-      error = -ENOMEM;
-      free(*cw_path);
-      *cw_path = NULL;
-      goto fail;
-    }
-  }
-
- fail:
-  if(buffer) { free(buffer); }
-
-  return error;
-}
-
-
-/**
- * ccs_set_state
- * @desc:
- * @cw_path:
- * @reset_query:
- *
- * This function allows the user to specify a current working path,
- * from which all later queries will be relative.  It also allows the
- * user to erase memory of the last query - useful if the user wanted
- * to reset the index of a list to 0.
- *
- * Returns: 0 on success, < 0 on failure
- */
-int ccs_set_state(int desc, const char *cw_path, int reset_query){
-  int error = 0;
-  char *buffer = NULL;
-  comm_header_t *ch = NULL;
-  char *payload = NULL;
-
-  if (desc < 0)
-	  return -EINVAL;
-
-  if(!(buffer = malloc(512))){
-    error = -ENOMEM;
-    goto fail;
-  }    
-
-  memset(buffer, 0, 512);
-  ch = (comm_header_t *)buffer;
-  payload = (buffer + sizeof(comm_header_t));
-
-  ch->comm_type = COMM_SET_STATE;
-  ch->comm_desc = desc;
-
-  if(reset_query){
-    ch->comm_flags |= COMM_SET_STATE_RESET_QUERY;
-  }
-
-  if(strlen(cw_path)+1 > 512-sizeof(comm_header_t)){
-    error = -ENAMETOOLONG;
-    goto fail;
-  }
-
-  /* sprintf does not include trailing \0 */
-  ch->comm_payload_size = sprintf(payload, "%s", cw_path) + 1;
-
-  error = do_request(buffer);
-
- fail:
-  if(buffer) { free(buffer); }
-
-  return error;
-}
-
-/**
- * ccs_lookup_nodename
- * @cd: ccs descriptor
- * @nodename: node name string
- * @retval: pointer to location to assign the result, if found
- *
- * This function takes any valid representation (FQDN, non-qualified
- * hostname, IP address, IPv6 address) of a node's name and finds its
- * canonical name (per cluster.conf). This function will find the primary
- * node name if passed a node's "altname" or any valid representation
- * of it.
- *
- * Returns: 0 on success, < 0 on failure
- */
-int ccs_lookup_nodename(int cd, const char *nodename, char **retval) {
-	char path[256];
-	char host_only[128];
-	char *str;
-	char *p;
-	int error;
-	int ret;
-	unsigned int i;
-	size_t nodename_len;
-	struct addrinfo hints;
-
-	if (nodename == NULL)
-		return (-1);
-
-	nodename_len = strlen(nodename);
-	ret = snprintf(path, sizeof(path),
-			"/cluster/clusternodes/clusternode[@name=\"%s\"]/@name", nodename);
-	if (ret < 0 || (size_t) ret >= sizeof(path))
-		return (-E2BIG);
-
-	str = NULL;
-	error = ccs_get(cd, path, &str);
-	if (!error) {
-		*retval = str;
-		return (0);
-	}
-
-	if (nodename_len >= sizeof(host_only))
-		return (-E2BIG);
-
-	/* Try just the hostname */
-	strcpy(host_only, nodename);
-	p = strchr(host_only, '.');
-	if (p != NULL) {
-		*p = '\0';
-
-		ret = snprintf(path, sizeof(path),
-				"/cluster/clusternodes/clusternode[@name=\"%s\"]/@name",
-				host_only);
-		if (ret < 0 || (size_t) ret >= sizeof(path))
-			return (-E2BIG);
-
-		str = NULL;
-		error = ccs_get(cd, path, &str);
-		if (!error) {
-			*retval = str;
-			return (0);
-		}
-	}
-
-	memset(&hints, 0, sizeof(hints));
-	if (strchr(nodename, ':') != NULL)
-		hints.ai_family = AF_INET6;
-	else if (isdigit(nodename[nodename_len - 1]))
-		hints.ai_family = AF_INET;
-	else
-		hints.ai_family = AF_UNSPEC;
-
-	/*
-	** Try to match against each clusternode in cluster.conf.
-	*/
-	for (i = 1 ; ; i++) {
-		char canonical_name[128];
-		unsigned int altcnt;
-
-		ret = snprintf(path, sizeof(path),
-				"/cluster/clusternodes/clusternode[%u]/@name", i);
-		if (ret < 0 || (size_t) ret >= sizeof(path))
-			continue;
-
-		for (altcnt = 0 ; ; altcnt++) {
-			size_t len;
-			struct addrinfo *ai = NULL;
-			char cur_node[128];
-
-			if (altcnt != 0) {
-				ret = snprintf(path, sizeof(path), 
-					"/cluster/clusternodes/clusternode[%u]/altname[%u]/@name",
-					i, altcnt);
-				if (ret < 0 || (size_t) ret >= sizeof(path))
-					continue;
-			}
-
-			str = NULL;
-			error = ccs_get(cd, path, &str);
-			if (error || !str) {
-				if (altcnt == 0)
-					goto out_fail;
-				break;
-			}
-
-			if (altcnt == 0) {
-				if (strlen(str) >= sizeof(canonical_name)) {
-					free(str);
-					return (-E2BIG);
-				}
-				strcpy(canonical_name, str);
-			}
-
-			if (strlen(str) >= sizeof(cur_node)) {
-				free(str);
-				return (-E2BIG);
-			}
-
-			strcpy(cur_node, str);
-
-			p = strchr(cur_node, '.');
-			if (p != NULL)
-				len = p - cur_node;
-			else
-				len = strlen(cur_node);
-
-			if (strlen(host_only) == len &&
-				!strncasecmp(host_only, cur_node, len))
-			{
-				free(str);
-				*retval = strdup(canonical_name);
-				if (*retval == NULL)
-					return (-ENOMEM);
-				return (0);
-			}
-
-			if (getaddrinfo(str, NULL, &hints, &ai) == 0) {
-				struct addrinfo *cur;
-
-				for (cur = ai ; cur != NULL ; cur = cur->ai_next) {
-					char hostbuf[512];
-					if (getnameinfo(cur->ai_addr, cur->ai_addrlen,
-							hostbuf, sizeof(hostbuf),
-							NULL, 0,
-							hints.ai_family != AF_UNSPEC ? NI_NUMERICHOST : 0))
-					{
-						continue;
-					}
-
-					if (!strcasecmp(hostbuf, nodename)) {
-						freeaddrinfo(ai);
-						free(str);
-						*retval = strdup(canonical_name);
-						if (*retval == NULL)
-							return (-ENOMEM);
-						return (0);
-					}
-				}
-				freeaddrinfo(ai);
-			}
-
-			free(str);
-
-			/* Now try any altnames */
-		}
-	}
-
-out_fail:
-	*retval = NULL;
-	return (-1);
-}
diff --git a/config/libs/libccscompat/libccscompat.h b/config/libs/libccscompat/libccscompat.h
deleted file mode 100644
index 0daba20..0000000
--- a/config/libs/libccscompat/libccscompat.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifdef __CCS_DOT_H__
-#error DO NOT INCLUDE libccscompat.h and ccs.h at the same time. it is BAD!
-#endif
-
-#ifndef __CCS_COMPAT_DOT_H__
-#define __CCS_COMPAT_DOT_H__
-
-int ccs_connect(void);
-int ccs_force_connect(const char *cluster_name, int blocking);
-int ccs_disconnect(int desc);
-int ccs_get(int desc, const char *query, char **rtn);
-int ccs_get_list(int desc, const char *query, char **rtn);
-int ccs_set(int desc, const char *path, char *val);
-int ccs_get_state(int desc, char **cw_path, char **prev_query);
-int ccs_set_state(int desc, const char *cw_path, int reset_query);
-int ccs_lookup_nodename(int desc, const char *nodename, char **rtn);
-
-#endif /*  __CCS_COMPAT_DOT_H__ */
diff --git a/config/man/Makefile b/config/man/Makefile
index 62b2e1e..bf289e0 100644
--- a/config/man/Makefile
+++ b/config/man/Makefile
@@ -1,5 +1,4 @@
-TARGET= ccs.7 \
-	cluster.conf.5
+TARGET= cluster.conf.5
 
 include ../../make/defines.mk
 include $(OBJDIR)/make/man.mk
diff --git a/config/man/ccs.7 b/config/man/ccs.7
deleted file mode 100644
index 0818bdf..0000000
--- a/config/man/ccs.7
+++ /dev/null
@@ -1,22 +0,0 @@
-.TH ccs 7
-
-.SH NAME
-ccs - Cluster Configuration System
-
-.SH DESCRIPTION
-
-CCS is the system that manages the /etc/cluster/cluster.conf file on
-cluster nodes.  The primary users of cluster.conf are the cman cluster
-manager, the fenced fencing daemon and rgmanager which manages H/A
-services.
-
-libccs is the API used by the programs and daemons above to read
-cluster.conf information.  libccs requests go through the ccsd daemon.
-ccsd needs to be started before the cman cluster manager is started.
-
-The ccs_test program can be used to test the ccs system and read
-cluster.conf values.
-
-.SH SEE ALSO
-ccsd(8), ccs_tool(8), ccs_test(8), cluster.conf(5), cman(5)
-
diff --git a/config/plugins/Makefile b/config/plugins/Makefile
index 7cbd811..d39b807 100644
--- a/config/plugins/Makefile
+++ b/config/plugins/Makefile
@@ -2,6 +2,3 @@ include ../../make/defines.mk
 include $(OBJDIR)/make/passthrough.mk
 
 SUBDIRS = xml ldap
-ifdef legacy_code
-SUBDIRS += ccsais
-endif
diff --git a/config/plugins/ccsais/Makefile b/config/plugins/ccsais/Makefile
deleted file mode 100644
index 40ac0ec..0000000
--- a/config/plugins/ccsais/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-TARGET= config_ccs.lcrso
-
-LCRSOT=$(TARGET)
-
-all: depends ${TARGET}
-
-include ../../../make/defines.mk
-include $(OBJDIR)/make/cobj.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-CFLAGS += -fPIC
-CFLAGS += -I$(SRCDIR)/config/libs/libccscompat
-CFLAGS += -I${cmanincdir}/../daemon
-CFLAGS += -I${incdir}
-
-LDFLAGS += -L$(OBJDIR)/config/libs/libccscompat -lccscompat
-LDFLAGS += -L${libdir}
-
-LDDEPS += $(OBJDIR)/config/libs/libccscompat/libccscompat.a
-
-OBJS=	config.o
-
-${TARGET}: ${OBJS} ${LDDEPS}
-	$(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDFLAGS)
-
-depends:
-	$(MAKE) -C $(OBJDIR)/config/libs/libccscompat all
-
-clean: generalclean 
-
--include $(OBJS:.o=.d)
diff --git a/config/plugins/ccsais/config.c b/config/plugins/ccsais/config.c
deleted file mode 100644
index ad3c40a..0000000
--- a/config/plugins/ccsais/config.c
+++ /dev/null
@@ -1,236 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-#include <syslog.h>
-#include <netinet/in.h>
-
-#include "list.h"
-#include "cnxman-socket.h"
-#include "cnxman-private.h"
-
-#include <corosync/lcr/lcr_comp.h>
-#include <corosync/engine/objdb.h>
-#include <corosync/engine/config.h>
-
-#include "libccscompat.h"
-#include "logging.h"
-
-#define CONFIG_VERSION_PATH	"/cluster/@config_version"
-#define CONFIG_NAME_PATH	"/cluster/@name"
-
-#ifndef MAXXMLNODES
-#define MAXXMLNODES 1024
-#endif
-
-static int ccs_readconfig(struct objdb_iface_ver0 *objdb, char **error_string);
-static int ccs_reloadconfig(struct objdb_iface_ver0 *objdb, int flush, char **error_string);
-static int init_config(struct objdb_iface_ver0 *objdb, char *error_string);
-static char error_reason[1024];
-
-/*
- * Exports the interface for the service
- */
-
-static struct config_iface_ver0 ccsconfig_iface_ver0 = {
-	.config_readconfig        = ccs_readconfig,
-	.config_reloadconfig      = ccs_reloadconfig
-};
-
-static struct lcr_iface ifaces_ver0[2] = {
-	{
-		.name		       	= "ccsconfig",
-		.version	       	= 0,
-		.versions_replace      	= 0,
-		.versions_replace_count	= 0,
-		.dependencies	       	= 0,
-		.dependency_count      	= 0,
-		.constructor	       	= NULL,
-		.destructor	       	= NULL,
-		.interfaces	       	= NULL,
-	}
-};
-
-static struct lcr_comp ccs_comp_ver0 = {
-	.iface_count				= 1,
-	.ifaces					= ifaces_ver0,
-};
-
-
-
-__attribute__ ((constructor)) static void ccs_comp_register(void) {
-	lcr_interfaces_set(&ifaces_ver0[0], &ccsconfig_iface_ver0);
-	lcr_component_register(&ccs_comp_ver0);
-};
-
-static int should_alloc(int ccs_fd, char *key)
-{
-	int keyerror, childerr;
-	char path[256];
-	char *str = NULL;
-
-	sprintf(path, "%s/@*", key);
-	keyerror = ccs_get_list(ccs_fd, path, &str);
-	if(str) {
-		free(str);
-		str = NULL;
-	}
-
-	sprintf(path, "%s/child::*", key);
-	childerr = ccs_get_list(ccs_fd, path, &str);
-	if(str)
-		free(str);
-
-	if (childerr && keyerror)
-		return 0;
-
-	return 1;
-}
-
-static int read_config_for(int ccs_fd, struct objdb_iface_ver0 *objdb, unsigned int parent,
-			   char *object, char *key, int always_create)
-{
-	int error;
-	char *str;
-	unsigned int object_handle = 0;
-	char path[256];
-	int gotcount = 0;
-	char *subkeys[MAXXMLNODES];
-	int subkeycount = 0;
-	int i;
-
-	if (should_alloc(ccs_fd, key) || always_create)
-		objdb->object_create(parent, &object_handle, object, strlen(object));
-
-	sprintf(path, "%s/@*", key);
-
-	/* Get the keys */
-	for (;;)
-	{
-		char *equal;
-
-		error = ccs_get_list(ccs_fd, path, &str);
-		if (error || !str)
-                        break;
-
-		equal = strchr(str, '=');
-		if (equal)
-		{
-			*equal = 0;
-			objdb->object_key_create(object_handle, str, strlen(str),
-						 equal+1, strlen(equal+1)+1);
-			gotcount++;
-		}
-		free(str);
-	}
-
-	/* Now look for sub-objects.
-	   CCS can't cope with recursive queries so we have to store the result of
-	   the subkey search */
-	memset(subkeys, 0, sizeof(subkeys));
-	sprintf(path, "%s/child::*", key);
-	for (;;)
-	{
-		char *equal;
-
-		error = ccs_get_list(ccs_fd, path, &str);
-		if (error || !str)
-                        break;
-
-		/* CCS returns duplicate values for the numbered entries we use below.
-		   eg. if there are 4 <clusternode/> entries it will return
-		     clusternode=
-		     clusternode=
-		     clusternode=
-		     clusternode=
-		   which is not helpful to us cos we retrieve them as
-		     clusternode[1]
-		     clusternode[2]
-		     clusternode[3]
-		     clusternode[4]
-		   so we just store unique keys.
-		*/
-		equal = strchr(str, '=');
-		if (equal)
-			*equal = 0;
-
-		if (subkeycount > 0 && strcmp(str, subkeys[subkeycount-1]) == 0)
-		{
-			free(str);
-			continue;
-		}
-		subkeys[subkeycount++] = str;
-		if (subkeycount >= MAXXMLNODES)
-			return -1;
-	}
-
-	for (i=0; i<subkeycount; i++)
-	{
-		int count = 0;
-		str = subkeys[i];
-		gotcount++;
-
-		for (;;)
-		{
-			char subpath[1024];
-			int res;
-
-			/* Found a subkey, iterate through it's sub sections */
-			sprintf(subpath, "%s/%s[%d]", key, str, ++count);
-			res = read_config_for(ccs_fd, objdb, object_handle, str, subpath, 0);
-			if (!res)
-				break;
-			if (res < 0)
-				return -1;
-		}
-		free(str);
-	}
-	return gotcount;
-}
-
-static int ccs_reloadconfig(struct objdb_iface_ver0 *objdb, int flush, char **error_string)
-{
-	return init_config(objdb, error_reason);
-}
-
-static int ccs_readconfig(struct objdb_iface_ver0 *objdb, char **error_string)
-{
-	int ret;
-
-	/* We need to set this up to internal defaults too early */
-	openlog("corosync", LOG_CONS|LOG_PID, SYSLOGFACILITY);
-
-	/* Read low-level totem/aisexec etc config from CCS */
-	if ( !(ret = init_config(objdb, error_reason)) )
-	    sprintf (error_reason, "%s", "Successfully read config from CCS\n");
-
-        *error_string = error_reason;
-
-	return ret;
-}
-
-
-static int init_config(struct objdb_iface_ver0 *objdb, char *error_string)
-{
-	int cd;
-	char *cname = NULL;
-
-	/* Connect to ccsd */
-	if (getenv("CCS_CLUSTER_NAME")) {
-		cname = getenv("CCS_CLUSTER_NAME");
-	}
-
-	cd = ccs_force_connect(cname, 0);
-	if (cd < 0) {
-		strcpy(error_string, "Error connecting to CCS to get configuration. Check ccsd is running");
-		return -1;
-	}
-
-	if(read_config_for(cd, objdb, OBJECT_PARENT_HANDLE, "cluster", "/cluster", 1) < 0) {
-		strcpy(error_string, "Error: too many nodes within the same XML block\n");
-		return -1;
-	}
-
-	ccs_disconnect(cd);
-	return 0;
-}
diff --git a/config/tools/ccs_tool/Makefile b/config/tools/ccs_tool/Makefile
index be8805e..c363b73 100644
--- a/config/tools/ccs_tool/Makefile
+++ b/config/tools/ccs_tool/Makefile
@@ -16,10 +16,6 @@ include $(OBJDIR)/make/uninstall.mk
 OBJS =	ccs_tool.o \
 	editconf.o
 
-ifdef legacy_code
-OBJS += update.o
-endif
-
 CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
 CFLAGS += -I${cmanincdir} `xml2-config --cflags`
 CFLAGS += -I${ccsincdir} -I$(SRCDIR)/config/daemons/ccsd
@@ -27,12 +23,7 @@ CFLAGS += -I$(SRCDIR)/config/libs/libccscompat
 CFLAGS += -I${incdir}
 
 LDFLAGS += -L${cmanlibdir} -lcman
-ifdef legacy_code
-LDFLAGS += -L$(OBJDIR)/config/libs/libccscompat -lccscompat
-LDDEPS += $(OBJDIR)/config/libs/libccscompat/libccscompat.a
-else
 LDFLAGS += -L${ccslibdir} -lccs
-endif
 LDFLAGS += `xml2-config --libs`
 LDFLAGS += -L${libdir}
 
@@ -44,9 +35,6 @@ ${TARGET2}: ${TARGET1}
 
 depends:
 	$(MAKE) -C $(OBJDIR)/cman/lib all
-ifdef legacy_code
-	$(MAKE) -C $(OBJDIR)/config/libs/libccscompat all
-endif
 
 clean: generalclean
 
diff --git a/config/tools/ccs_tool/ccs_tool.c b/config/tools/ccs_tool/ccs_tool.c
index e7a1c48..34805be 100644
--- a/config/tools/ccs_tool/ccs_tool.c
+++ b/config/tools/ccs_tool/ccs_tool.c
@@ -6,12 +6,7 @@
 
 #include "copyright.cf"
 #include "editconf.h"
-#ifdef LEGACY_CODE
-#include "update.h"
-#include "libccscompat.h"
-#else
 #include "ccs.h"
-#endif
 
 
 /*
@@ -20,11 +15,7 @@
  */
 static char *errstring(int retcode)
 {
-#ifdef LEGACY_CODE
-	return strerror(retcode);
-#else
 	return strerror(errno);
-#endif
 }
 
 static void tool_print_usage(FILE *stream);
@@ -90,9 +81,7 @@ static int test_main(int argc, char *argv[], int old_format){
     } else {
       printf("Connect successful.\n");
       printf(" Connection descriptor = %d\n", desc);
-#ifndef LEGACY_CODE
       ccs_disconnect(desc);
-#endif
     }
   }
   else if(!strcmp(argv[1], "disconnect")){
@@ -100,11 +89,7 @@ static int test_main(int argc, char *argv[], int old_format){
       fprintf(stderr, "Wrong number of arguments.\n");
       exit(EXIT_FAILURE);
     }
-#ifdef LEGACY_CODE
-    desc = atoi(argv[2]);
-#else
     desc = ccs_connect();
-#endif
     if((error = ccs_disconnect(desc))){
       fprintf(stderr, "ccs_disconnect failed: %s\n", errstring(-error));
       exit(EXIT_FAILURE);
@@ -117,11 +102,7 @@ static int test_main(int argc, char *argv[], int old_format){
       fprintf(stderr, "Wrong number of arguments.\n");
       exit(EXIT_FAILURE);
     }
-#ifdef LEGACY_CODE
-    desc = atoi(argv[2]);
-#else
     desc = ccs_connect();
-#endif
     if((desc < 0) || (error = ccs_get(desc, argv[3], &str))){
       fprintf(stderr, "ccs_get failed: %s\n", errstring(-error));
       exit(EXIT_FAILURE);
@@ -134,9 +115,7 @@ static int test_main(int argc, char *argv[], int old_format){
 		    printf("%s\n", str);
 	    }
       if(str)free(str);
-#ifndef LEGACY_CODE
       ccs_disconnect(desc);
-#endif
     }
   }
   else {
@@ -165,7 +144,6 @@ static void test_print_usage(FILE *stream)
 	  );
 }
 
-#ifndef LEGACY_CODE
 static int xpath_query(int argc, char **argv)
 {
 	int handle;
@@ -211,7 +189,6 @@ static int xpath_query(int argc, char **argv)
 	ccs_disconnect(handle);
 	return 0;
 }
-#endif
 
 static int tool_main(int argc, char *argv[])
 {
@@ -237,38 +214,9 @@ static int tool_main(int argc, char *argv[])
       tool_print_usage(stdout);
       exit(EXIT_SUCCESS);
     }
-#ifdef LEGACY_CODE
-    /* Update is meaningless now */
-    else if(!strcmp(argv[optind], "update")){
-      if(optind+1 >= argc){
-	fprintf(stderr, "Too few arguments.\n"
-		"Try 'ccs_tool help' for help.\n");
-	exit(EXIT_FAILURE);
-      }
-      if(update(argv[optind+1])){
-	fprintf(stderr, "\nFailed to update config file.\n");
-	exit(EXIT_FAILURE);
-      }
-      printf("\nUpdate complete.\n");
-    }
-    /* Do old ccs queries */
-    else if(!strcmp(argv[optind], "query")){
-	    char *new_argv[argc+2];
-	    int i;
-
-	    new_argv[0] = "ccs_test";
-	    new_argv[1] = "get";
-	    new_argv[2] = "0"; /* Dummy connection ID */
-	    for (i=2; i<argc; i++)
-		    new_argv[1+i] = argv[i];
-
-	    return test_main(argc+1, new_argv, 0);
-    }
-#else
     else if(!strcmp(argv[optind], "query")){
 	    return xpath_query(argc-1, argv+1);
     }
-#endif
     else if(!strcmp(argv[optind], "addnode")){
 	    add_node(argc-1, argv+1);
 	    exit(EXIT_SUCCESS);
@@ -327,12 +275,7 @@ static void tool_print_usage(FILE *stream){
 	  "\n"
 	  "Commands:\n"
 	  "  help                Print this usage and exit.\n"
-#ifdef LEGACY_CODE
-	  "  update <xml file>   Tells ccsd to upgrade to new config file version.\n"
-	  "  query <ccs query>   Query the cluster configuration.\n"
-#else
 	  "  query <xpath query> Query the cluster configuration.\n"
-#endif
 	  "  addnode <node>      Add a node\n"
           "  delnode <node>      Delete a node\n"
           "  lsnode              List nodes\n"
diff --git a/config/tools/ccs_tool/editconf.c b/config/tools/ccs_tool/editconf.c
index 28e24da..86fa65e 100644
--- a/config/tools/ccs_tool/editconf.c
+++ b/config/tools/ccs_tool/editconf.c
@@ -11,10 +11,6 @@
 
 #include <libxml/tree.h>
 
-#ifdef LEGACY_CODE
-#include "update.h"
-#endif
-
 #define MAX_NODES 256
 
 char *prog_name = "ccs_tool";
@@ -228,16 +224,6 @@ static void save_file(xmlDoc *doc, struct option_info *ninfo)
 		}
 	}
 
-#ifdef LEGACY_CODE
-	/* Try to tell ccsd if needed */
-	if ((strcmp(ninfo->configfile, ninfo->outputfile) == 0 && ninfo->tell_ccsd) ||
-	    ninfo->force_ccsd)
-	{
-		printf("running ccs_tool update...\n");
-		update(ninfo->outputfile);
-	}
-#endif
-
 	/* free the document */
 	xmlFreeDoc(doc);
 
diff --git a/config/tools/ccs_tool/update.c b/config/tools/ccs_tool/update.c
deleted file mode 100644
index d8c1308..0000000
--- a/config/tools/ccs_tool/update.c
+++ /dev/null
@@ -1,673 +0,0 @@
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <libxml/xpath.h>
-#include <libxml/xpathInternals.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-
-#include "comm_headers.h"
-#include "libccscompat.h"
-#include "libcman.h"
-
-typedef struct member_list {
-  int count;
-  int pad;
-  cman_node_t *nodes;
-} member_list_t;
-
-static member_list_t *get_member_list(cman_handle_t handle);
-static void free_member_list(member_list_t *list);
-
-static int select_retry(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *xfds,
-			struct timeval *timeout);
-
-static ssize_t read_retry(int fd, void *buf, int count, struct timeval *timeout);
-
-static int ccs_open(cman_node_t node, uint16_t baseport, int timeout);
-static int ipv4_connect(struct in_addr *addr, uint16_t port, int timeout);
-static int ipv6_connect(struct in6_addr *addr, uint16_t port, int timeout);
-static int connect_nb(int fd, struct sockaddr *addr, socklen_t len, int timeout);
-
-extern int globalverbose;
-
-int cluster_base_port = 50008;
-
-static int get_doc_version(xmlDocPtr ldoc)
-{
-  int i;
-  int error = 0;
-
-  xmlXPathObjectPtr  obj = NULL;
-  xmlXPathContextPtr ctx = NULL;
-  xmlNodePtr        node = NULL;
-
-  ctx = xmlXPathNewContext(ldoc);
-
-  if (!ctx) {
-    fprintf(stderr, "Unable to create new XPath context.\n");
-    error = -EIO;  /* ATTENTION -- what should this be? */
-    goto fail;
-  }
-
-  obj = xmlXPathEvalExpression((xmlChar *)"/cluster/@config_version", ctx);
-
-  if (!obj || !obj->nodesetval || (obj->nodesetval->nodeNr != 1)) {
-    fprintf(stderr, "Error while retrieving config_version.\n");
-    error = -ENODATA;
-    goto fail;
-  }
-
-  node = obj->nodesetval->nodeTab[0];
-
-  if (node->type != XML_ATTRIBUTE_NODE) {
-    fprintf(stderr, "Object returned is not of attribute type.\n");
-    error = -ENODATA;
-    goto fail;
-  }
-
-  if (!node->children->content || !strlen((char *)node->children->content)) {
-    error = -ENODATA;
-    goto fail;
-  }
-
-  for (i = 0; i < strlen((char *)node->children->content); i++) {
-    if (!isdigit(node->children->content[i])) {
-      fprintf(stderr, "config_version is not a valid integer.\n");
-      error = -EINVAL;
-      goto fail;
-    }
-  }
-
-  error = atoi((char *)node->children->content);
-
-fail:
-
-  if (ctx) {
-    xmlXPathFreeContext(ctx);
-  }
-
-  if (obj) {
-    xmlXPathFreeObject(obj);
-  }
-
-  return error;
-}
-
-
-int update(char *location)
-{
-  int error = 0;
-  int i, fd;
-  int cluster_fd = -1;
-  char true_location[256];
-  xmlDocPtr doc = NULL;
-  xmlChar *mem_doc;
-  int doc_size = 0;
-  char *buffer = NULL;
-  comm_header_t *ch = NULL, rch;
-  member_list_t *members = NULL;
-  cman_handle_t handle = NULL;
-  int desc;
-  char *v1_str,*v3_str;
-  int v1, v2, v3;
-
-  struct timeval tv;
-
-  if (location[0] != '/') {
-    memset(true_location, 0, 256);
-    if (!getcwd(true_location, 256)) {
-      fprintf(stderr, "Unable to get the current working directory.\n");
-      return -errno;
-    }
-    true_location[strlen(true_location)] = '/';
-    strncpy(true_location+strlen(true_location), location, 256-strlen(true_location));
-  } else {
-    strncpy(true_location, location, 256);
-  }
-
-  desc = ccs_connect();
-
-  if (desc < 0) {
-    fprintf(stderr, "Unable to connect to the CCS daemon: %s\n", strerror(-desc));
-    return desc;
-  }
-
-  if ((error = ccs_get(desc, "/cluster/@config_version", &v1_str))) {
-    fprintf(stderr, "Unable to get current config_version: %s\n", strerror(-error));
-    ccs_disconnect(desc);
-    return error;
-  }
-
-  ccs_disconnect(desc);
-
-  for (i = 0; i < strlen(v1_str); i++) {
-    if (!isdigit(v1_str[i])) {
-      fprintf(stderr, "config_version is not a valid integer.\n");
-      free(v1_str);
-      return -EINVAL;
-    }
-  }
-
-  v1 = atoi(v1_str);
-  free(v1_str);
-
-  doc = xmlParseFile(true_location);
-
-  if (!doc) {
-    fprintf(stderr, "Unable to parse %s\n", true_location);
-    return -EINVAL;
-  }
-
-  v2 = get_doc_version(doc);
-
-  if (v2 < 0) {
-    fprintf(stderr, "Unable to get the config_version from %s\n", location);
-    xmlFreeDoc(doc);
-    return -EINVAL;
-  }
-
-  if (v2 <= v1)  {
-    fprintf(stderr,
-	    "Proposed updated config file does not have greater version number.\n"
-	    "  Current config_version :: %d\n"
-	    "  Proposed config_version:: %d\n", v1, v2);
-    xmlFreeDoc(doc);
-    return -EINVAL;
-  }    
-
-  xmlDocDumpFormatMemory(doc, &mem_doc, &doc_size, 0);
-
-  if (!mem_doc) {
-    fprintf(stderr, "Unable to allocate memory for update document.\n");
-    xmlFreeDoc(doc);
-    return -ENOMEM;
-  }
-
-  xmlFreeDoc(doc);
-
-  buffer = malloc(doc_size + sizeof(comm_header_t));
-
-  if (!buffer) {
-    fprintf(stderr, "Unable to allocate memory for transfer buffer.\n");
-    free(mem_doc);
-    return -ENOMEM;
-  }
-
-  memset(buffer, 0, (doc_size + sizeof(comm_header_t)));
-  ch = (comm_header_t *)buffer;
-
-  memcpy(buffer+sizeof(comm_header_t), mem_doc, doc_size);
-  free(mem_doc);
-
-  ch->comm_type = COMM_UPDATE;
-  ch->comm_flags= COMM_UPDATE_NOTICE;
-  ch->comm_payload_size = doc_size;
-
-  handle = cman_admin_init(NULL);
-
-  cluster_fd = cman_get_fd(handle);
-
-  /* Should we test the cman handle of file descriptor to determine connectivity? */
-
-  if (cluster_fd < 0) {
-    fprintf(stderr, "Unable to connect to cluster infrastructure.\n");
-    return cluster_fd;
-  }
-
-  if (!cman_is_quorate(handle)) {
-    fprintf(stderr, "Unable to honor update request. Cluster is not quorate.\n");
-    return -EPERM;
-  }
-
-  members = get_member_list(handle);
-
-  swab_header(ch);
-  
-  for (i = 0; i < members->count; i++) {
-    if (members->nodes[i].cn_nodeid == 0)
-      continue;
-    if (members->nodes[i].cn_member == 0)
-      continue;
-
-    fd = ccs_open(members->nodes[i], cluster_base_port, 5);
-
-    if (fd < 0) {
-      fprintf(stderr, "Unable to open connection to %s: %s\n",
-	      members->nodes[i].cn_name, strerror(errno));
-      free(buffer);
-      free_member_list(members);
-      return -errno;
-    }
-
-    error = write(fd, buffer, sizeof(comm_header_t) + doc_size);
-
-    if (error < 0) {
-      fprintf(stderr, "Unable to send msg to %s: %s\n",
-	      members->nodes[i].cn_name, strerror(errno));
-      close(fd);
-      free(buffer);
-      free_member_list(members);
-      return -errno;
-    }
-
-    tv.tv_sec = 5;
-    tv.tv_usec = 0;
-
-    error = read_retry(fd, &rch, sizeof(comm_header_t), &tv);
-
-    swab_header(&rch);
-
-    if (error < 0) {
-      fprintf(stderr, "Failed to receive COMM_UPDATE_NOTICE_ACK from %s.\n",
-	      members->nodes[i].cn_name);
-      fprintf(stderr, "Hint: Check the log on %s for reason.\n",
-	      members->nodes[i].cn_name);
-      close(fd);
-      free(buffer);
-      free_member_list(members);
-      return -errno;
-    }
-
-    close(fd);
-  }
-
-  swab_header(ch);
-  
-  ch->comm_flags = COMM_UPDATE_COMMIT;
-
-  swab_header(ch);
-
-  for (i=0; i < members->count; i++) {
-    if (members->nodes[i].cn_nodeid == 0)
-      continue;
-    if (members->nodes[i].cn_member == 0)
-      continue;
-
-    fd = ccs_open(members->nodes[i], cluster_base_port, 5);
-    if(fd < 0){
-      fprintf(stderr, "Unable to open connection to %s: %s\n",
-	      members->nodes[i].cn_name, strerror(errno));
-      free(buffer);
-      free_member_list(members);
-      return -errno;
-    }
-
-    error = write(fd, buffer, sizeof(comm_header_t));
-
-    if (error < 0) {
-      fprintf(stderr, "Unable to send msg to %s: %s\n",
-	      members->nodes[i].cn_name, strerror(errno));
-      close(fd);
-      free(buffer);
-      free_member_list(members);
-      return -errno;
-    }
-
-    tv.tv_sec = 5;
-    tv.tv_usec = 0;
-
-    error = read_retry(fd, &rch, sizeof(comm_header_t), &tv);
-
-    swab_header(&rch);
-
-    if (error < 0) {
-      fprintf(stderr, "Failed to receive COMM_UPDATE_COMMIT_ACK from %s.\n",
-	      members->nodes[i].cn_name);
-      fprintf(stderr, "Hint: Check the log on %s for reason.\n",
-	      members->nodes[i].cn_name);
-      close(fd);
-      free(buffer);
-      free_member_list(members);
-      return -errno;
-    }
-
-    close(fd);
-    error = 0;
-  }
-
-  free(buffer);
-  free_member_list(members);
-
-  /* If we can't connect here, it doesn't mean the update failed **
-  ** It means that we simply can't report the change in version  */
-  desc = ccs_connect();
-
-  if (desc < 0) {
-    fprintf(stderr, "Unable to connect to the CCS daemon: %s\n", strerror(-desc));
-    return 0;
-  }
-
-  if ((error = ccs_get(desc, "/cluster/@config_version", &v3_str))) {
-    ccs_disconnect(desc);
-    return 0;
-  }
-
-  v3 = atoi(v3_str);
-  free(v3_str);
-
-  ccs_disconnect(desc);
-
-  if (v2 == v3) {
-    cman_version_t cman_ver;
-    printf("Config file updated from version %d to %d\n", v1, v2);
-    cman_get_version(handle, &cman_ver);
-    cman_ver.cv_config = v2;
-    if (cman_set_version(handle, &cman_ver)) {
-	    perror("Failed to tell cman of new version number");
-    }
-  } else {
-    fprintf(stderr, "Warning:: Simultaneous update requests detected.\n"
-	    "  You have lost the race.\n"
-	    "  Old config version :: %d\n"
-	    "  Proposed config version :: %d\n"
-	    "  Winning config version  :: %d\n\n"
-	    "Check " DEFAULT_CONFIG_DIR "/" DEFAULT_CONFIG_FILE " to ensure it contains the desired contents.\n", v1, v2, v3);
-    return -EAGAIN;
-  }
-
-  return 0;
-}
-
-
-static member_list_t *get_member_list(cman_handle_t handle)
-{
-  int count = 0;
-
-  member_list_t *list = NULL;
-  cman_node_t *nodes = NULL;
-
-  do
-  {
-
-    if (nodes != NULL) {
-      free(nodes);
-    }
-
-    count = cman_get_node_count(handle);
-
-    if (count <= 0) {
-      return NULL;
-    }
-
-    if (list == NULL) {
-      list = malloc(sizeof(*list));
-    }
-
-    if (list == NULL) {
-      return NULL;
-    }
-
-    nodes = malloc(sizeof(*nodes) * count);
-
-    if (nodes == NULL) {
-      free(list);
-      return NULL;
-    }
-
-    memset(list, 0, sizeof(*list));
-    memset(nodes, 0, sizeof(*nodes) * count);
-
-    cman_get_nodes(handle, count, &list->count, nodes);
-
-  } while (list->count != count);
-
-  list->count = count;
-  list->nodes = nodes;
-
-  return list;
-}
-
-
-static void free_member_list(member_list_t *list)
-{
-  if (list != NULL) {
-    if (list->nodes != NULL) {
-      free(list->nodes);
-    }
-    free(list);
-  }
-}
-
-
-static int select_retry(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *xfds,
-			struct timeval *timeout)
-{
-  int rv;
-
-  while (1) {
-    rv = select(max_fd, rfds, wfds, xfds, timeout);
-    if ((rv == -1) && (errno == EINTR)) {
-      /* return on EBADF/EINVAL/ENOMEM; continue on EINTR */
-      continue;
-    }
-    return rv;
-  }
-}
-
-
-static ssize_t read_retry(int fd, void *buf, int count, struct timeval *timeout)
-{
-  int n, total = 0, remain = count, rv = 0;
-  fd_set rfds, xfds;
-
-  while (total < count) 
-  {
-    FD_ZERO(&rfds);
-    FD_SET(fd, &rfds);
-    FD_ZERO(&xfds);
-    FD_SET(fd, &xfds);
-
-    /*
-     * Select on the socket, in case it closes while we're not
-     * looking...
-     */
-    rv = select_retry(fd + 1, &rfds, NULL, &xfds, timeout);
-    if (rv == -1) {
-      return -1;
-    }
-    else if (rv == 0) {
-      errno = ETIMEDOUT;
-      return -1;
-    }
-
-    if (FD_ISSET(fd, &xfds)) {
-      errno = EPIPE;
-      return -1;
-    }
-
-    /* 
-     * Attempt to read off the socket 
-     */
-    n = read(fd, buf + (off_t) total, remain);
-
-    /*
-     * When we know our socket was select()ed and we receive 0 bytes
-     * when we read, the socket was closed.
-     */
-    if ((n == 0) && (rv == 1)) {
-      errno = EPIPE;
-      return -1;
-    }
-
-    if (n == -1) {
-      if ((errno == EAGAIN) || (errno == EINTR)) {
-	/* 
-	 * Not ready? Wait for data to become available
-	 */
-	continue;
-      }
-
-      /* Other errors: EPIPE, EINVAL, etc */
-      return -1;
-    }
-
-    total += n;
-    remain -= n;
-  }
-
-  return total;
-}
-
-
-static int ccs_open(cman_node_t node, uint16_t port, int timeout)
-{
-  struct in_addr *addr;
-  struct in6_addr *addr6;
-  int fd, family;
-  char buf[INET6_ADDRSTRLEN];
-
-  if (globalverbose) {
-    memset(buf, 0, sizeof(buf));
-    printf("Processing node: %s\n", node.cn_name);
-  }
-
-  family = ((struct sockaddr *)&(node.cn_address.cna_address))->sa_family;
-
-  if (family == AF_INET6) {
-
-    addr6 = &(((struct sockaddr_in6 *)&(node.cn_address.cna_address))->sin6_addr);
-
-    if (globalverbose) {
-      inet_ntop(family, addr6, buf, sizeof(buf));
-      printf(" family: ipv6\n address: %s\n", buf);
-    }
-
-    if ((fd = ipv6_connect(addr6, port, timeout)) < 0) {
-      return -1;
-    }
-
-  } else {
-
-    addr = &(((struct sockaddr_in *)&(node.cn_address.cna_address))->sin_addr);
-
-    if (globalverbose) {
-      inet_ntop(family, addr, buf, sizeof(buf));
-      printf(" family: ipv4\n address: %s\n", buf);
-    }
-
-    if ((fd = ipv4_connect(addr, port, timeout)) < 0) {
-      return -1;
-    }
-
-  }
-
-  return fd;
-}
-
-
-static int ipv4_connect(struct in_addr *addr, uint16_t port, int timeout)
-{
-  struct sockaddr_in sin;
-
-  int fd;
-
-  if ((fd = socket(PF_INET, SOCK_STREAM, 0)) < 0) {
-    return -1;
-  }
-
-  sin.sin_family = AF_INET;
-  sin.sin_port = htons(port);
-
-  memcpy(&sin.sin_addr, addr, sizeof(sin.sin_addr));
-
-  if (connect_nb(fd, (struct sockaddr *)&sin, sizeof(sin), timeout) < 0) {
-    close(fd);
-    return -1;
-  }
-
-  return fd;
-}
-
-
-static int ipv6_connect(struct in6_addr *addr, uint16_t port, int timeout)
-{
-  struct sockaddr_in6 sin6;
-
-  int fd;
-
-  if ((fd = socket(PF_INET6, SOCK_STREAM, 0)) < 0) {
-    return -1;
-  }
-
-  memset(&sin6, 0, sizeof(sin6));
-
-  sin6.sin6_family = AF_INET6;
-  sin6.sin6_port = htons(port);
-  sin6.sin6_flowinfo = 0;
-
-  memcpy(&sin6.sin6_addr, addr, sizeof(sin6.sin6_addr));
-
-  if (connect_nb(fd, (struct sockaddr *)&sin6, sizeof(sin6), timeout)) {
-    close(fd);
-    return -1;
-  }
-
-  return fd;
-}
-
-
-static int connect_nb(int fd, struct sockaddr *addr, socklen_t len, int timeout)
-{
-  int err;
-  int ret;
-  int flags = 1;
-  unsigned l;
-  fd_set rfds, wfds;
-
-  struct timeval tv;
-
-  if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&flags, sizeof(flags)) < 0) {
-    return -1;
-  }
-
-  flags = fcntl(fd, F_GETFL, 0);
-  fcntl(fd, F_SETFL, flags | O_NONBLOCK);
-
-  ret = connect(fd, addr, len);
-
-  if ((ret < 0) && (errno != EINPROGRESS)) {
-    return -1;
-  }
-
-  if (ret != 0) {
-    FD_ZERO(&rfds);
-    FD_SET(fd, &rfds);
-    FD_ZERO(&wfds);
-    FD_SET(fd, &wfds);
-
-    tv.tv_sec = timeout;
-    tv.tv_usec = 0;
-
-    if (select_retry((fd + 1), &rfds, &wfds, NULL, &tv) == 0) {
-      errno = ETIMEDOUT;
-      return -1;
-    }
-
-    if (FD_ISSET(fd, &rfds) || FD_ISSET(fd, &wfds)) {
-      l = sizeof(err);
-      if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&err, &l) < 0) {
-	close(fd);
-	return -1;
-      }
-
-      if (err != 0) {
-	close(fd);
-	errno = err;
-	return -1;
-      }
-
-      fcntl(fd, F_SETFL, flags);
-      return 0;
-    }
-  }
-
-  errno = EIO;
-  return -1;
-}
diff --git a/config/tools/ccs_tool/update.h b/config/tools/ccs_tool/update.h
deleted file mode 100644
index 2f41aa4..0000000
--- a/config/tools/ccs_tool/update.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __UPDATE_DOT_H__
-#define __UPDATE_DOT_H__
-
-int update(char *location);
-
-#endif /* __UPDATE_DOT_H__ */
diff --git a/config/tools/man/Makefile b/config/tools/man/Makefile
index c40d94b..f2d6d92 100644
--- a/config/tools/man/Makefile
+++ b/config/tools/man/Makefile
@@ -3,8 +3,4 @@ TARGET= ccs_tool.8 \
 
 include ../../../make/defines.mk
 
-ifdef legacy_code
-TARGET += ccs_test.8
-endif
-
 include $(OBJDIR)/make/man.mk
diff --git a/config/tools/man/ccs_test.8 b/config/tools/man/ccs_test.8
deleted file mode 100644
index 9dce13c..0000000
--- a/config/tools/man/ccs_test.8
+++ /dev/null
@@ -1,132 +0,0 @@
-.TH ccs_test 8
-
-.SH NAME
-ccs_test - CCS daemon (ccsd) diagnostic tool
-
-.SH SYNOPSIS
-.B ccs_test
-[\fBoptions\fP]
-<\fBcommand\fP>
-
-.SH DESCRIPTION
-\fBccs_test\fP is part of the Cluster Configuration System (CCS).  It is a
-diagnostic tool that reads cluster.conf information to test ccsd.
-
-.SH OPTIONS
-.TP
-\fB-h\fP
-Help.  Print out the usage syntax and exit.
-.TP
-\fB-V\fP
-Print the version information and exit.
-
-.SH COMMANDS
-.TP
-\fBconnect\fP \fI[force]\fP \fI[block]\fP \fI[cluster name]\fP
-This command creates a connection to ccsd.  It returns a descriptor, which
-is used as an parameter to other commands.
-
-The 'force' key-word is used to establish a connection to ccsd in the
-absence of a quorate cluster manager.
-
-The 'block' key-word is used (with the 'force' key-word) to tell ccsd to
-keep broadcasting for a valid configuration file until one is found.
-
-The 'cluster name' is used (with the 'force' key-word) to specify that
-only configuration files containing the given cluster name are valid
-possibilities.
-
-.TP
-\fBget\fP \fI<desc>\fP \fI<request>\fP
-Get the results of a given request.  The 'desc' is the number returned
-from the \fBconnect\fP command.  The 'request' is a valid Xpath request.
-
-If 'request' results in multiple matches, the first will be returned.
-Subsequent calls with the same 'request' will result in the subsequent
-matches.  Once all the matches have been returned, a subsequent call
-will begin again with the first result.
-
-.TP
-\fBget_list\fP \fI<desc>\fP \fI<request>\fP
-Similar to the \fBget\fP command.  However, issuing subsequent calls
-with the same 'request' will result in all matches being returned (one
-at a time), then null, then starting over with the first result.
-
-.TP
-\fBset\fP \fI<desc>\fP \fI<path>\fP \fI<value>\fP
-Sets a particular 'path' to the given 'value'.  Not yet implemented.
-
-.TP
-\fBget_state\fP \fI<desc>\fP
-Get the state associated with a given connection.
-
-.TP
-\fBset_state\fP \fI<desc>\fP \fI<ncwp>\fP
-Set the current working path (cwp) to 'ncwp' for a given connection.
-
-.SH EXAMPLES
-.SS To connect to ccsd:
-
-> ccs_test connect
-
-Connect successful.
- Connection descriptor = 0
-
-Or, if the cluster is not yet quorate and the name of the cluster is 'mycluster':
-
-> ccs_test connect force block mycluster
-
-Connect successful.
- Connection descriptor = 0
-
-.SS To get the cluster name from ccsd:
-
-> ccs_test get 0 /cluster/@name
-
-Get successful.
- Value = <mycluster>
-
-.SS To get the connection state:
-
-> ccs_test get_state 0
-
-Get state successful.
- Current working path:
- Previous query      : /cluster/@name
-
-
-.SS To set the connection state:
-
-> ccs_test set_state 0 /cluster
-
-Set state successful.
-
-
-.SS After setting the connection state, note the change:
-
-> ccs_test get_state 0
-
-Get state successful.
- Current working path: /cluster
- Previous query      : /cluster/@name
-
-.SS After setting the connection state, you can now query with an absolute or relative path:
-
-> ccs_test get 0 @name
-
-Get successful.
- Value = <brassow>
-
-> ccs_test get 0 /cluster/@name
-
-Get successful.
- Value = <brassow>
-
-.SS To disconnect:
-
-> ccs_test disconnect 0
-
-Disconnect successful.
-
-.SH SEE ALSO
-ccs(7), ccsd(8), cluster.conf(5)



More information about the Cluster-cvs mailing list