cluster: RHEL55 - rgmanager: Fix -m and -s output when fed bad data
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: bb374dab9bbb30fd3180810ccac43db7ba8d8001
Parent: 2f850ac3c4c34a4c972e5f7624694c61cb28d73f
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Tue Sep 22 17:36:37 2009 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Mon Sep 28 10:53:29 2009 -0400
rgmanager: Fix -m and -s output when fed bad data
Resolves: rhbz#506346
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/utils/clustat.c | 73 +++++++++++++++++++++++++++++------------
1 files changed, 52 insertions(+), 21 deletions(-)
diff --git a/rgmanager/src/utils/clustat.c b/rgmanager/src/utils/clustat.c
index f1d1756..4b9ebc9 100644
--- a/rgmanager/src/utils/clustat.c
+++ b/rgmanager/src/utils/clustat.c
@@ -593,6 +593,20 @@ build_service_field_sizes(int cols, int *svcsize, int *nodesize, int *statsize)
}
+void
+print_svc_header(int svcsize, int nodesize, int statsize)
+{
+ printf(" %-*.*s %-*.*s %-*.*s\n",
+ svcsize, svcsize, "Service Name",
+ nodesize, nodesize, "Owner (Last)",
+ statsize, statsize, "State");
+ printf(" %-*.*s %-*.*s %-*.*s\n",
+ svcsize, svcsize, "------- ----",
+ nodesize, nodesize, "----- ------",
+ statsize, statsize, "-----");
+}
+
+
int
txt_rg_states(rg_state_list_t *rgl, cluster_member_list_t *members,
char *svcname, int flags)
@@ -608,24 +622,20 @@ txt_rg_states(rg_state_list_t *rgl, cluster_member_list_t *members,
build_service_field_sizes(dimx, &svcsize, &nodesize, &statsize);
if (!(flags & RG_VERBOSE)) {
-
- printf(" %-*.*s %-*.*s %-*.*s\n",
- svcsize, svcsize, "Service Name",
- nodesize, nodesize, "Owner (Last)",
- statsize, statsize, "State");
- printf(" %-*.*s %-*.*s %-*.*s\n",
- svcsize, svcsize, "------- ----",
- nodesize, nodesize, "----- ------",
- statsize, statsize, "-----");
+ if (!svcname)
+ print_svc_header(svcsize, nodesize, statsize);
} else {
printf("Service Information\n"
"------- -----------\n\n");
}
for (x = 0; x < rgl->rgl_count; x++) {
- if (svcname &&
- strcmp(rgl->rgl_states[x].rs_name, svcname))
- continue;
+ if (svcname) {
+ if (strcmp(rgl->rgl_states[x].rs_name, svcname)) {
+ continue;
+ }
+ print_svc_header(svcsize, nodesize, statsize);
+ }
txt_rg_state(&rgl->rgl_states[x], members, flags,
svcsize, nodesize, statsize);
if (svcname) {
@@ -794,10 +804,20 @@ xml_member_state(cman_node_t *node)
}
+void
+print_member_header(nodesize)
+{
+ printf(" %-*.*s", nodesize, nodesize, "Member Name");
+ printf("%-4.4s %s\n", "ID", "Status");
+ printf(" %-*.*s", nodesize, nodesize, "------ ----");
+ printf("%-4.4s %s\n", "----", "------");
+}
+
+
int
txt_member_states(cluster_member_list_t *membership, char *name)
{
- int x, ret = 0, nodesize;
+ int x, ret = -1, nodesize;
if (!membership) {
printf("Membership information not available\n");
@@ -806,19 +826,30 @@ txt_member_states(cluster_member_list_t *membership, char *name)
build_member_field_size(dimx, &nodesize);
- printf(" %-*.*s", nodesize, nodesize, "Member Name");
- printf("%-4.4s %s\n", "ID", "Status");
- printf(" %-*.*s", nodesize, nodesize, "------ ----");
- printf("%-4.4s %s\n", "----", "------");
+ if (!name) {
+ printf(" %-*.*s", nodesize, nodesize, "Member Name");
+ printf("%-4.4s %s\n", "ID", "Status");
+ printf(" %-*.*s", nodesize, nodesize, "------ ----");
+ printf("%-4.4s %s\n", "----", "------");
+ ret = 0;
+ }
for (x = 0; x < membership->cml_count; x++) {
- if (name && strcmp(membership->cml_members[x].cn_name, name))
- continue;
+ if (name) {
+ if (strcmp(membership->cml_members[x].cn_name, name)) {
+ continue;
+ }
+ print_member_header(nodesize);
+ }
txt_member_state(&membership->cml_members[x], nodesize);
- ret = !(membership->cml_members[x].cn_member & FLAG_UP);
+ if (name) {
+ ret = !(membership->cml_members[x].cn_member & FLAG_UP);
+ return ret;
+ }
}
- printf("\n");
+ if (!name)
+ printf("\n");
return ret;
}
14 years, 7 months
cluster: master - Drop old Makefile
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 5577bb82ea7a0ed3d1b27f2a6acdb1926e2b6a78
Parent: 41477a7f678f5c73b0a890ed2e608471cf029c27
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Mon Sep 28 13:36:33 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Mon Sep 28 13:36:33 2009 +0200
Drop old Makefile
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/Makefile | 19 -------------------
1 files changed, 0 insertions(+), 19 deletions(-)
diff --git a/cman/init.d/Makefile b/cman/init.d/Makefile
deleted file mode 100644
index c7a226b..0000000
--- a/cman/init.d/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-TARGET=cman
-
-INITDT=$(TARGET)
-
-all: $(TARGET)
-
-include ../../make/defines.mk
-include $(OBJDIR)/make/clean.mk
-include $(OBJDIR)/make/install.mk
-include $(OBJDIR)/make/uninstall.mk
-
-$(TARGET): $(S)/$(TARGET).in
- cat $(S)/$(TARGET).in | sed \
- -e 's#@SBINDIR@#${sbindir}#g' \
- -e 's#@INITDDIR@#${initddir}#g' \
- -e 's#@NOTIFYDDIR@#${notifyddir}#g' \
- > $(TARGET)
-
-clean: generalclean
14 years, 7 months
cluster: the annotated tag cluster-3.0.3 has been created
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 02eb01f08ea73ff04cd4489380df9dfb65a2374f
Parent: 0000000000000000000000000000000000000000
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: 2009-09-25 10:09 +0000
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: 2009-09-25 10:09 +0000
annotated tag: cluster-3.0.3 has been created
at 02eb01f08ea73ff04cd4489380df9dfb65a2374f (tag)
tagging 42c94746ebea6466e09daac3949c7a784e2a6dad (commit)
replaces cluster-3.0.2
cluster-3.0.3 release
Abhijith Das (1):
gfs-kernel: Bug 471258 - fatal: assertion "gfs_glock_is_locked_by_me(gl) && gfs_glock_is_held_excl(gl)" failed
Andrew Beekhof (1):
Add most of the needed pieces for gfs2-pacemaker integration
Bob Peterson (12):
Allow gfs2_edit printsavedmeta to print destination size and type
Make gfs2_edit -p <block> blockalloc work for gfs1 file systems
Allow gfs2_edit to display and print gfs1 rgrps
gfs2_edit: Indirect pointers missing from list when paging up and down
gfs2_edit: Add missing superblock fields for gfs1 file systems
gfs2_edit: Fix rindex read function for gfs1 file systems
GFS2: gfs2_edit prints wrong directory entry type for gfs1
gfs2_edit -p block# shows wrong height/offset on gfs1 and segfaults on gfs2
gfs_fsck cannot repair rindex problems when directly on blockdevice
GFS2 filesystem inconsistent after xfstests test suite run
GFS filesystem inconsistent after xfstests test suite run
fsck.gfs2 unable to fix some rindex corruption for block size < 4K
Christine Caulfield (7):
config: Change has_childs to has_children
cman: add some explanation to cman_tool man page
config: Fix some schema names in confdb2ldif
config: remove translation table from confdb2ldif
config: Remove superflous empty objects created by LDAP loader.
config: in LDAP cluster entry is not a cn=
cman: Allow re-registering of a quorum disk
David Teigland (10):
gfs_controld: include mg name prefix in log messages
dlm_controld: periodically drop plock resources
fenced: partition merge handling
fenced: limit repeating failure messages
fenced: rename things from cman to cluster
dlm_controld: copy some fenced changes
gfs_controld: copy some fenced changes
dlm_controld: log_debug to log_group
dlm_controld: fix start matching for partition+merge changes
dlm_controld: change default enable_quorum to 0
Fabio M. Di Nitto (20):
build: cleanup libfenced linking
build: update release script
cman init: integrate ocfs2_controld.cman startup
config: preliminary support for config validation
config validation: improve shell wrapper
config validation: allow users to specify an alternate config file
config validation: fix override
config dump: beautify output
config dump: add usage and options
config dump: add man page
ccs_config_validate: give the tool a decent shape
config: cleanup rng2ldif build
config validation: clean up last bits
config validate: add man page
dlm_controld: allow parallel build of pcmk variant
release script: rename gfs1-utils to gfs-utils
cman init: allow sshd to start before cman without hard dependency
Revert "gfs-kernel: update to 2.6.30"
gfs-kernel: update to 2.6.31
cman init: implement startup block breakpoints
Federico Simoncelli (1):
rgmanager: Handle virsh migration errors gracefully
Jan Friesse (1):
fence: Support for power cycle in fence ipmi
Lars Marowsky-Bree (1):
dlm_controld: include ls name prefix in log messages
Lon Hohberger (15):
rgmanager: Fix missing path attribute handling
Add nodename attr to cman for automatic validation
config: Add data type checkers for some attrs
config: Fix up LDAP schema
rgmanager: fix build warning due to unused variable
config: Add rng2ldif utility for LDIF maintenance
config: Record time/date rather than path
config: Add 'cn' to LDIF when needed
config: Update LDIF to include cn when needed
config: Make 'cn' output conditional
config: Update LDIF to remove 'cn' where not applicable
rgmanager: Merge resource schema generation bits
config: Add missing stuff to schema
rgmanager: Ensure 'make clean' kills resources.rng
config: Update LDIF schema
Marek 'marx' Grac (2):
fence_apc: fence_apc fails to fence node - Unable to obtain plug status
fence_drac: Split fence agents drac/drac5 to separate directories
Steven Whitehouse (1):
gfs: Make gfs build with newer kernels
14 years, 7 months
cluster: STABLE3 - cman init: implement startup block breakpoints
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 42c94746ebea6466e09daac3949c7a784e2a6dad
Parent: 64889cf990215d6784c5de98ab40e899013296cc
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Thu Sep 24 21:33:36 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Thu Sep 24 21:33:36 2009 +0200
cman init: implement startup block breakpoints
http://sources.redhat.com/cluster/wiki/CmanInitNotes
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/cman.in | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 8788258..aa8a585 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -685,6 +685,8 @@ stop_fence_xvmd()
start()
{
+ breakpoint="$1"
+
sshd_enabled && service sshd start
if [ "$INITLOGLEVEL" = "quiet" ]; then
@@ -719,10 +721,14 @@ start()
none \
"Setting network parameters"
+ [ "$breakpoint" = "setup" ] && exit 0
+
runwrap start_cman \
none \
"Starting cman"
+ [ "$breakpoint" = "join" ] && exit 0
+
runwrap unfence_self \
none \
"Unfencing self"
@@ -735,6 +741,8 @@ start()
none \
"Waiting for quorum"
+ [ "$breakpoint" = "quorum" ] && exit 0
+
runwrap start_groupd \
groupd_enabled \
"Starting groupd"
@@ -759,6 +767,8 @@ start()
cmannotifyd_enabled \
"Starting cmannotifyd"
+ [ "$breakpoint" = "daemons" ] && exit 0
+
runwrap join_fence_domain \
fence_join_enabled \
"Joining fence domain"
@@ -867,7 +877,7 @@ rtrn=0
# See how we were called.
case "$1" in
start)
- start && touch $LOCK_FILE
+ start "$2" && touch $LOCK_FILE
if [ "$INITLOGLEVEL" = "quiet" ]; then
success
echo
14 years, 7 months
cluster: STABLE3 - Add most of the needed pieces for gfs2-pacemaker integration
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 64889cf990215d6784c5de98ab40e899013296cc
Parent: 2cb1706ea8af0abf54a31d52ab33ee5e098fc252
Author: Andrew Beekhof <andrew(a)beekhof.net>
AuthorDate: Thu Sep 24 19:42:50 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Thu Sep 24 19:42:50 2009 +0200
Add most of the needed pieces for gfs2-pacemaker integration
Signed-off-by: Andrew Beekhof <andrew(a)beekhof.net>
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
group/gfs_controld/Makefile | 41 +++++++++++++++----
group/gfs_controld/member_pcmk.c | 84 ++++++++++++++++++++++++++++++++++++++
2 files changed, 117 insertions(+), 8 deletions(-)
diff --git a/group/gfs_controld/Makefile b/group/gfs_controld/Makefile
index b0e6894..9d07a36 100644
--- a/group/gfs_controld/Makefile
+++ b/group/gfs_controld/Makefile
@@ -1,19 +1,23 @@
+include ../../make/defines.mk
+
TARGET= gfs_controld
+ifdef enable_pacemaker
+TARGET += gfs_controld.pcmk
+SBINDIRT += gfs_controld.pcmk
+endif
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= main.o \
- member_cman.o \
- config.o \
+SHAREDOBJS= main.o \
crc.o \
+ config.o \
cpg-new.o \
cpg-old.o \
group.o \
@@ -21,6 +25,13 @@ OBJS= main.o \
plock.o \
logging.o
+
+PCMK_OBJS= member_pcmk-pcmk.o \
+ $(SHAREDOBJS:.o=-pcmk.o)
+
+OBJS= $(SHAREDOBJS) \
+ member_cman.o
+
CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${logtincdir} -I${dlmcontrolincdir}
CFLAGS += -I${corosyncincdir} -I${openaisincdir} -I${fencedincdir}
CFLAGS += -I${KERNEL_SRC}/include/
@@ -28,19 +39,33 @@ CFLAGS += -I$(S)/../libgfscontrol
CFLAGS += -I$(S)/../lib/ -I$(S)/../include/
CFLAGS += -I${incdir}
-LDFLAGS += -L${ccslibdir} -lccs -L${cmanlibdir} -lcman
+PCMK_CFLAGS += -DENABLE_PACEMAKER=1
+PCMK_CFLAGS += -I${incdir}/heartbeat -I${incdir}/pacemaker
+PCMK_CFLAGS += `pkg-config glib-2.0 --cflags`
+PCMK_CFLAGS += `xml2-config --cflags`
+
LDFLAGS += -L${dlmcontrollibdir} -ldlmcontrol
LDFLAGS += -L${logtlibdir} -llogthread
LDFLAGS += -L${corosynclibdir} -lcpg -lpthread
LDFLAGS += -L${openaislibdir} -lSaCkpt
-LDFLAGS += -L${fencedlibdir} -lfenced
LDFLAGS += -L../lib -lgroup
LDFLAGS += -L${libdir}
+PCMK_LDFLAGS += -L${ccslibdir} -lccs
+PCMK_LDFLAGS += -lcib -lcrmcommon -lcrmcluster -ltotem_pg
+PCMK_LDFLAGS += `pkg-config glib-2.0 --libs`
+PCMK_LDFLAGS += `xml2-config --libs`
+
+CMAN_LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -lccs -lcman
+CMAN_LDFLAGS += -L${fencedlibdir} -lfenced
+
LDDEPS += ../lib/libgroup.a
-${TARGET}: ${OBJS} ${LDDEPS}
- $(CC) -o $@ $^ $(LDFLAGS)
+gfs_controld: ${OBJS} ${LDDEPS}
+ $(CC) -o $@ $^ $(LDFLAGS) $(CMAN_LDFLAGS)
+
+gfs_controld.pcmk: ${PCMK_OBJS} ${LDDEPS}
+ $(CC) -o $@ $^ $(LDFLAGS) $(PCMK_LDFLAGS)
depends:
$(MAKE) -C ../lib all
diff --git a/group/gfs_controld/member_pcmk.c b/group/gfs_controld/member_pcmk.c
new file mode 100644
index 0000000..88e5528
--- /dev/null
+++ b/group/gfs_controld/member_pcmk.c
@@ -0,0 +1,84 @@
+#include "gfs_daemon.h"
+#include "config.h"
+
+#include <glib.h>
+#include <bzlib.h>
+#include <heartbeat/ha_msg.h>
+
+#include <pacemaker/crm_config.h>
+
+#include <pacemaker/crm/crm.h>
+#include <pacemaker/crm/ais.h>
+#include <pacemaker/crm/attrd.h>
+/* heartbeat support is irrelevant here */
+#undef SUPPORT_HEARTBEAT
+#define SUPPORT_HEARTBEAT 0
+#include <pacemaker/crm/common/cluster.h>
+#include <pacemaker/crm/common/stack.h>
+#include <pacemaker/crm/common/ipc.h>
+#include <pacemaker/crm/msg_xml.h>
+#include <pacemaker/crm/cib.h>
+
+extern int ais_fd_async;
+
+static int pcmk_cluster_fd = 0;
+static void attrd_deadfn(int ci)
+{
+ log_error("%s: Lost connection to the cluster", __FUNCTION__);
+ pcmk_cluster_fd = 0;
+ return;
+}
+
+void kick_node_from_cluster(int nodeid)
+{
+ int fd = pcmk_cluster_fd;
+ int rc = crm_terminate_member_no_mainloop(nodeid, NULL, &fd);
+
+ if(fd > 0 && fd != pcmk_cluster_fd) {
+ pcmk_cluster_fd = fd;
+ client_add(pcmk_cluster_fd, NULL, attrd_deadfn);
+ }
+
+ switch(rc) {
+ case 1:
+ log_debug("Requested that node %d be kicked from the cluster", nodeid);
+ break;
+ case -1:
+ log_error("Don't know how to kick node %d from the cluster", nodeid);
+ break;
+ case 0:
+ log_error("Could not kick node %d from the cluster", nodeid);
+ break;
+ default:
+ log_error("Unknown result when kicking node %d from the cluster", nodeid);
+ break;
+ }
+ return;
+}
+
+void process_cluster(int ci)
+{
+ ais_dispatch(ais_fd_async, NULL);
+ cluster_quorate = crm_have_quorum;
+}
+
+int setup_cluster(void)
+{
+ /* To avoid creating an additional place for the dlm to be configured,
+ * only allow configuration from the command-line until CoroSync is stable
+ * enough to be used with Pacemaker
+ */
+ return 0;
+}
+
+void close_cluster(void)
+{
+ terminate_ais_connection();
+}
+
+#include <../../fence/libfenced/libfenced.h>
+int fenced_node_info(int nodeid, struct fenced_node *node)
+{
+ /* Not implemented */
+ return -1;
+}
14 years, 7 months
cluster: STABLE3 - gfs-kernel: update to 2.6.31
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 2cb1706ea8af0abf54a31d52ab33ee5e098fc252
Parent: e0304397b1c97f98cb5c82293986944c175ae04c
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Wed Sep 23 18:16:39 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Sep 23 18:16:39 2009 +0200
gfs-kernel: update to 2.6.31
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
configure | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 48e7469..1522ccd 100755
--- a/configure
+++ b/configure
@@ -17,7 +17,7 @@ my $ret = 0;
# this should be only the major version without the extra version
# eg. only the first 3 digits
-my $required_kernelversion = '2.6.29';
+my $required_kernelversion = '2.6.31';
my %options = (
help => \$help,
14 years, 7 months
cluster: STABLE3 - gfs: Make gfs build with newer kernels
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: e0304397b1c97f98cb5c82293986944c175ae04c
Parent: 698c7e6f146d538b380463b9a5cbd4ba12d9d0d8
Author: Steven Whitehouse <swhiteho(a)redhat.com>
AuthorDate: Wed Jul 29 15:21:27 2009 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Sep 23 18:14:28 2009 +0200
gfs: Make gfs build with newer kernels
Now builds with the latest upstream kernel: 2.6.31-rc4
Signed-off-by: Steven Whitehouse <swhiteho(a)redhat.com>
---
gfs-kernel/src/gfs/acl.c | 1 +
gfs-kernel/src/gfs/ops_file.c | 2 +-
gfs-kernel/src/gfs/ops_fstype.c | 4 ++--
gfs-kernel/src/gfs/proc.c | 1 -
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gfs-kernel/src/gfs/acl.c b/gfs-kernel/src/gfs/acl.c
index a9312ba..3936baa 100644
--- a/gfs-kernel/src/gfs/acl.c
+++ b/gfs-kernel/src/gfs/acl.c
@@ -1,4 +1,5 @@
#include <linux/sched.h>
+#include <linux/fs_struct.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/spinlock.h>
diff --git a/gfs-kernel/src/gfs/ops_file.c b/gfs-kernel/src/gfs/ops_file.c
index e5b6c4c..fa72924 100644
--- a/gfs-kernel/src/gfs/ops_file.c
+++ b/gfs-kernel/src/gfs/ops_file.c
@@ -352,7 +352,7 @@ do_read_direct(struct file *file, char *buf, size_t size, loff_t *offset,
goto out_gunlock;
if (gfs_is_stuffed(ip)) {
- size_t mask = bdev_hardsect_size(inode->i_sb->s_bdev) - 1;
+ size_t mask = bdev_logical_block_size(inode->i_sb->s_bdev) - 1;
if (((*offset) & mask) || (((unsigned long)buf) & mask))
goto out_gunlock;
diff --git a/gfs-kernel/src/gfs/ops_fstype.c b/gfs-kernel/src/gfs/ops_fstype.c
index 93bf4d1..d72b74a 100644
--- a/gfs-kernel/src/gfs/ops_fstype.c
+++ b/gfs-kernel/src/gfs/ops_fstype.c
@@ -300,9 +300,9 @@ static int init_sb(struct gfs_sbd *sdp, int silent, int undo)
sizes, version #s, locations of important on-disk inodes, etc. */
error = -EINVAL;
- if (sdp->sd_sb.sb_bsize < bdev_hardsect_size(sb->s_bdev)) {
+ if (sdp->sd_sb.sb_bsize < bdev_logical_block_size(sb->s_bdev)) {
printk("GFS: fsid=%s: FS block size (%u) is too small for device block size (%u)\n",
- sdp->sd_fsname, sdp->sd_sb.sb_bsize, bdev_hardsect_size(sb->s_bdev));
+ sdp->sd_fsname, sdp->sd_sb.sb_bsize, bdev_logical_block_size(sb->s_bdev));
goto fail;
}
if (sdp->sd_sb.sb_bsize > PAGE_SIZE) {
diff --git a/gfs-kernel/src/gfs/proc.c b/gfs-kernel/src/gfs/proc.c
index b25cd1c..069b39d 100644
--- a/gfs-kernel/src/gfs/proc.c
+++ b/gfs-kernel/src/gfs/proc.c
@@ -470,7 +470,6 @@ gfs_proc_init(void)
if (!pde)
return -ENOMEM;
- pde->owner = THIS_MODULE;
pde->proc_fops = &gfs_proc_fops;
return 0;
14 years, 7 months
cluster: STABLE3 - Revert "gfs-kernel: update to 2.6.30"
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 698c7e6f146d538b380463b9a5cbd4ba12d9d0d8
Parent: c3115765fe103b85e261eab4f5acd8e91fd3b7dd
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Wed Sep 23 18:13:57 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Sep 23 18:13:57 2009 +0200
Revert "gfs-kernel: update to 2.6.30"
This reverts commit 38111441a822d898c749491ee59580250e0f6c98.
---
configure | 2 +-
gfs-kernel/src/gfs/acl.c | 1 -
gfs-kernel/src/gfs/proc.c | 1 +
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index aac1070..48e7469 100755
--- a/configure
+++ b/configure
@@ -17,7 +17,7 @@ my $ret = 0;
# this should be only the major version without the extra version
# eg. only the first 3 digits
-my $required_kernelversion = '2.6.30';
+my $required_kernelversion = '2.6.29';
my %options = (
help => \$help,
diff --git a/gfs-kernel/src/gfs/acl.c b/gfs-kernel/src/gfs/acl.c
index 3936baa..a9312ba 100644
--- a/gfs-kernel/src/gfs/acl.c
+++ b/gfs-kernel/src/gfs/acl.c
@@ -1,5 +1,4 @@
#include <linux/sched.h>
-#include <linux/fs_struct.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/spinlock.h>
diff --git a/gfs-kernel/src/gfs/proc.c b/gfs-kernel/src/gfs/proc.c
index 069b39d..b25cd1c 100644
--- a/gfs-kernel/src/gfs/proc.c
+++ b/gfs-kernel/src/gfs/proc.c
@@ -470,6 +470,7 @@ gfs_proc_init(void)
if (!pde)
return -ENOMEM;
+ pde->owner = THIS_MODULE;
pde->proc_fops = &gfs_proc_fops;
return 0;
14 years, 7 months
fence-agents: master - fence_drac: Split fence agents drac/drac5 to separate directories
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=com...
Commit: 894b0332d8058742151e92f3c1f4c9086e214638
Parent: 3c931231267aa1030b0ee2a2cc1e95271f76ecd5
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Sep 23 17:19:01 2009 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Sep 23 17:19:01 2009 +0200
fence_drac: Split fence agents drac/drac5 to separate directories
Fence agents fence_drac/fence_drac5 were only one that resides in same
directory. This patch creates new directory drac5/ were fence_drac5 was
moved.
---
configure.ac | 1 +
fence/agents/Makefile.am | 1 +
fence/agents/drac/Makefile.am | 4 +-
fence/agents/drac/fence_drac5.py | 131 -------------------------------------
fence/agents/drac5/Makefile.am | 12 ++++
fence/agents/drac5/fence_drac5.py | 131 +++++++++++++++++++++++++++++++++++++
6 files changed, 147 insertions(+), 133 deletions(-)
diff --git a/configure.ac b/configure.ac
index da47c76..b1b87ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,6 +248,7 @@ AC_CONFIG_FILES([Makefile
fence/agents/cisco_mds/Makefile
fence/agents/cpint/Makefile
fence/agents/drac/Makefile
+ fence/agents/drac5/Makefile
fence/agents/egenera/Makefile
fence/agents/eps/Makefile
fence/agents/ibmblade/Makefile
diff --git a/fence/agents/Makefile.am b/fence/agents/Makefile.am
index aea77ac..abf1397 100644
--- a/fence/agents/Makefile.am
+++ b/fence/agents/Makefile.am
@@ -10,6 +10,7 @@ SUBDIRS = alom \
cisco_mds \
cpint \
drac \
+ drac5 \
egenera \
eps \
ibmblade \
diff --git a/fence/agents/drac/Makefile.am b/fence/agents/drac/Makefile.am
index 92098fa..24e0464 100644
--- a/fence/agents/drac/Makefile.am
+++ b/fence/agents/drac/Makefile.am
@@ -1,8 +1,8 @@
MAINTAINERCLEANFILES = Makefile.in
-TARGET = fence_drac fence_drac5
+TARGET = fence_drac
-EXTRA_DIST = fence_drac.pl fence_drac5.py
+EXTRA_DIST = fence_drac.pl
sbin_SCRIPTS = $(TARGET)
diff --git a/fence/agents/drac/fence_drac5.py b/fence/agents/drac/fence_drac5.py
deleted file mode 100755
index 231fd06..0000000
--- a/fence/agents/drac/fence_drac5.py
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/usr/bin/python
-
-#####
-##
-## The Following Agent Has Been Tested On:
-##
-## DRAC Version Firmware
-## +-----------------+---------------------------+
-## DRAC 5 1.0 (Build 06.05.12)
-## DRAC 5 1.21 (Build 07.05.04)
-##
-## @note: drac_version was removed
-#####
-
-import sys, re, pexpect, exceptions
-sys.path.append("@FENCEAGENTSLIBDIR@")
-from fencing import *
-
-#BEGIN_VERSION_GENERATION
-RELEASE_VERSION="New Drac5 Agent - test release on steroids"
-REDHAT_COPYRIGHT=""
-BUILD_DATE="March, 2008"
-#END_VERSION_GENERATION
-
-def get_power_status(conn, options):
- try:
- if options["model"] == "DRAC CMC":
- conn.sendline("racadm serveraction powerstatus -m " + options["-m"])
- elif options["model"] == "DRAC 5":
- conn.sendline("racadm serveraction powerstatus")
-
- conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
- except pexpect.EOF:
- fail(EC_CONNECTION_LOST)
- except pexpect.TIMEOUT:
- fail(EC_TIMED_OUT)
-
- status = re.compile("(^|: )(ON|OFF|Powering ON|Powering OFF)\s*$", re.IGNORECASE | re.MULTILINE).search(conn.before).group(2)
- if status.lower().strip() in ["on", "powering on", "powering off"]:
- return "on"
- else:
- return "off"
-
-def set_power_status(conn, options):
- action = {
- 'on' : "powerup",
- 'off': "powerdown"
- }[options["-o"]]
-
- try:
- if options["model"] == "DRAC CMC":
- conn.sendline("racadm serveraction " + action + " -m " + options["-m"])
- elif options["model"] == "DRAC 5":
- conn.sendline("racadm serveraction " + action)
- conn.log_expect(options, options["-c"], POWER_TIMEOUT)
- except pexpect.EOF:
- fail(EC_CONNECTION_LOST)
- except pexpect.TIMEOUT:
- fail(EC_TIMED_OUT)
-
-def get_list_devices(conn, options):
- outlets = { }
-
- try:
- if options["model"] == "DRAC CMC":
- conn.sendline("getmodinfo")
-
- list_re = re.compile("^([^\s]*?)\s+Present\s*(ON|OFF)\s*.*$")
- for line in conn.before.splitlines():
- if (list_re.search(line)):
- outlets[list_re.search(line).group(1)] = ("", list_re.search(line).group(2))
- conn.log_expect(options, options["-c"], POWER_TIMEOUT)
- elif options["model"] == "DRAC 5":
- ## DRAC 5 can be used only for one computer
- pass
- except pexpect.EOF:
- fail(EC_CONNECTION_LOST)
- except pexpect.TIMEOUT:
- fail(EC_TIMED_OUT)
-
- return outlets
-
-def main():
- device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug",
- "action", "ipaddr", "login", "passwd", "passwd_script",
- "cmd_prompt", "secure", "drac_version", "module_name",
- "separator", "inet4_only", "inet6_only", "ipport" ]
-
- atexit.register(atexit_handler)
-
- options = check_input(device_opt, process_input(device_opt))
-
- ##
- ## Fence agent specific defaults
- #####
- if 0 == options.has_key("-c"):
- options["-c"] = "\$"
-
- show_docs(options)
-
- ##
- ## Operate the fencing device
- ######
- conn = fence_login(options)
-
- if conn.before.find("CMC") >= 0:
- if 0 == options.has_key("-m") and 0 == ["monitor", "list"].count(option["-o"].lower()):
- fail_usage("Failed: You have to enter module name (-m)")
-
- options["model"]="DRAC CMC"
- elif conn.before.find("DRAC 5") >= 0:
- options["model"]="DRAC 5"
- else:
- ## Assume this is DRAC 5 by default as we don't want to break anything
- options["model"]="DRAC 5"
-
- fence_action(conn, options, set_power_status, get_power_status, get_list_devices)
-
- ##
- ## Logout from system
- ######
- try:
- conn.sendline("exit")
- conn.close()
- except exceptions.OSError:
- pass
- except pexpect.ExceptionPexpect:
- pass
-
-if __name__ == "__main__":
- main()
diff --git a/fence/agents/drac5/Makefile.am b/fence/agents/drac5/Makefile.am
new file mode 100644
index 0000000..e6b26f8
--- /dev/null
+++ b/fence/agents/drac5/Makefile.am
@@ -0,0 +1,12 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+TARGET = fence_drac5
+
+EXTRA_DIST = fence_drac5.py
+
+sbin_SCRIPTS = $(TARGET)
+
+include $(top_srcdir)/make/fencebuild.mk
+
+clean-local:
+ rm -f $(TARGET)
diff --git a/fence/agents/drac5/fence_drac5.py b/fence/agents/drac5/fence_drac5.py
new file mode 100644
index 0000000..231fd06
--- /dev/null
+++ b/fence/agents/drac5/fence_drac5.py
@@ -0,0 +1,131 @@
+#!/usr/bin/python
+
+#####
+##
+## The Following Agent Has Been Tested On:
+##
+## DRAC Version Firmware
+## +-----------------+---------------------------+
+## DRAC 5 1.0 (Build 06.05.12)
+## DRAC 5 1.21 (Build 07.05.04)
+##
+## @note: drac_version was removed
+#####
+
+import sys, re, pexpect, exceptions
+sys.path.append("@FENCEAGENTSLIBDIR@")
+from fencing import *
+
+#BEGIN_VERSION_GENERATION
+RELEASE_VERSION="New Drac5 Agent - test release on steroids"
+REDHAT_COPYRIGHT=""
+BUILD_DATE="March, 2008"
+#END_VERSION_GENERATION
+
+def get_power_status(conn, options):
+ try:
+ if options["model"] == "DRAC CMC":
+ conn.sendline("racadm serveraction powerstatus -m " + options["-m"])
+ elif options["model"] == "DRAC 5":
+ conn.sendline("racadm serveraction powerstatus")
+
+ conn.log_expect(options, options["-c"], SHELL_TIMEOUT)
+ except pexpect.EOF:
+ fail(EC_CONNECTION_LOST)
+ except pexpect.TIMEOUT:
+ fail(EC_TIMED_OUT)
+
+ status = re.compile("(^|: )(ON|OFF|Powering ON|Powering OFF)\s*$", re.IGNORECASE | re.MULTILINE).search(conn.before).group(2)
+ if status.lower().strip() in ["on", "powering on", "powering off"]:
+ return "on"
+ else:
+ return "off"
+
+def set_power_status(conn, options):
+ action = {
+ 'on' : "powerup",
+ 'off': "powerdown"
+ }[options["-o"]]
+
+ try:
+ if options["model"] == "DRAC CMC":
+ conn.sendline("racadm serveraction " + action + " -m " + options["-m"])
+ elif options["model"] == "DRAC 5":
+ conn.sendline("racadm serveraction " + action)
+ conn.log_expect(options, options["-c"], POWER_TIMEOUT)
+ except pexpect.EOF:
+ fail(EC_CONNECTION_LOST)
+ except pexpect.TIMEOUT:
+ fail(EC_TIMED_OUT)
+
+def get_list_devices(conn, options):
+ outlets = { }
+
+ try:
+ if options["model"] == "DRAC CMC":
+ conn.sendline("getmodinfo")
+
+ list_re = re.compile("^([^\s]*?)\s+Present\s*(ON|OFF)\s*.*$")
+ for line in conn.before.splitlines():
+ if (list_re.search(line)):
+ outlets[list_re.search(line).group(1)] = ("", list_re.search(line).group(2))
+ conn.log_expect(options, options["-c"], POWER_TIMEOUT)
+ elif options["model"] == "DRAC 5":
+ ## DRAC 5 can be used only for one computer
+ pass
+ except pexpect.EOF:
+ fail(EC_CONNECTION_LOST)
+ except pexpect.TIMEOUT:
+ fail(EC_TIMED_OUT)
+
+ return outlets
+
+def main():
+ device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug",
+ "action", "ipaddr", "login", "passwd", "passwd_script",
+ "cmd_prompt", "secure", "drac_version", "module_name",
+ "separator", "inet4_only", "inet6_only", "ipport" ]
+
+ atexit.register(atexit_handler)
+
+ options = check_input(device_opt, process_input(device_opt))
+
+ ##
+ ## Fence agent specific defaults
+ #####
+ if 0 == options.has_key("-c"):
+ options["-c"] = "\$"
+
+ show_docs(options)
+
+ ##
+ ## Operate the fencing device
+ ######
+ conn = fence_login(options)
+
+ if conn.before.find("CMC") >= 0:
+ if 0 == options.has_key("-m") and 0 == ["monitor", "list"].count(option["-o"].lower()):
+ fail_usage("Failed: You have to enter module name (-m)")
+
+ options["model"]="DRAC CMC"
+ elif conn.before.find("DRAC 5") >= 0:
+ options["model"]="DRAC 5"
+ else:
+ ## Assume this is DRAC 5 by default as we don't want to break anything
+ options["model"]="DRAC 5"
+
+ fence_action(conn, options, set_power_status, get_power_status, get_list_devices)
+
+ ##
+ ## Logout from system
+ ######
+ try:
+ conn.sendline("exit")
+ conn.close()
+ except exceptions.OSError:
+ pass
+ except pexpect.ExceptionPexpect:
+ pass
+
+if __name__ == "__main__":
+ main()
14 years, 7 months
cluster: STABLE3 - cman init: allow sshd to start before cman without hard dependency
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: c3115765fe103b85e261eab4f5acd8e91fd3b7dd
Parent: a8ec3710d0e4e53bf466a1214e7c20d0f402b7e4
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Wed Sep 23 16:54:42 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Sep 23 16:54:42 2009 +0200
cman init: allow sshd to start before cman without hard dependency
In some scenarios this is very useful for debugging but we can't move
cman init startup priority or we will create a catch 22 with services.
Add CMAN_SSHD_START config variables that is user configurable and drives
sshd startup.
Fixes rhbz#494937
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/cman.in | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index ed5a756..8788258 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -89,6 +89,12 @@ fi
# are found in @NOTIFYDDIR@
[ -z "$CMAN_NOTIFYD_START" ] && CMAN_NOTIFYD_START=conditional
+# CMAN_SSHD_START - control sshd startup behaviour
+# the variable can take 2 values:
+# yes | cman will start sshd as early as possible
+# no (default) | cman will not start sshd
+[ -z "$CMAN_SSHD_START" ] && CMAN_SSHD_START=no
+
# FENCE_JOIN_TIMEOUT -- seconds to wait for fence domain join to
# complete. If the join hasn't completed in this time, fence_tool join
# exits with an error, and this script exits with an error. To wait
@@ -251,6 +257,16 @@ stop_daemon()
### check functions (enable/disable) (on/off)
+sshd_enabled()
+{
+ case "$CMAN_SSHD_START" in
+ yes)
+ return 0
+ ;;
+ esac
+ return 1
+}
+
mtab_configfs()
{
awk '{ print $2 }' /etc/mtab | \
@@ -669,6 +685,8 @@ stop_fence_xvmd()
start()
{
+ sshd_enabled && service sshd start
+
if [ "$INITLOGLEVEL" = "quiet" ]; then
echoarg="-n"
fi
14 years, 7 months