Version 2.02.89 -
==================================
+ Restart CLVMD with same cluster manager.
Fix log_error() usage in raid and unknown segtype initialisation.
Improve testing Makefile.
Fix install_ocf make target when srcdir != builddir. (2.02.80)
}
static struct cluster_ops _cluster_cman_ops = {
+ .name = "cman",
.cluster_init_completed = _cluster_init_completed,
.cluster_send_message = _cluster_send_message,
.name_from_csid = _name_from_csid,
/*
* Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
} while (hn);
/* clvmd + locks (-E uuid) + debug (-d X) + NULL */
- if (!(argv = malloc((max_locks * 2 + 4) * sizeof(*argv))))
+ if (!(argv = malloc((max_locks * 2 + 5) * sizeof(*argv))))
goto_out;
/*
argv[argc++] = debug_arg;
}
- /*
- * FIXME: specify used cluster backend
- * argv[argc++] = strdup("-Isinglenode");
- */
+ argv[argc++] = "-I";
+ argv[argc++] = clops->name;
/* Now add the exclusively-open LVs */
hn = NULL;
/*
* Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
struct local_client;
struct cluster_ops {
+ const char *name;
void (*cluster_init_completed) (void);
int (*cluster_send_message) (const void *buf, int msglen,
}
static struct cluster_ops _cluster_corosync_ops = {
+ .name = "corosync",
.cluster_init_completed = NULL,
.cluster_send_message = _cluster_send_message,
.name_from_csid = _name_from_csid,
}
static struct cluster_ops _cluster_openais_ops = {
+ .name = "openais",
.cluster_init_completed = NULL,
.cluster_send_message = _cluster_send_message,
.name_from_csid = _name_from_csid,
}
static struct cluster_ops _cluster_singlenode_ops = {
+ .name = "singlenode",
.cluster_init_completed = NULL,
.cluster_send_message = _cluster_send_message,
.name_from_csid = _name_from_csid,
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2011 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+export LVM_CLVMD_BINARY="lib/clvmd"
+export LVM_BINARY="lib/lvm"
+
+. lib/test
+
+# only clvmd based test, skip otherwise
+test -e LOCAL_CLVMD || skip
+
+aux prepare_devs 1
+
+vgcreate --clustered y $vg $(cat DEVICES)
+
+lvcreate -an --zero n -n $lv1 -l1 $vg
+lvcreate -an --zero n -n $lv2 -l1 $vg
+lvcreate -l1 $vg
+
+lvchange -aey $vg/$lv1
+lvchange -aey $vg/$lv2
+
+"$LVM_CLVMD_BINARY" -S
+sleep .2
+# restarted clvmd has the same PID (no fork, only execve)
+NEW_LOCAL_CLVMD=$(pgrep clvmd)
+read LOCAL_CLVMD < LOCAL_CLVMD
+test "$LOCAL_CLVMD" -eq "$NEW_LOCAL_CLVMD"
+
+# FIXME: Hmm - how could we test exclusivity is preserved in singlenode ?
+lvchange -an $vg/$lv1
+lvchange -ay $vg/$lv1
+
+lib/clvmd -R
+
+vgremove -ff $vg