Changes to 'refs/tags/sanlock-1.5'
by David Teigland
Changes since the dawn of time:
Daniel P. Berrange (15):
Fix const-ness of many APIs.
Fix warnings in watchdog module
Fix function prototypes for no-arg methods
Remove use of 'index' as a variable name
Make many functions static
Fix missing include in logging file
Annotate many unused parameters to avoid warnings
Remove redundant redeclaration of 'to' variable
Fix args to execv()
Remove redundant arg to 'run_command'
Rename optarg to optionarg to avoid clashing with getopt.h
Disable the read_request method since it is unused
Add many more compiler warning flags & safety checks
Hard code a sector size of 512 if the lease volume is a regular file
Ensure libsanlock.so is built with debug/warning flags
David Teigland (227):
sync_manager: initial commit
sync_manager: misc updates
sync_manager: misc updates
sync_manager: misc updates
sync_manager: misc updates
sync_manager: add more logging
sync_manager: misc updates
sync_manager: misc updates
sync_manager: num_hosts/MAX_HOSTS stuff
daemon: reworking notions of resource_id/token_name
sync_manager: resource lockfiles
sync_manager: lease arg processing
sync_manager: Began multiple lease support
sync_manager: use first command line arg as action
sync_manager: leader record changes and verify
sync_manager: clean up released leases
sync_manager: move functions around
sync_manager: add more tool actions
sync_manager: naming changes
sync_manager: separate token index and id
sync_manager: fix index usage and other misc
sync_manager: use pthread cond in acquire
sync_manager: write all log entries
sync_manager: simplify polling
sync_manager: fix waitpid use
sync_manager: acquire can fail early
sync_manager: write log entries at exit
sync_manager: add test program
sync_manager: move secondary pid check
sync_manager: fix disk paxos contention
devcount: fix verify checks
sync_manager: add GPL license file
sync_manager: fix leader block offsets
sync_manager: increase COMMAND_MAX
sync_manager: renewal should verify
sync_manager: use sector size from libblkid
sync_manager: use a real checksum function
sync_manager: add libblkid to spec file
sync_manager: print status info
sync_manager: one watchdog file per lease
sync_manager: lease_threads handle watchdog files
sync_manager: fix/add some text/comments
sync_manager: refactor read/write
sync_manager: move disk io functions
sync_manager: remove token arg
sync_manager: rename paxos_disk sync_disk
sync_manager: add aio read/write
sync_manager: make io_timeout_seconds a diskio arg
sync_manager: forgot to add new files
sync_manager: use log thread
sync_manager: client connections
sync_manager: connection processing
sync_manager: send/recv pid
sync_manager: add write_sectors
sync_manager: restructuring
sync_manager: write_sectors code factoring
sync_manager: daemonize
sync_manager: releasing leases
sync_manager: async releasing
sync_manager: release fixes
sync_manager: add direct and indirect acquire/release
sync_manager: reacquire resources
sync_manager: move code
sync_manager: same pid may reacquire resource
sync_manager: lease migration
sync_manager: handle client errors
sync_manager: improve error handling
sync_manager: host_id leases
sync_manager: remove empty files
sync_manager: print initialization info
sync_manager: rename files
sync_manager: clean up header org
sync_manager: delta_lease implementation
sync_manager: accept offset units
sync_manager: fix up init output
sync_manager: put back watchdog calls
sync_manager: fix start_host_id error paths
sync_manager: add log_error's for watchdog file errors
sync_manager: actual timeouts
sync_manager: change timeouts on cmd line
sanlock: create new external api
sanlock: build libsanlock
sanlock: use MAX_LEASES everywhere
sanlock: add libvirt plugin
sanlock plugin: couple minor fixes
sanlock: clean up /var file names
sanlock plugin: fix symbol needed by libvirt
sanlock: add some debug output
sanlock plugin: fix uuid copy
sanlock plugin: fix names
sanlock: add "owner_name"
sanlock: fix renewal checks
sanlock: clean up host_id types
sanlock: set_host_id command
sanlock: fix killing pids
sanlock: add status command
sanlock: set version to 1.0
sanlock: delta_lease cleanup
sanlock: changing num_hosts
sanlock: add dump command
sanlock: renewal timings
sanlock: add direct option
sanlock: check for watchdog file
sanlock: recovery fixes
lock_driver_sanlock: fix compile problems
sanlock: improve command options
sanlock: tidying help text
sanlock: move binary to /usr/sbin
sanlock: add init script
sanlock: fix sigterm shutdown
sanlock: init stop
sanlock: add wdtest command
sanlock.spec: new url
lock_driver_sanlock: remove close
sanlock: introduce lockspaces
lock_driver_sanlock: remove files
sanlock: better logging functions
sanlock: misc log message
sanlock.spec: sbin not libexec
sanlock init: remove watchdog reference
wdmd: watchdog multiplexing daemon
sanlock: add code to use wdmd
sanlock/wdmd: use wdmd in sanlock
sanlock/wdmd: add copyright header to source files
sanlock: rename sanlock source dir
sanlock: move tests dir
move COPYING file
wdmd: use signalfd for signal handling
Fix Makefile comments
wdmd: fix daemon debug option
wdmd: add init script
sanlock.spec: updates
sanlock.spec: src dir
sanlock: build with uninstalled libwdmd
sanlock: version 1.1
sanlock: high priority options
wdmd: high priority options
sanlock: return migration state
sanlock: migration.txt describes libvirt/sanlock steps
libsanlock: include admin functions
sanlock: fix host_id expiration check
sanlock: migration working
devcount: migrate test
sanlock: setowner improvements
sanlock: migrate to target fix
sanlock: fix wdmd stop order
sanlock: various fixes
sanlock: remove wdtest
sanlock: remove migration
sanlock: clean up command return data
sanlock: add resource string conversion functions
sanlock: rework internal structs
devcount: add relock test
sanlock: fix release and inquire
sanlock: add_lockspace EEXIST
sanlock: rework client handling
sanlock: clean up warnings
sanlock: debug message changes
sanlock: add lockspace checks
wdmd: enable test scripts
sanlock: add str_to_lockspace to lib
WIP devcount migrate
devcount: new migrate test
sanlock: read_id and live_id commands
sanlock: check lockspace name and host_id
sanlock: remove remaining cluster_mode
sanlock: add libsanlock_direct
devcountn: start multiple devcount tests
devcount: small changes
sanlock: new return values
sanlock: misc changes and fix
sanlock: log error of full bad block
sanlock: interval between renewal checks
sanlock: renewal changes
sanlock: fix log_dump
sanlock: fix find_client_pid
sanlock: fix host_id reads from paxos_acquire
sanlock: init with one write
devcount: improve output
devcount: new pause/resume
devcount: add expire test
sanlock: correct paxos usage
sanlock: direct read_leader
sanlock: paxos delays
sanlock: use thread pool
sanlock: client status output format changes
sanlock: fix inquire of dead pid
sanlock: use native linux aio
sanlock: i/o changes
sanlock: aio changes
sanlock: reduce paxos acquire read ops
sanlock: quiet error case
sanlock: don't free aio buf until event completes
sanlock: io timeout related changes
sanlock: read dblocks in single aligned io
sanlock: add sanlock_restrict api
sanlock: add sanlock_direct_sector_size api
sanlock: add checksum to dblocks
sanlock: fix init restart
sanlock: don't release tokens in dead lockspace
sanlock: fix adding lockspace
sanlock: official 1MB/8MB alignment
devcount: use aio in init
libsanlock: link with LDFLAGS
sanlock: increase version to 1.3
sanlock/wdmd: shut up warnings
sanlock: fix libwdmd linking
remove spec file
sanlock: use a completed read after renewal timeout
sanlock: use unique host name in delta leases
sanlock: remove sector_size api
sanlock: abort delta wait on shutdown
sanlock: fix add_lockspace failure
sanlk_load: add new test
sanlock: fix recv and inquire
sanlock: initial pid_dead check in acquire
sanlock: release 1.4
sanlock: generate a uuid for host id
sanlock: return -EINPROGRESS from add_lockspace
sanlk_load: periodically kill and replace a pid
sanlock: zero num_hosts uses DEFAULT_MAX_HOSTS
tests: misc changes
sanlock: break paxos_acquire wait loop
sanlock: increase log line to 512 bytes
sanlock: change a log_error to log_debug
sanlock: fail host_id when corrupted
sanlock: release 1.5
Fabio M. Di Nitto (5):
build: sanlock should link with libsanlock
build: install shared lib header files and fix DESTDIR usage
build: drop rpm target
spec file: do first cut for total spec file
build: fix linking with libsanlock and install target
Federico Simoncelli (22):
rpm: sync specfile with fedora
rpm: add sanlock_admin.h header
rpm: add the lib package, install the initscripts
python: remove unused python code
python: add python binding
python: release the gil during sanlock operations
python: wrap sanlock extension with a module
rpm: add python binding package
python: pass a lockspace copy to str_to_lockspace
makefile: fix install typo
rpm: add sanlock_direct header
python: add sanlock init functions and exception
direct: close disks after initialization
python: register process only once
daemon: configurable socket permissions
rpm: add sanlock user and group
python: exceptions must contain the errno
rpm: add missing libaio-devel dependency
rpm: add daemon options in the init file
python: add missing aio library
python: add get_alignment function
libs: include libsanlock_direct into libsanlock
Saggi Mizrahi (21):
Added the begining of the testing and debugging tools
Better handling of max hosts
sync_manager: Updated tests to work with new lease struct
sync_manager: fixed skipping first arg in command
sync_manager: acquire and release actions
sync_manager: minor fixes
sync_manager: renamed stuff
sync_manager: made acquire synchronous again
sync_manager: added set_host_id action
sync_manager: use kill(0) for secondary pid check
sync_manager: make rpm and install
sync_manager: spec file update
sync_manager: Allow longer resource names
sync_manager: allow repeated set_host_id
sync_manager: Added escaping for the leases arg
sync_manager: Created the python bindings for sync_manager
sync_manager: listener socket permissions
sync_manager: Updated python binding and tests
sync_manager: Made 'token' a const in log_level
sync_manager: refactor messaging system
sync_manager: use getsockopt PEERCRED
12 years, 3 months
src/main.c
by David Teigland
src/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 7c04c0a5b21324c4e761c68eca8d8160038abc59
Author: David Teigland <teigland(a)redhat.com>
Date: Thu Jun 30 12:46:28 2011 -0500
sanlock: release 1.5
diff --git a/src/main.c b/src/main.c
index 70e2630..e8554f7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2330,7 +2330,7 @@ static void parse_arg_timeout(char *optstr)
}
#endif
-#define RELEASE_VERSION "1.4"
+#define RELEASE_VERSION "1.5"
/*
* daemon: acquires leases for the local host_id, associates them with a local
12 years, 3 months
3 commits - src/host_id.c src/log.c src/main.c src/sanlock_internal.h src/sanlock_rv.h
by David Teigland
src/host_id.c | 36 ++++++++++++++++++++++++++++++++++++
src/log.c | 2 +-
src/main.c | 2 +-
src/sanlock_internal.h | 1 +
src/sanlock_rv.h | 3 ++-
5 files changed, 41 insertions(+), 3 deletions(-)
New commits:
commit d852c084b7d46915dab20ab641945a6aa2c166b7
Author: David Teigland <teigland(a)redhat.com>
Date: Thu Jun 30 12:37:58 2011 -0500
sanlock: fail host_id when corrupted
If we read our host_id for renewal and find it's corrupted,
there's no point in retrying for a while, we should treat it
as failed right away.
diff --git a/src/host_id.c b/src/host_id.c
index b2c64c2..142f61b 100644
--- a/src/host_id.c
+++ b/src/host_id.c
@@ -53,6 +53,7 @@ int print_space_state(struct space *sp, char *str)
"host_generation=%llu "
"space_dead=%d "
"killing_pids=%d "
+ "corrupt_result=%d "
"acquire_last_result=%d "
"renewal_last_result=%d "
"acquire_last_attempt=%llu "
@@ -63,6 +64,7 @@ int print_space_state(struct space *sp, char *str)
(unsigned long long)sp->host_generation,
sp->space_dead,
sp->killing_pids,
+ sp->lease_status.corrupt_result,
sp->lease_status.acquire_last_result,
sp->lease_status.renewal_last_result,
(unsigned long long)sp->lease_status.acquire_last_attempt,
@@ -171,12 +173,19 @@ int host_id_disk_info(char *name, struct sync_disk *disk)
int host_id_check(struct task *task, struct space *sp)
{
uint64_t last_success;
+ int corrupt_result;
int gap;
pthread_mutex_lock(&sp->mutex);
last_success = sp->lease_status.renewal_last_success;
+ corrupt_result = sp->lease_status.corrupt_result;
pthread_mutex_unlock(&sp->mutex);
+ if (corrupt_result) {
+ log_erros(sp, "host_id_check corrupt %d", corrupt_result);
+ return 0;
+ }
+
gap = time(NULL) - last_success;
if (gap >= task->id_renewal_fail_seconds) {
@@ -197,6 +206,27 @@ int host_id_check(struct task *task, struct space *sp)
return 1;
}
+/* If a renewal result is one of the listed errors, it means our
+ delta lease has been corrupted/overwritten/reinitialized out from
+ under us, and we should stop using it immediately. There's no
+ point in retrying the renewal. */
+
+static int corrupt_result(int result)
+{
+ switch (result) {
+ case SANLK_RENEW_OWNER:
+ case SANLK_RENEW_DIFF:
+ case SANLK_LEADER_MAGIC:
+ case SANLK_LEADER_VERSION:
+ case SANLK_LEADER_SECTORSIZE:
+ case SANLK_LEADER_LOCKSPACE:
+ case SANLK_LEADER_CHECKSUM:
+ return result;
+ default:
+ return 0;
+ }
+}
+
static void *lockspace_thread(void *arg_in)
{
struct task task;
@@ -316,6 +346,12 @@ static void *lockspace_thread(void *arg_in)
log_erros(sp, "renewal error %d delta_length %d last_success %llu",
result, delta_length,
(unsigned long long)sp->lease_status.renewal_last_success);
+
+ if (!sp->lease_status.corrupt_result) {
+ sp->lease_status.corrupt_result = corrupt_result(result);
+ log_erros(sp, "renewal error %d is corruption",
+ sp->lease_status.corrupt_result);
+ }
}
stop = sp->thread_stop;
pthread_mutex_unlock(&sp->mutex);
diff --git a/src/sanlock_internal.h b/src/sanlock_internal.h
index c38ebf8..cb7cf60 100644
--- a/src/sanlock_internal.h
+++ b/src/sanlock_internal.h
@@ -94,6 +94,7 @@ struct token {
};
struct lease_status {
+ int corrupt_result;
int acquire_last_result;
int renewal_last_result;
uint64_t acquire_last_attempt;
diff --git a/src/sanlock_rv.h b/src/sanlock_rv.h
index 9683477..8133efd 100644
--- a/src/sanlock_rv.h
+++ b/src/sanlock_rv.h
@@ -22,7 +22,8 @@
#define SANLK_DBLOCK_MBAL -213
#define SANLK_DBLOCK_CHECKSUM -214
-/* verify_leader, leader_read, leader_write (paxos or delta) */
+/* verify_leader, leader_read, leader_write (paxos or delta)
+ (when adding to list, check if it should be a corrupt_result()) */
#define SANLK_LEADER_READ -220
#define SANLK_LEADER_WRITE -221
commit c8130f398bdb1aa6bab088e1c9a4e5d745e0e9b7
Author: David Teigland <teigland(a)redhat.com>
Date: Tue Jun 28 17:33:31 2011 -0500
sanlock: change a log_error to log_debug
for a non error case we shouldn't need to worry about
diff --git a/src/main.c b/src/main.c
index 5918c6c..70e2630 100644
--- a/src/main.c
+++ b/src/main.c
@@ -652,7 +652,7 @@ static void client_recv_all(int ci, struct sm_header *h_recv, int pos)
break;
}
- log_error("recv_all %d,%d,%d pos %d rv %d error %d rem %d total %d",
+ log_debug("recv_all %d,%d,%d pos %d rv %d error %d rem %d total %d",
ci, client[ci].fd, client[ci].pid, pos, rv, error, rem, total);
}
commit 06674b31739d84bf6bc8a484552f4e1de85cab90
Author: David Teigland <teigland(a)redhat.com>
Date: Tue Jun 28 17:31:39 2011 -0500
sanlock: increase log line to 512 bytes
diff --git a/src/log.c b/src/log.c
index 884507e..e753ee6 100644
--- a/src/log.c
+++ b/src/log.c
@@ -25,7 +25,7 @@
#include "sanlock_internal.h"
#include "log.h"
-#define LOG_STR_LEN 256
+#define LOG_STR_LEN 512
static char log_str[LOG_STR_LEN];
static pthread_t thread_handle;
12 years, 3 months
src/paxos_lease.c
by David Teigland
src/paxos_lease.c | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 413f1f136cdd6b9ec68e819c8259b887469e92dc
Author: David Teigland <teigland(a)redhat.com>
Date: Tue Jun 28 17:21:20 2011 -0500
sanlock: break paxos_acquire wait loop
if the daemon is shut down
diff --git a/src/paxos_lease.c b/src/paxos_lease.c
index 8560e8b..1069639 100644
--- a/src/paxos_lease.c
+++ b/src/paxos_lease.c
@@ -1199,6 +1199,11 @@ int paxos_lease_acquire(struct task *task,
/* TODO: test with sleep(2) here */
sleep(1);
+ if (external_shutdown) {
+ error = -1;
+ goto out;
+ }
+
error = paxos_lease_leader_read(task, token, &tmp_leader, "paxos_acquire");
if (error < 0)
goto out;
12 years, 3 months
tests/devcount.c tests/devcountn
by David Teigland
tests/devcount.c | 60 ++++++++++++++++++++++++++++++++++++++++---------------
tests/devcountn | 3 +-
2 files changed, 46 insertions(+), 17 deletions(-)
New commits:
commit 5d4a45220217446e1a45ab74b0a4a987bfa254b1
Author: David Teigland <teigland(a)redhat.com>
Date: Fri Jun 24 15:13:41 2011 -0500
tests: misc changes
diff --git a/tests/devcount.c b/tests/devcount.c
index 67ce943..9db5a43 100644
--- a/tests/devcount.c
+++ b/tests/devcount.c
@@ -96,8 +96,13 @@ static void pause_pid(int pid, int child_stderr)
rv = read(child_stderr, buf, sizeof(buf));
- if (!strstr(buf, "we_are_paused"))
- log_error("pause_pid %d buf %s", pid, buf);
+ if (strstr(buf, "we_are_paused"))
+ return;
+
+ while (1) {
+ log_error("pause_pid %d read %s", pid, buf);
+ sleep(2);
+ }
}
static void resume_pid(int pid)
@@ -205,7 +210,7 @@ static int do_count(int argc, char *argv[])
{
char *rbuf, **p_rbuf, *wbuf, **p_wbuf, *vbuf, **p_vbuf;
struct entry *re, *max_re, *our_we;
- int i, fd, rv, max_i;
+ int i, fd, rv, error, max_i;
int pause_fd;
time_t start;
uint32_t our_pid = getpid();
@@ -240,12 +245,14 @@ static int do_count(int argc, char *argv[])
fd = open(count_path, O_RDWR | O_DIRECT | O_SYNC, 0);
if (fd < 0) {
perror("open failed");
+ error = 1;
goto fail;
}
rv = ioctl(fd, BLKFLSBUF);
if (rv) {
perror("BLKFLSBUF failed");
+ error = 2;
goto fail;
}
@@ -256,18 +263,21 @@ static int do_count(int argc, char *argv[])
rv = posix_memalign((void *)p_rbuf, getpagesize(), 512);
if (rv) {
perror("posix_memalign failed");
+ error = 3;
goto fail;
}
rv = posix_memalign((void *)p_wbuf, getpagesize(), 512);
if (rv) {
perror("posix_memalign failed");
+ error = 4;
goto fail;
}
rv = posix_memalign((void *)p_vbuf, getpagesize(), 512);
if (rv) {
perror("posix_memalign failed");
+ error = 5;
goto fail;
}
@@ -276,6 +286,7 @@ static int do_count(int argc, char *argv[])
rv = read(fd, rbuf, 512);
if (rv != 512) {
perror("read failed");
+ error = 6;
goto fail;
}
@@ -294,6 +305,7 @@ static int do_count(int argc, char *argv[])
rv = read(fd, vbuf, 512);
if (rv != 512) {
perror("read failed");
+ error = 7;
goto fail;
}
@@ -302,6 +314,7 @@ static int do_count(int argc, char *argv[])
print_entries(count_path, our_pid, rbuf);
log_error("%s c %d vbuf:", count_path, our_pid);
print_entries(count_path, our_pid, vbuf);
+ error = 8;
goto fail;
}
}
@@ -329,6 +342,7 @@ static int do_count(int argc, char *argv[])
if (max_turn != max_re->turn) {
log_error("%s c %d max_turn %d max_re->turn %d\n",
count_path, our_pid, max_turn, max_re->turn);
+ error = 9;
goto fail;
}
@@ -359,6 +373,7 @@ static int do_count(int argc, char *argv[])
rv = write(fd, wbuf, 512);
if (rv != 512) {
perror("write failed");
+ error = 10;
goto fail;
}
writes = 1;
@@ -376,6 +391,7 @@ static int do_count(int argc, char *argv[])
rv = write(fd, wbuf, 512);
if (rv != 512) {
perror("write failed");
+ error = 11;
goto fail;
}
writes++;
@@ -419,6 +435,7 @@ static int do_count(int argc, char *argv[])
rv = read(fd, vbuf, 512);
if (rv != 512) {
perror("read failed");
+ error = 12;
goto fail;
}
@@ -427,6 +444,7 @@ static int do_count(int argc, char *argv[])
print_entries(count_path, our_pid, rbuf);
log_error("%s c %d vbuf:", count_path, our_pid);
print_entries(count_path, our_pid, vbuf);
+ error = 13;
goto fail;
}
}
@@ -434,9 +452,13 @@ static int do_count(int argc, char *argv[])
return 0;
fail:
- printf("sleeping...\n");
- sleep(10000000);
- return -1;
+ fprintf(stderr, "error %d\n", error);
+ while (1) {
+ log_error("%s c %d error %d", count_path, our_pid, error);
+ print_entries(count_path, our_pid, rbuf);
+ print_entries(count_path, our_pid, vbuf);
+ sleep(2);
+ }
}
static int add_lockspace(void)
@@ -596,8 +618,15 @@ static int do_relock(int argc, char *argv[])
goto dead_child;
rv = sanlock_inquire(-1, pid, 0, &res_count, &state);
+ if (rv == -EBUSY) {
+ /* pid probably still busy doing acquire */
+ goto run_more;
+ }
+ if (rv == -ESTALE || rv == -ESRCH) {
+ /* pid has exited */
+ goto run_more;
+ }
if (rv < 0) {
- /* pid may have exited */
log_error("%s p %d sanlock_inquire c %d error %d",
count_path, parent_pid, pid, rv);
goto run_more;
@@ -1349,7 +1378,7 @@ int do_expire(int argc, char *argv[])
* dd if=/dev/zero of=<count_disk> bs=512 count=24
*/
-#define INIT_NUM_HOSTS 8
+#define INIT_NUM_HOSTS 0
int do_init(int argc, char *argv[])
{
@@ -1371,8 +1400,8 @@ int do_init(int argc, char *argv[])
memset(command, 0, sizeof(command));
snprintf(command, sizeof(command),
- "sanlock direct init -n %d -s devcount:0:%s:0",
- INIT_NUM_HOSTS, argv[2]);
+ "sanlock direct init -s devcount:0:%s:0",
+ argv[2]);
printf("%s\n", command);
@@ -1384,8 +1413,7 @@ int do_init(int argc, char *argv[])
snprintf(command, sizeof(command),
- "sanlock direct init -n %d -r devcount:resource%s:%s:%d",
- INIT_NUM_HOSTS,
+ "sanlock direct init -r devcount:resource%s:%s:%d",
argv[3],
argv[2],
LEASE_SIZE);
@@ -1481,16 +1509,16 @@ int main(int argc, char *argv[])
out:
/*
- * sanlock direct init -n 8 -s devcount:0:/dev/bull/leases:0
- * sanlock direct init -n 8 -r devcount:resource/dev/bull/count:/dev/bull/leases:LEASE_SIZE
+ * sanlock direct init -s devcount:0:/dev/bull/leases:0
+ * sanlock direct init -r devcount:resource/dev/bull/count:/dev/bull/leases:LEASE_SIZE
*
* host_id leases exists at <lock_disk> offset 0
* first resource lease exists at <lock_disk> offset LEASE_SIZE
*/
printf("devcount init <lock_disk> <count_disk>\n");
- printf(" sanlock direct init -n 8 -s devcount:0:<lock_disk>:0\n");
- printf(" sanlock direct init -n 8 -r devcount:resource<count_disk>:<lock_disk>:LEASE_SIZE\n");
+ printf(" sanlock direct init -s devcount:0:<lock_disk>:0\n");
+ printf(" sanlock direct init -r devcount:resource<count_disk>:<lock_disk>:LEASE_SIZE\n");
printf(" dd if=/dev/zero of=<count_disk> bs=512 count=24\n");
printf("\n");
printf("devcount rw <count_disk> <sec1> <sec2> <hostid>\n");
diff --git a/tests/devcountn b/tests/devcountn
index 8ef1b7a..5a51e13 100755
--- a/tests/devcountn
+++ b/tests/devcountn
@@ -57,7 +57,8 @@ if [ "$cmd1" != "init" ]; then
sanlock add_lockspace -s devcount:$hostid:$deva$i:0
fi
-for i in `seq 1 $num`; do
+end=`expr $num - 1`
+for i in `seq 0 $end`; do
if [ "$cmd1" == "init" ]; then
deva=$3
devb=$4
12 years, 3 months
src/delta_lease.c src/direct.c src/direct_lib.c src/main.c src/paxos_lease.c src/sanlock_direct.h
by David Teigland
src/delta_lease.c | 3 +++
src/direct.c | 8 +-------
src/direct_lib.c | 3 ---
src/main.c | 22 ++++++++++++----------
src/paxos_lease.c | 5 +++++
src/sanlock_direct.h | 4 ++--
6 files changed, 23 insertions(+), 22 deletions(-)
New commits:
commit 6dccd60507a50756b49517e764012758ea2bdc23
Author: David Teigland <teigland(a)redhat.com>
Date: Fri Jun 24 14:09:46 2011 -0500
sanlock: zero num_hosts uses DEFAULT_MAX_HOSTS
the same as zero max_hosts does
diff --git a/src/delta_lease.c b/src/delta_lease.c
index a2683ad..a7f46d1 100644
--- a/src/delta_lease.c
+++ b/src/delta_lease.c
@@ -503,6 +503,9 @@ int delta_lease_init(struct task *task,
int align_size;
int i, rv;
+ if (!max_hosts)
+ max_hosts = DEFAULT_MAX_HOSTS;
+
align_size = direct_align(disk);
if (disk->sector_size * max_hosts > align_size)
diff --git a/src/direct.c b/src/direct.c
index 5c57574..03c6a16 100644
--- a/src/direct.c
+++ b/src/direct.c
@@ -373,7 +373,7 @@ int direct_align(struct sync_disk *disk)
}
/*
- * sanlock direct init -n <num_hosts> [-s LOCKSPACE] [-r RESOURCE]
+ * sanlock direct init [-s LOCKSPACE] [-r RESOURCE]
*
* Note: host_id not used for init, whatever is given in LOCKSPACE
* is ignored
@@ -390,12 +390,6 @@ int direct_init(struct task *task,
rv = do_delta_action(ACT_INIT, task, ls, max_hosts, NULL, NULL);
} else if (res) {
- if (!num_hosts)
- return -EINVAL;
-
- if (num_hosts > max_hosts)
- return SANLK_LEADER_NUMHOSTS;
-
if (!res->num_disks)
return -ENODEV;
diff --git a/src/direct_lib.c b/src/direct_lib.c
index f0a3dcb..71b19e9 100644
--- a/src/direct_lib.c
+++ b/src/direct_lib.c
@@ -102,9 +102,6 @@ int sanlock_direct_init(struct sanlk_lockspace *ls,
setup_task_lib(&task, use_aio, DEFAULT_IO_TIMEOUT);
- if (!max_hosts)
- max_hosts = DEFAULT_MAX_HOSTS;
-
rv = direct_init(&task, ls, res, max_hosts, num_hosts);
close_task_aio(&task);
diff --git a/src/main.c b/src/main.c
index d110f4e..5918c6c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1860,6 +1860,10 @@ static void process_cmd_thread_resource(int ci_in, struct sm_header *h_recv)
}
if (cl->cmd_active) {
+ if (com.quiet_fail && cl->cmd_active == SM_CMD_ACQUIRE) {
+ result = -EBUSY;
+ goto out;
+ }
log_error("cmd %d %d,%d,%d cmd_active %d",
h_recv->cmd, ci_target, cl->fd, cl->pid,
cl->cmd_active);
@@ -2411,17 +2415,16 @@ static void print_usage(void)
printf(" -p <pid> process whose resource leases should be displayed\n");
printf("\n");
- printf("direct init -n <num_hosts> [-s LOCKSPACE] [-r RESOURCE]\n");
+ printf("direct init [-s LOCKSPACE] [-r RESOURCE]\n");
printf(" -a <num> use async io (1 yes, 0 no)\n");
printf(" -n <num_hosts> host_id's from 1 to num_hosts will be able to acquire\n");
- printf(" a resource lease. This is also number of sectors that\n");
- printf(" are read when paxos is run to acquire a resource lease.\n");
- printf(" -m <max_hosts> disk space is allocated to support this many hosts\n");
- printf(" (default max_hosts %d)\n", DEFAULT_MAX_HOSTS);
- printf(" -s LOCKSPACE initialize host_id leases for host_id's 1 to max_hosts\n");
- printf(" (the specific host_id in the LOCKSPACE arg is ignored)\n");
- printf(" -r RESOURCE initialize a resource lease for use by host_id's 1 to\n");
- printf(" num_hosts (num_hosts can be extended up to max_hosts)\n");
+ printf(" a resource lease.\n");
+ printf(" (default %d)\n", DEFAULT_MAX_HOSTS);
+ printf(" -m <max_hosts> disk space is initialized for this many hosts\n");
+ printf(" (default %d)\n", DEFAULT_MAX_HOSTS);
+ printf(" -s LOCKSPACE initialize host_id leases for a lockspace\n");
+ printf(" (host_id in the LOCKSPACE arg is ignored for init)\n");
+ printf(" -r RESOURCE initialize a resource lease\n");
printf("\n");
printf("direct dump <path>[:<offset>] [options]\n");
printf(" -D debug: print extra info for debugging\n");
@@ -2966,7 +2969,6 @@ int main(int argc, char *argv[])
BUILD_BUG_ON(sizeof(struct sanlk_disk) != sizeof(struct sync_disk));
memset(&com, 0, sizeof(com));
- com.max_hosts = DEFAULT_MAX_HOSTS;
com.use_watchdog = DEFAULT_USE_WATCHDOG;
com.high_priority = DEFAULT_HIGH_PRIORITY;
com.max_worker_threads = DEFAULT_MAX_WORKER_THREADS;
diff --git a/src/paxos_lease.c b/src/paxos_lease.c
index 82010db..8560e8b 100644
--- a/src/paxos_lease.c
+++ b/src/paxos_lease.c
@@ -1468,6 +1468,11 @@ int paxos_lease_init(struct task *task,
int aio_timeout = 0;
int rv, d;
+ if (!num_hosts)
+ num_hosts = DEFAULT_MAX_HOSTS;
+ if (!max_hosts)
+ max_hosts = DEFAULT_MAX_HOSTS;
+
align_size = direct_align(&token->disks[0]);
if (token->disks[0].sector_size * (2 + max_hosts) > align_size)
diff --git a/src/sanlock_direct.h b/src/sanlock_direct.h
index 83f1522..b698c79 100644
--- a/src/sanlock_direct.h
+++ b/src/sanlock_direct.h
@@ -29,8 +29,8 @@ int sanlock_direct_live_id(struct sanlk_lockspace *ls,
int io_timeout_sec);
/*
- * Use max_hosts = 0 for default max_hosts value
- *
+ * Use max_hosts = 0 for default value.
+ * Use num_hosts = 0 for default value.
* Provide either lockspace or resource, not both
*/
12 years, 3 months
tests/sanlk_load.c
by David Teigland
tests/sanlk_load.c | 198 ++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 168 insertions(+), 30 deletions(-)
New commits:
commit 91511d0cd1a9a8f5371ed358b7a2bacbeee7fa7c
Author: David Teigland <teigland(a)redhat.com>
Date: Fri Jun 24 10:17:27 2011 -0500
sanlk_load: periodically kill and replace a pid
diff --git a/tests/sanlk_load.c b/tests/sanlk_load.c
index d874fa2..8d194b1 100644
--- a/tests/sanlk_load.c
+++ b/tests/sanlk_load.c
@@ -33,6 +33,7 @@
#define DEFAULT_PID_COUNT 4
#define MAX_RV 300
+int prog_stop;
int debug = 0;
char error_buf[4096];
char lock_disk_base[PATH_MAX];
@@ -59,6 +60,12 @@ do { \
} while (0)
+static void sigterm_handler(int sig)
+{
+ if (sig == SIGTERM)
+ prog_stop = 1;
+}
+
static int get_rand(int a, int b)
{
return a + (int) (((float)(b - a + 1)) * random() / (RAND_MAX+1.0));
@@ -198,31 +205,64 @@ static int check_lock_state(int pid, int result, int count, char *res_state)
}
}
-static int add_lockspaces(void)
+static int remove_lockspace(int i)
{
struct sanlk_lockspace ls;
- int i, rv;
+ int rv;
- printf("adding %d lockspaces...\n", ls_count);
+ memset(&ls, 0, sizeof(ls));
+ sprintf(ls.host_id_disk.path, "%s%d", lock_disk_base, i);
+ sprintf(ls.name, "lockspace%d", i);
+ ls.host_id = our_hostid;
- for (i = 0; i < ls_count; i++) {
- memset(&ls, 0, sizeof(ls));
- sprintf(ls.host_id_disk.path, "%s%d", lock_disk_base, i);
- sprintf(ls.name, "lockspace%d", i);
- ls.host_id = our_hostid;
+ printf("rem lockspace%d...\n", i);
- rv = sanlock_add_lockspace(&ls, 0);
- if (rv < 0) {
- log_error("sanlock_add_lockspace error %d %s", rv,
- ls.host_id_disk.path);
- return -1;
- }
+ rv = sanlock_rem_lockspace(&ls, 0);
+ if (rv < 0) {
+ log_error("sanlock_rem_lockspace error %d %s", rv,
+ ls.host_id_disk.path);
+ return -1;
+ }
+
+ printf("rem done\n");
+ return 0;
+}
+
+static int add_lockspace(int i)
+{
+ struct sanlk_lockspace ls;
+ int rv;
- printf("add lockspace %s:%llu:%s:%d\n",
- ls.name, (unsigned long long)ls.host_id,
- ls.host_id_disk.path, 0);
+ memset(&ls, 0, sizeof(ls));
+ sprintf(ls.host_id_disk.path, "%s%d", lock_disk_base, i);
+ sprintf(ls.name, "lockspace%d", i);
+ ls.host_id = our_hostid;
+
+ printf("add lockspace%d...\n", i);
+
+ rv = sanlock_add_lockspace(&ls, 0);
+ if (rv == -EEXIST)
+ return 0;
+
+ if (rv < 0) {
+ log_error("sanlock_add_lockspace error %d %s", rv,
+ ls.host_id_disk.path);
+ return -1;
}
+ printf("add done\n");
+ return 0;
+}
+
+static int add_lockspaces(void)
+{
+ int i, rv;
+
+ for (i = 0; i < ls_count; i++) {
+ rv = add_lockspace(i);
+ if (rv < 0)
+ return rv;
+ }
return 0;
}
@@ -345,11 +385,17 @@ static void inquire_all(int pid, int fd)
{
int rv, count = 0;
char *state = NULL;
+
+ if (prog_stop)
+ return;
rv = sanlock_inquire(fd, -1, 0, &count, &state);
log_debug("%d inquire all = %d", pid, rv);
+ if (prog_stop)
+ return;
+
check_lock_state(pid, rv, count, state);
}
@@ -370,7 +416,7 @@ int do_rand_child(void)
exit(-1);
}
- while (1) {
+ while (!prog_stop) {
ls1 = get_rand(0, ls_count-1);
res1 = get_rand(0, res_count-1);
state1 = lock_state[ls1][res1];
@@ -446,6 +492,8 @@ int do_rand_child(void)
}
iter++;
}
+ display_rv(pid);
+ return 0;
}
/*
@@ -517,15 +565,31 @@ void get_options(int argc, char *argv[])
}
}
+int find_pid(int *kids, int pid)
+{
+ int i;
+
+ for (i = 0; i < pid_count; i++) {
+ if (kids[i] == pid)
+ return i;
+ }
+ return -1;
+}
+
int do_rand(int argc, char *argv[])
{
+ struct sigaction act;
int children[MAX_PID_COUNT];
int run_count = 0;
- int i, rv, pid, status;
+ int i, rv, pid, lsi, status;
if (argc < 5)
return -1;
+ memset(&act, 0, sizeof(act));
+ act.sa_handler = sigterm_handler;
+ sigaction(SIGTERM, &act, NULL);
+
strcpy(lock_disk_base, argv[2]);
get_options(argc, argv);
@@ -534,7 +598,7 @@ int do_rand(int argc, char *argv[])
if (rv < 0)
return rv;
- printf("forking %d pids...\n", pid_count);
+ printf("forking %d pids\n", pid_count);
for (i = 0; i < pid_count; i++) {
pid = fork();
@@ -543,29 +607,103 @@ int do_rand(int argc, char *argv[])
log_error("fork %d failed %d run_count %d", i, errno, run_count);
break;
}
-
if (!pid) {
do_rand_child();
exit(-1);
}
-
children[i] = pid;
run_count++;
}
printf("children running\n");
+ while (!prog_stop) {
+ /*
+ * kill and replace a random pid
+ */
+
+ sleep(get_rand(1, 60));
+ if (prog_stop)
+ break;
+
+ i = get_rand(0, pid_count);
+ pid = children[i];
+
+ printf("kill pid %d\n", pid);
+ kill(pid, SIGKILL);
+
+ rv = waitpid(pid, &status, 0);
+ if (rv <= 0)
+ continue;
+
+ pid = fork();
+ if (pid < 0) {
+ log_error("fork failed %d", errno);
+ break;
+ } else if (!pid) {
+ do_rand_child();
+ exit(-1);
+ } else {
+ children[i] = pid;
+ }
+
+#if 0
+ /*
+ * remove a random lockspace, replace any pids that were using
+ * it, replace the lockspace
+ */
+
+ sleep(get_rand(1, 60));
+ if (prog_stop)
+ break;
+
+ lsi = get_rand(0, ls_count-1);
+
+ remove_lockspace(lsi);
+
+ while (1) {
+ rv = waitpid(-1, &status, WNOHANG);
+ if (rv <= 0)
+ break;
+
+ if (!WIFEXITED(status))
+ continue;
+
+ printf("exit pid %d\n", pid);
+
+ i = find_pid(children, rv);
+ if (i < 0)
+ continue;
+
+ pid = fork();
+ if (pid < 0) {
+ log_error("fork failed %d", errno);
+ break;
+ } else if (!pid) {
+ do_rand_child();
+ exit(-1);
+ } else {
+ children[i] = pid;
+ }
+ }
+
+ add_lockspace(lsi);
+#endif
+ }
+
+ printf("stopping pids");
+
+ for (i = 0; i < pid_count; i++)
+ kill(children[i], SIGTERM);
+
while (run_count) {
pid = wait(&status);
- if (pid > 0)
+ if (pid > 0) {
run_count--;
+ printf(".");
+ }
}
-
- /*
- * periodically:
- * - kill a random pid, and fork a new one to replace it
- * - rem a random ls and add it again
- */
+ printf("\n");
return 0;
}
@@ -584,7 +722,7 @@ int do_rand(int argc, char *argv[])
* ...
*/
-#define INIT_NUM_HOSTS 8
+#define INIT_NUM_HOSTS 64
int do_init(int argc, char *argv[])
{
12 years, 3 months
src/host_id.c src/sanlock_admin.h
by David Teigland
src/host_id.c | 10 +++++++++-
src/sanlock_admin.h | 21 +++++++++++++++++++++
2 files changed, 30 insertions(+), 1 deletion(-)
New commits:
commit eea3d846da525da77e2cf19ff2a409f913a0ca70
Author: David Teigland <teigland(a)redhat.com>
Date: Thu Jun 23 17:19:36 2011 -0500
sanlock: return -EINPROGRESS from add_lockspace
if the lockspace is already in the process of being added.
We previously returned -EEXIST in this case.
The in-progress add operation may or may not succeed.
diff --git a/src/host_id.c b/src/host_id.c
index 9cb8617..b2c64c2 100644
--- a/src/host_id.c
+++ b/src/host_id.c
@@ -370,7 +370,7 @@ int add_lockspace(struct sanlk_lockspace *ls)
/* search all lists for an identical lockspace */
sp2 = _search_space(sp->space_name, &sp->host_id_disk, sp->host_id,
- &spaces, &spaces_add, NULL);
+ &spaces, NULL, NULL);
if (sp2) {
pthread_mutex_unlock(&spaces_mutex);
rv = -EEXIST;
@@ -378,6 +378,14 @@ int add_lockspace(struct sanlk_lockspace *ls)
}
sp2 = _search_space(sp->space_name, &sp->host_id_disk, sp->host_id,
+ &spaces_add, NULL, NULL);
+ if (sp2) {
+ pthread_mutex_unlock(&spaces_mutex);
+ rv = -EINPROGRESS;
+ goto fail_free;
+ }
+
+ sp2 = _search_space(sp->space_name, &sp->host_id_disk, sp->host_id,
&spaces_rem, NULL, NULL);
if (sp2) {
pthread_mutex_unlock(&spaces_mutex);
diff --git a/src/sanlock_admin.h b/src/sanlock_admin.h
index cabc24c..a210bc4 100644
--- a/src/sanlock_admin.h
+++ b/src/sanlock_admin.h
@@ -16,7 +16,28 @@
int sanlock_status(int debug);
int sanlock_log_dump(void);
int sanlock_shutdown(void);
+
+/*
+ * add_lockspace returns:
+ * 0: the lockspace has been added successfully
+ * -EEXIST: the lockspace already exists
+ * -EINPROGRESS: the lockspace is already in the process of being added
+ * (the in-progress add may or may not succeed)
+ * -EAGAIN: the lockspace is being removed
+ */
+
int sanlock_add_lockspace(struct sanlk_lockspace *ls, uint32_t flags);
+
+/*
+ * rem_lockspace returns:
+ * 0: the lockspace has been removed successfully
+ * -EINPROGRESS: the lockspace is already in the process of being removed
+ * -ENOENT: lockspace not found
+ *
+ * The sanlock daemon will kill any pids using the lockspace when the
+ * lockspace is removed.
+ */
+
int sanlock_rem_lockspace(struct sanlk_lockspace *ls, uint32_t flags);
#endif
12 years, 3 months
src/direct.c src/host_id.c tests/sanlk_load.c
by David Teigland
src/direct.c | 6 +++---
src/host_id.c | 17 ++++++++++-------
tests/sanlk_load.c | 2 +-
3 files changed, 14 insertions(+), 11 deletions(-)
New commits:
commit 8e17fd668efe9bffd04df8b4f9c26a52f0f371d2
Author: David Teigland <teigland(a)redhat.com>
Date: Wed Jun 22 15:21:57 2011 -0500
sanlock: generate a uuid for host id
instead of doing approx the same thing with a timestamp
plus random number. Still include the uname nodename
after the uuid as a debugging hint about the actual host.
diff --git a/src/direct.c b/src/direct.c
index 50d5cbf..5c57574 100644
--- a/src/direct.c
+++ b/src/direct.c
@@ -467,7 +467,7 @@ int direct_dump(struct task *task, char *dump_path)
goto out_close;
}
- printf("%8s %36s %36s %10s %4s %4s %s\n",
+ printf("%8s %36s %48s %10s %4s %4s %s\n",
"offset",
"lockspace",
"resource",
@@ -502,7 +502,7 @@ int direct_dump(struct task *task, char *dump_path)
strncpy(sname, lr->space_name, NAME_ID_SIZE);
strncpy(rname, lr->resource_name, NAME_ID_SIZE);
- printf("%08llu %36s %36s %010llu %04llu %04llu\n",
+ printf("%08llu %36s %48s %010llu %04llu %04llu\n",
(unsigned long long)((sector_nr + i) * sd.sector_size),
sname, rname,
(unsigned long long)lr->timestamp,
@@ -513,7 +513,7 @@ int direct_dump(struct task *task, char *dump_path)
strncpy(sname, lr->space_name, NAME_ID_SIZE);
strncpy(rname, lr->resource_name, NAME_ID_SIZE);
- printf("%08llu %36s %36s %010llu %04llu %04llu %llu\n",
+ printf("%08llu %36s %48s %010llu %04llu %04llu %llu\n",
(unsigned long long)(sector_nr * sd.sector_size),
sname, rname,
(unsigned long long)lr->timestamp,
diff --git a/src/host_id.c b/src/host_id.c
index 8f2bfa8..9cb8617 100644
--- a/src/host_id.c
+++ b/src/host_id.c
@@ -22,6 +22,7 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/utsname.h>
+#include <uuid/uuid.h>
#include "sanlock_internal.h"
#include "diskio.h"
@@ -576,7 +577,8 @@ int get_rand(int a, int b)
void setup_spaces(void)
{
struct utsname name;
- struct timeval tv;
+ char uuid[37];
+ uuid_t uu;
INIT_LIST_HEAD(&spaces);
INIT_LIST_HEAD(&spaces_add);
@@ -597,13 +599,14 @@ void setup_spaces(void)
/* make up something that's likely to be different among hosts */
memset(&our_host_name_global, 0, sizeof(our_host_name_global));
+ memset(&name, 0, sizeof(name));
+ memset(&uuid, 0, sizeof(uuid));
+
uname(&name);
- gettimeofday(&tv, NULL);
+ uuid_generate(uu);
+ uuid_unparse_lower(uu, uuid);
- snprintf(our_host_name_global, NAME_ID_SIZE, "%llu.%llu.%d.%s",
- (unsigned long long)tv.tv_sec,
- (unsigned long long)tv.tv_usec,
- get_rand(1, RAND_MAX-1),
- name.nodename);
+ snprintf(our_host_name_global, NAME_ID_SIZE, "%s.%s",
+ uuid, name.nodename);
}
diff --git a/tests/sanlk_load.c b/tests/sanlk_load.c
index 6c55ffb..d874fa2 100644
--- a/tests/sanlk_load.c
+++ b/tests/sanlk_load.c
@@ -657,7 +657,7 @@ int main(int argc, char *argv[])
out:
printf("sanlk_load init <lock_disk_base> [<ls_count> <res_count>]\n");
printf("\n");
- printf("sanlk_load rand\n");
+ printf("sanlk_load rand <lock_disk_base> -i <host_id> [-D -s <ls_count> -r <res_count> -p <pid_count>]\n");
printf("\n");
return -1;
}
12 years, 3 months
Changes to 'refs/tags/sanlock-1.4'
by David Teigland
Changes since the dawn of time:
Daniel P. Berrange (15):
Fix const-ness of many APIs.
Fix warnings in watchdog module
Fix function prototypes for no-arg methods
Remove use of 'index' as a variable name
Make many functions static
Fix missing include in logging file
Annotate many unused parameters to avoid warnings
Remove redundant redeclaration of 'to' variable
Fix args to execv()
Remove redundant arg to 'run_command'
Rename optarg to optionarg to avoid clashing with getopt.h
Disable the read_request method since it is unused
Add many more compiler warning flags & safety checks
Hard code a sector size of 512 if the lease volume is a regular file
Ensure libsanlock.so is built with debug/warning flags
David Teigland (217):
sync_manager: initial commit
sync_manager: misc updates
sync_manager: misc updates
sync_manager: misc updates
sync_manager: misc updates
sync_manager: add more logging
sync_manager: misc updates
sync_manager: misc updates
sync_manager: num_hosts/MAX_HOSTS stuff
daemon: reworking notions of resource_id/token_name
sync_manager: resource lockfiles
sync_manager: lease arg processing
sync_manager: Began multiple lease support
sync_manager: use first command line arg as action
sync_manager: leader record changes and verify
sync_manager: clean up released leases
sync_manager: move functions around
sync_manager: add more tool actions
sync_manager: naming changes
sync_manager: separate token index and id
sync_manager: fix index usage and other misc
sync_manager: use pthread cond in acquire
sync_manager: write all log entries
sync_manager: simplify polling
sync_manager: fix waitpid use
sync_manager: acquire can fail early
sync_manager: write log entries at exit
sync_manager: add test program
sync_manager: move secondary pid check
sync_manager: fix disk paxos contention
devcount: fix verify checks
sync_manager: add GPL license file
sync_manager: fix leader block offsets
sync_manager: increase COMMAND_MAX
sync_manager: renewal should verify
sync_manager: use sector size from libblkid
sync_manager: use a real checksum function
sync_manager: add libblkid to spec file
sync_manager: print status info
sync_manager: one watchdog file per lease
sync_manager: lease_threads handle watchdog files
sync_manager: fix/add some text/comments
sync_manager: refactor read/write
sync_manager: move disk io functions
sync_manager: remove token arg
sync_manager: rename paxos_disk sync_disk
sync_manager: add aio read/write
sync_manager: make io_timeout_seconds a diskio arg
sync_manager: forgot to add new files
sync_manager: use log thread
sync_manager: client connections
sync_manager: connection processing
sync_manager: send/recv pid
sync_manager: add write_sectors
sync_manager: restructuring
sync_manager: write_sectors code factoring
sync_manager: daemonize
sync_manager: releasing leases
sync_manager: async releasing
sync_manager: release fixes
sync_manager: add direct and indirect acquire/release
sync_manager: reacquire resources
sync_manager: move code
sync_manager: same pid may reacquire resource
sync_manager: lease migration
sync_manager: handle client errors
sync_manager: improve error handling
sync_manager: host_id leases
sync_manager: remove empty files
sync_manager: print initialization info
sync_manager: rename files
sync_manager: clean up header org
sync_manager: delta_lease implementation
sync_manager: accept offset units
sync_manager: fix up init output
sync_manager: put back watchdog calls
sync_manager: fix start_host_id error paths
sync_manager: add log_error's for watchdog file errors
sync_manager: actual timeouts
sync_manager: change timeouts on cmd line
sanlock: create new external api
sanlock: build libsanlock
sanlock: use MAX_LEASES everywhere
sanlock: add libvirt plugin
sanlock plugin: couple minor fixes
sanlock: clean up /var file names
sanlock plugin: fix symbol needed by libvirt
sanlock: add some debug output
sanlock plugin: fix uuid copy
sanlock plugin: fix names
sanlock: add "owner_name"
sanlock: fix renewal checks
sanlock: clean up host_id types
sanlock: set_host_id command
sanlock: fix killing pids
sanlock: add status command
sanlock: set version to 1.0
sanlock: delta_lease cleanup
sanlock: changing num_hosts
sanlock: add dump command
sanlock: renewal timings
sanlock: add direct option
sanlock: check for watchdog file
sanlock: recovery fixes
lock_driver_sanlock: fix compile problems
sanlock: improve command options
sanlock: tidying help text
sanlock: move binary to /usr/sbin
sanlock: add init script
sanlock: fix sigterm shutdown
sanlock: init stop
sanlock: add wdtest command
sanlock.spec: new url
lock_driver_sanlock: remove close
sanlock: introduce lockspaces
lock_driver_sanlock: remove files
sanlock: better logging functions
sanlock: misc log message
sanlock.spec: sbin not libexec
sanlock init: remove watchdog reference
wdmd: watchdog multiplexing daemon
sanlock: add code to use wdmd
sanlock/wdmd: use wdmd in sanlock
sanlock/wdmd: add copyright header to source files
sanlock: rename sanlock source dir
sanlock: move tests dir
move COPYING file
wdmd: use signalfd for signal handling
Fix Makefile comments
wdmd: fix daemon debug option
wdmd: add init script
sanlock.spec: updates
sanlock.spec: src dir
sanlock: build with uninstalled libwdmd
sanlock: version 1.1
sanlock: high priority options
wdmd: high priority options
sanlock: return migration state
sanlock: migration.txt describes libvirt/sanlock steps
libsanlock: include admin functions
sanlock: fix host_id expiration check
sanlock: migration working
devcount: migrate test
sanlock: setowner improvements
sanlock: migrate to target fix
sanlock: fix wdmd stop order
sanlock: various fixes
sanlock: remove wdtest
sanlock: remove migration
sanlock: clean up command return data
sanlock: add resource string conversion functions
sanlock: rework internal structs
devcount: add relock test
sanlock: fix release and inquire
sanlock: add_lockspace EEXIST
sanlock: rework client handling
sanlock: clean up warnings
sanlock: debug message changes
sanlock: add lockspace checks
wdmd: enable test scripts
sanlock: add str_to_lockspace to lib
WIP devcount migrate
devcount: new migrate test
sanlock: read_id and live_id commands
sanlock: check lockspace name and host_id
sanlock: remove remaining cluster_mode
sanlock: add libsanlock_direct
devcountn: start multiple devcount tests
devcount: small changes
sanlock: new return values
sanlock: misc changes and fix
sanlock: log error of full bad block
sanlock: interval between renewal checks
sanlock: renewal changes
sanlock: fix log_dump
sanlock: fix find_client_pid
sanlock: fix host_id reads from paxos_acquire
sanlock: init with one write
devcount: improve output
devcount: new pause/resume
devcount: add expire test
sanlock: correct paxos usage
sanlock: direct read_leader
sanlock: paxos delays
sanlock: use thread pool
sanlock: client status output format changes
sanlock: fix inquire of dead pid
sanlock: use native linux aio
sanlock: i/o changes
sanlock: aio changes
sanlock: reduce paxos acquire read ops
sanlock: quiet error case
sanlock: don't free aio buf until event completes
sanlock: io timeout related changes
sanlock: read dblocks in single aligned io
sanlock: add sanlock_restrict api
sanlock: add sanlock_direct_sector_size api
sanlock: add checksum to dblocks
sanlock: fix init restart
sanlock: don't release tokens in dead lockspace
sanlock: fix adding lockspace
sanlock: official 1MB/8MB alignment
devcount: use aio in init
libsanlock: link with LDFLAGS
sanlock: increase version to 1.3
sanlock/wdmd: shut up warnings
sanlock: fix libwdmd linking
remove spec file
sanlock: use a completed read after renewal timeout
sanlock: use unique host name in delta leases
sanlock: remove sector_size api
sanlock: abort delta wait on shutdown
sanlock: fix add_lockspace failure
sanlk_load: add new test
sanlock: fix recv and inquire
sanlock: initial pid_dead check in acquire
sanlock: release 1.4
Fabio M. Di Nitto (5):
build: sanlock should link with libsanlock
build: install shared lib header files and fix DESTDIR usage
build: drop rpm target
spec file: do first cut for total spec file
build: fix linking with libsanlock and install target
Federico Simoncelli (22):
rpm: sync specfile with fedora
rpm: add sanlock_admin.h header
rpm: add the lib package, install the initscripts
python: remove unused python code
python: add python binding
python: release the gil during sanlock operations
python: wrap sanlock extension with a module
rpm: add python binding package
python: pass a lockspace copy to str_to_lockspace
makefile: fix install typo
rpm: add sanlock_direct header
python: add sanlock init functions and exception
direct: close disks after initialization
python: register process only once
daemon: configurable socket permissions
rpm: add sanlock user and group
python: exceptions must contain the errno
rpm: add missing libaio-devel dependency
rpm: add daemon options in the init file
python: add missing aio library
python: add get_alignment function
libs: include libsanlock_direct into libsanlock
Saggi Mizrahi (21):
Added the begining of the testing and debugging tools
Better handling of max hosts
sync_manager: Updated tests to work with new lease struct
sync_manager: fixed skipping first arg in command
sync_manager: acquire and release actions
sync_manager: minor fixes
sync_manager: renamed stuff
sync_manager: made acquire synchronous again
sync_manager: added set_host_id action
sync_manager: use kill(0) for secondary pid check
sync_manager: make rpm and install
sync_manager: spec file update
sync_manager: Allow longer resource names
sync_manager: allow repeated set_host_id
sync_manager: Added escaping for the leases arg
sync_manager: Created the python bindings for sync_manager
sync_manager: listener socket permissions
sync_manager: Updated python binding and tests
sync_manager: Made 'token' a const in log_level
sync_manager: refactor messaging system
sync_manager: use getsockopt PEERCRED
12 years, 3 months