Commit 94de3f24 authored by Mike Hibler's avatar Mike Hibler
Browse files

Merge branch 'disk-agent'

parents edb24215 875d650f
......@@ -12,6 +12,9 @@ SYSTEM := $(shell uname -s)
include $(OBJDIR)/Makeconf
SUBDIRS = program-agent link-agent tevc proxy linktest
ifeq ($(SYSTEM),Linux)
SUBDIRS += disk-agent
endif
ifneq ($(SYSTEM),CYGWIN_NT-5.1)
SUBDIRS += trafgen
endif
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
SYSTEM := $(shell uname -s)
PROGRAMS = disk-agent
include $(OBJDIR)/Makeconf
all: $(PROGRAMS)
include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS += -DDEBUG
CFLAGS += -O -g -Wall
CFLAGS += -I. -I${OBJDIR}
CFLAGS += -I$(TESTBED_LIBSRCDIR)/event -I$(TESTBED_LIBSRCDIR)/libtb
CFLAGS += -I/usr/local/include
CFLAGS += -DHAVE_PUBSUB
CFLAGS += -DCLIENT_BINDIR='"$(CLIENT_BINDIR)"'
LDFLAGS += -g -L${TESTBED_LIBOBJDIR}/event -L${TESTBED_LIBOBJDIR}/libtb
LIBS += -levent -ltb -lcrypto -ldevmapper
LIBS += -L/usr/local/lib -lpubsub -ldevmapper
LDFLAGS += $(LDSTATIC)
# Deal with the presence/absence of kerberos in the linux ssl library
ifeq ($(SYSTEM),Linux)
ifneq ($(LDSTATIC),)
NOKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
else
NOKERB := 1
endif
ifeq ($(NOKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifneq ($(wildcard /usr/lib/libkrb5support.a),)
LIBS += -lkrb5support
endif
endif
LIBS += -ldl
endif
CXXFLAGS = $(CFLAGS)
disk-agent-debug: disk-agent.o
$(CXX) $(LDFLAGS) -o $@ disk-agent.o $(LIBS)
$(PROGRAMS): ${TESTBED_LIBOBJDIR}/event/libevent.a \
${TESTBED_LIBSRCDIR}/event/event.h
boss-install: $(INSTALL_DIR)/opsdir/sbin/disk-agent
control-install: $(INSTALL_SBINDIR)/disk-agent
post-install:
client: $(PROGRAMS)
client-install: client
$(INSTALL_PROGRAM) disk-agent$(EXE) $(DESTDIR)$(CLIENT_BINDIR)/disk-agent$(EXE)
chmod u+s-w $(DESTDIR)$(CLIENT_BINDIR)/disk-agent
clean:
/bin/rm -f *.o $(PROGRAMS)
$(INSTALL_DIR)/opsdir/sbin/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_DIR)/opsdir/sbin
$(INSTALL) $< $@
=== DISK AGENT ===
Currently, a couple of things needs to be taken care of before we can run
disk-agent. Those are,
1. Need to fix all the library paths in compile.sh to point to the correct location
2. For linking to devmapper library, we need to copy the libdevmapper.so.* to /lib/
3. Need to change the perl script run.pl to point to the right experiment name
#
# EMULAB-COPYRIGHT
# Copyright (c) 2010 University of Utah and the Flux Group.
# All rights reserved.
#
gcc -c /proj/utahstud/ydev/emulab-devel/clientside/lib/event/event.c -o event.o -I/proj/utahstud/ydev/emulab-devel/clientside/lib \
-I /proj/utahstud/ydev/emulab-devel/clientside/lib/libtb -I/proj/utahstud/ydev/ -L/proj/utahstud/ydev/pubsub
gcc -c /proj/utahstud/ydev/emulab-devel/clientside/lib/event/util.c -o util.o -I/proj/utahstud/ydev/emulab-devel/clientside/lib \
-I /proj/utahstud/ydev/emulab-devel/clientside/lib/libtb -I/proj/utahstud/ydev/ -L/proj/utahstud/ydev/pubsub
ar crv libevent.a event.o util.o
ranlib libevent.a
g++ -g -o disk-agent -Wall -I/proj/utahstud/ydev/emulab-devel/clientside/lib -I/proj/utahstud/ydev/emulab-devel/clientside/lib/libtb \
-I/proj/utahstud/ydev/emulab-devel/event/simple-agent -L/proj/utahstud/ydev/emulab-devel/event/simple-agent -L/proj/utahstud/ydev/pubsub disk-agent.cc libevent.a -ldevmapper -lpubsub -lssl
/* lib/misc/configure.h. Generated from configure.h.in by configure. */
/* lib/misc/configure.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if the `closedir' function returns void instead of `int'. */
/* #undef CLOSEDIR_VOID */
/* Define to 1 to include built-in support for clustered LVM locking. */
#define CLUSTER_LOCKING_INTERNAL 1
/* Path to clvmd binary. */
/* #undef CLVMD_PATH */
/* Path to clvmd pidfile. */
/* #undef CLVMD_PIDFILE */
/* Path to cmirrord pidfile. */
/* #undef CMIRRORD_PIDFILE */
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
/* #undef CRAY_STACKSEG_END */
/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */
/* Name of default metadata archive subdirectory. */
#define DEFAULT_ARCHIVE_SUBDIR "archive"
/* Name of default metadata backup subdirectory. */
#define DEFAULT_BACKUP_SUBDIR "backup"
/* Name of default metadata cache subdirectory. */
#define DEFAULT_CACHE_SUBDIR "cache"
/* Default data alignment. */
#define DEFAULT_DATA_ALIGNMENT 1
/* Define default node creation behavior with dmsetup create */
#define DEFAULT_DM_ADD_NODE DM_ADD_NODE_ON_RESUME
/* Name of default locking directory. */
#define DEFAULT_LOCK_DIR "/var/lock/lvm"
/* Name of default run directory. */
#define DEFAULT_RUN_DIR "/var/run/lvm"
/* Define to 0 to reinstate the pre-2.02.54 handling of unit suffixes. */
/* #undef DEFAULT_SI_UNIT_CONSISTENCY */
/* Path to LVM system directory. */
#define DEFAULT_SYS_DIR "/etc/lvm"
/* Define to 1 to enable LVM2 device-mapper interaction. */
#define DEVMAPPER_SUPPORT 1
/* Define to 1 to enable the device-mapper event daemon. */
/* #undef DMEVENTD */
/* Path to dmeventd binary. */
/* #undef DMEVENTD_PATH */
/* Path to dmeventd pidfile. */
/* #undef DMEVENTD_PIDFILE */
/* Library version */
#define DM_LIB_VERSION "1.02.67 (2011-08-19)"
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#define HAVE_ALLOCA_H 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
/* #undef HAVE_ARPA_INET_H */
/* Define to 1 if you have the <asm/byteorder.h> header file. */
#define HAVE_ASM_BYTEORDER_H 1
/* Define to 1 if you have the <assert.h> header file. */
#define HAVE_ASSERT_H 1
/* Define to 1 if canonicalize_file_name is available. */
#define HAVE_CANONICALIZE_FILE_NAME 1
/* Define to 1 if your system has a working `chown' function. */
#define HAVE_CHOWN 1
/* Define to 1 if you have the <corosync/confdb.h> header file. */
/* #undef HAVE_COROSYNC_CONFDB_H */
/* Define to 1 if you have the <ctype.h> header file. */
#define HAVE_CTYPE_H 1
/* Define to 1 if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */
/* Define to 1 if you have the `dup2' function. */
/* #undef HAVE_DUP2 */
/* Define to 1 if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1
/* Define to 1 if you have the `ftruncate' function. */
#define HAVE_FTRUNCATE 1
/* Define to 1 if you have the `gethostname' function. */
#define HAVE_GETHOSTNAME 1
/* Define to 1 if getline is available. */
#define HAVE_GETLINE 1
/* Define to 1 if you have the `getmntent' function. */
/* #undef HAVE_GETMNTENT */
/* Define to 1 if getopt_long is available. */
#define HAVE_GETOPTLONG 1
/* Define to 1 if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the <libcman.h> header file. */
/* #undef HAVE_LIBCMAN_H */
/* Define to 1 if dynamic libraries are available. */
#define HAVE_LIBDL 1
/* Define to 1 if you have the <libdlm.h> header file. */
/* #undef HAVE_LIBDLM_H */
/* Define to 1 if you have the <libgen.h> header file. */
#define HAVE_LIBGEN_H 1
/* Define to 1 if you have the <libintl.h> header file. */
/* #undef HAVE_LIBINTL_H */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/fs.h> header file. */
#define HAVE_LINUX_FS_H 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define to 1 if `lstat' has the bug that it succeeds when given the
zero-length file name argument. */
/* #undef HAVE_LSTAT_EMPTY_STRING_BUG */
/* Define to 1 if you have the <machine/endian.h> header file. */
/* #undef HAVE_MACHINE_ENDIAN_H */
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#define HAVE_MALLOC 1
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the `memmove' function. */
/* #undef HAVE_MEMMOVE */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mkdir' function. */
#define HAVE_MKDIR 1
/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <mntent.h> header file. */
/* #undef HAVE_MNTENT_H */
/* Define to 1 if you have the `munmap' function. */
#define HAVE_MUNMAP 1
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */
/* Define to 1 if you have the <netdb.h> header file. */
/* #undef HAVE_NETDB_H */
/* Define to 1 if you have the <netinet/in.h> header file. */
/* #undef HAVE_NETINET_IN_H */
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
/* Define to 1 if you have the <pthread.h> header file. */
/* #undef HAVE_PTHREAD_H */
/* Define to 1 if you have the <readline/history.h> header file. */
/* #undef HAVE_READLINE_HISTORY_H */
/* Define to 1 if you have the <readline/readline.h> header file. */
/* #undef HAVE_READLINE_READLINE_H */
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#define HAVE_REALLOC 1
/* Define to 1 to include support for realtime clock. */
/* #undef HAVE_REALTIME */
/* Define to 1 if you have the `rl_completion_matches' function. */
/* #undef HAVE_RL_COMPLETION_MATCHES */
/* Define to 1 if you have the `rmdir' function. */
#define HAVE_RMDIR 1
/* Define to 1 if you have the <search.h> header file. */
/* #undef HAVE_SEARCH_H */
/* Define to 1 if you have the `select' function. */
/* #undef HAVE_SELECT */
/* Define to 1 to include support for selinux. */
/* #undef HAVE_SELINUX */
/* Define to 1 if you have the <selinux/label.h> header file. */
/* #undef HAVE_SELINUX_LABEL_H */
/* Define to 1 if you have the <selinux/selinux.h> header file. */
/* #undef HAVE_SELINUX_SELINUX_H */
/* Define to 1 if sepol_check_context is available. */
/* #undef HAVE_SEPOL */
/* Define to 1 if you have the `setenv' function. */
#define HAVE_SETENV 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `siginterrupt' function. */
#define HAVE_SIGINTERRUPT 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
/* Define to 1 if `stat' has the bug that it succeeds when given the
zero-length file name argument. */
/* #undef HAVE_STAT_EMPTY_STRING_BUG */
/* Define to 1 if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strcspn' function. */
#define HAVE_STRCSPN 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1
/* Define to 1 if you have the `strrchr' function. */
#define HAVE_STRRCHR 1
/* Define to 1 if you have the `strspn' function. */
#define HAVE_STRSPN 1
/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if `st_rdev' is a member of `struct stat'. */
#define HAVE_STRUCT_STAT_ST_RDEV 1
/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H 1
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_DIR_H */
/* Define to 1 if you have the <sys/disk.h> header file. */
/* #undef HAVE_SYS_DISK_H */
/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/ipc.h> header file. */
/* #undef HAVE_SYS_IPC_H */
/* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_H 1
/* Define to 1 if you have the <sys/mount.h> header file. */
/* #undef HAVE_SYS_MOUNT_H */
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_NDIR_H */
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/select.h> header file. */
/* #undef HAVE_SYS_SELECT_H */
/* Define to 1 if you have the <sys/sem.h> header file. */
/* #undef HAVE_SYS_SEM_H */
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/statvfs.h> header file. */
#define HAVE_SYS_STATVFS_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/uio.h> header file. */
/* #undef HAVE_SYS_UIO_H */
/* Define to 1 if you have the <sys/un.h> header file. */
#define HAVE_SYS_UN_H 1
/* Define to 1 if you have the <sys/utsname.h> header file. */
#define HAVE_SYS_UTSNAME_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <utmpx.h> header file. */
/* #undef HAVE_UTMPX_H */
/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
/* #undef HAVE_VALGRIND_MEMCHECK_H */
/* Define to 1 if you have the `vfork' function. */
#define HAVE_VFORK 1
/* Define to 1 if you have the <vfork.h> header file. */
/* #undef HAVE_VFORK_H */
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to 1 if `fork' works. */
#define HAVE_WORKING_FORK 1
/* Define to 1 if `vfork' works. */
#define HAVE_WORKING_VFORK 1
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
/* Define to 1 if 'lvm' should fall back to using LVM1 binaries if
device-mapper is missing from the kernel */
/* #undef LVM1_FALLBACK */
/* Define to 1 to include built-in support for LVM1 metadata. */
#define LVM1_INTERNAL 1
/* Path to lvm binary. */
#define LVM_PATH "/sbin/lvm"
/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
*/
/* #undef MAJOR_IN_MKDEV */
/* Define to 1 if `major', `minor', and `makedev' are declared in
<sysmacros.h>. */
/* #undef MAJOR_IN_SYSMACROS */
/* Define to 1 to include built-in support for mirrors. */
#define MIRRORED_INTERNAL 1
/* The path to 'modprobe', if available. */
#define MODPROBE_CMD "/sbin/modprobe"
/* Define to 1 to enable O_DIRECT support. */
#define O_DIRECT_SUPPORT 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* Define to 1 to include built-in support for GFS pool metadata. */
#define POOL_INTERNAL 1
/* Define to 1 to include built-in support for raid. */
#define RAID_INTERNAL 1
/* Define to 1 to include the LVM readline shell. */
/* #undef READLINE_SUPPORT */
/* Define to 1 to include built-in support for replicators. */
/* #undef REPLICATOR_INTERNAL */
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* Define to the type of arg 1 for `select'. */
/* #undef SELECT_TYPE_ARG1 */
/* Define to the type of args 2, 3 and 4 for `select'. */
/* #undef SELECT_TYPE_ARG234 */
/* Define to the type of arg 5 for `select'. */
/* #undef SELECT_TYPE_ARG5 */
/* Define to 1 to include built-in support for snapshots. */
#define SNAPSHOT_INTERNAL 1
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */