gfs2-utils: master - gfs2-utils: Add --enable-gprof to configure
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=a5b83a2e...
Commit: a5b83a2e386872d7570c89f7a05c920a5ecbf907
Parent: 757f93baff9f8a611b8efe5e1b0d11e42c63d128
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Jun 16 23:39:44 2016 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Tue Jun 21 14:51:38 2016 +0100
gfs2-utils: Add --enable-gprof to configure
Add a convenience flag to the configure script which inserts -pg into
the build flags.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
configure.ac | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index f6174ff..b421fbe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,6 +92,10 @@ AC_ARG_ENABLE([debug],
AC_ARG_ENABLE([gcov],
AC_HELP_STRING([--enable-gcov],[enable coverage instrumentation [default=no]]),
[], [enable_gcov="no"])
+AC_ARG_ENABLE([gprof],
+ AC_HELP_STRING([--enable-gprof],[enable profiling instrumentation [default=no]]),
+ [], [enable_gprof="no"])
+
# We use the Check framework for unit tests
PKG_CHECK_MODULES([check], [check >= 0.9.8],
@@ -162,6 +166,14 @@ if test "x${enable_gcov}" = xyes; then
OPT_CFLAGS="-O0 $GCOV_CFLAGS"
fi
+if test "x${enable_gprof}" = xyes; then
+ GPROF_CFLAGS="-pg"
+ if ! cc_supports_flag $GPROF_CFLAGS; then
+ AC_MSG_ERROR([your compiler does not support gprof instrumentation])
+ fi
+ OPT_CFLAGS="$OPT_CFLAGS $GPROF_CFLAGS"
+fi
+
# extra warnings
EXTRA_WARNINGS=""
@@ -226,6 +238,7 @@ echo " udevdir : $udevdir"
echo " ------------------"
echo " debug build : $enable_debug"
echo " C unit tests : $have_check"
+echo " gprof build : $enable_gprof"
echo " gcov build : $enable_gcov"
echo
echo "Now run 'make' to build and 'make check' to run tests"
7 years, 10 months
dlm: master - dlm_controld: libsystemd broke itself
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=dlm.git;a=commitdiff;h=2eefc91150a3292...
Commit: 2eefc91150a3292c2be82f4139207e06b4c4bba4
Parent: 5822d89f460131e7ffd020a514bf68694586e1c5
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Jun 10 13:13:48 2016 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Jun 10 13:13:48 2016 -0500
dlm_controld: libsystemd broke itself
---
dlm_controld/Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile
index 13d6339..cf556c9 100644
--- a/dlm_controld/Makefile
+++ b/dlm_controld/Makefile
@@ -62,9 +62,9 @@ LIB_CFLAGS += $(BIN_CFLAGS)
LIB_LDFLAGS += -Wl,-z,relro -pie
ifeq ($(USE_SD_NOTIFY),yes)
- BIN_CFLAGS += $(shell pkg-config --cflags libsystemd-daemon) \
+ BIN_CFLAGS += $(shell pkg-config --cflags libsystemd) \
-DUSE_SD_NOTIFY
- BIN_LDFLAGS += $(shell pkg-config --libs libsystemd-daemon)
+ BIN_LDFLAGS += $(shell pkg-config --libs libsystemd)
endif
all: $(LIB_TARGET) $(BIN_TARGET)
7 years, 10 months
dlm: master - release 4.0.6
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=dlm.git;a=commitdiff;h=5822d89f460131e...
Commit: 5822d89f460131e7ffd020a514bf68694586e1c5
Parent: d47b26db3276eca10144f53612c0fb6a755b72d0
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Jun 10 11:36:25 2016 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Jun 10 11:36:25 2016 -0500
release 4.0.6
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
include/version.cf | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/version.cf b/include/version.cf
index 7ee106c..a92d6ea 100644
--- a/include/version.cf
+++ b/include/version.cf
@@ -1,6 +1,6 @@
#ifndef _RELEASE_VERSION_CF_
#define _RELEASE_VERSION_CF_
-#define RELEASE_VERSION "4.0.5"
+#define RELEASE_VERSION "4.0.6"
#endif
7 years, 10 months
gfs2-utils: master - mkfs.gfs2: Tidy up are_you_sure()
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=757f93ba...
Commit: 757f93baff9f8a611b8efe5e1b0d11e42c63d128
Parent: a556f2806c78035bd17f325c0f89a244b65cee81
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Jun 10 11:44:10 2016 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Fri Jun 10 11:44:10 2016 +0100
mkfs.gfs2: Tidy up are_you_sure()
Coverity pointed out that the 'line' pointer was dereferenced before it
was NULL-checked and although that wasn't a bug it highlighted this
function's strange structure. This patch tidies it up somewhat, keeping
in mind that the memory allocated by getline() always has to be freed
whether it succeeds or not.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/mkfs/main_mkfs.c | 33 ++++++++++++++-------------------
1 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 4436f93..7ede5ad 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -422,34 +422,29 @@ static void test_locking(struct mkfs_opts *opts)
static void are_you_sure(void)
{
- char *line = NULL;
- size_t len = 0;
- int ret = -1;
- int res = 0;
+ while (1) {
+ char *line = NULL;
+ size_t len = 0;
+ int ret;
+ int res;
- do{
/* Translators: We use rpmatch(3) to match the answers to y/n
questions in the user's own language, so the [y/n] here must also be
translated to match one of the letters in the pattern printed by
`locale -k yesexpr` and one of the letters in the pattern printed by
`locale -k noexpr` */
- printf( _("Are you sure you want to proceed? [y/n]"));
+ printf( _("Are you sure you want to proceed? [y/n] "));
ret = getline(&line, &len, stdin);
res = rpmatch(line);
-
- if (res > 0){
- free(line);
- return;
- }
- if (!res){
- printf("\n");
- die( _("Aborted.\n"));
- }
-
- }while(ret >= 0);
-
- if(line)
free(line);
+ if (ret <= 0)
+ continue;
+ if (res == 1) /* Yes */
+ return;
+ if (res == 0) /* No */
+ exit(1);
+ /* Unrecognized input; go again. */
+ };
}
static unsigned choose_blocksize(struct mkfs_opts *opts)
7 years, 10 months
cluster: RHEL6 - rgmanager: Fix missing function prototype
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=80b9ae57170...
Commit: 80b9ae57170c1c6042375ea5119aea1ec79e3ab4
Parent: 3ad66bb1d801147eee80f68afc543429b3a2f0d2
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Thu Jun 9 11:29:24 2016 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Thu Jun 9 11:29:24 2016 -0400
rgmanager: Fix missing function prototype
Add a function prototype for lock_commit_cb so that we can properly
re-init the vf lock callbacks if we have lost and regained quorum.
Resolves: rhbz#1084053
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/daemons/main.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c
index 4831104..edd3d40 100644
--- a/rgmanager/src/daemons/main.c
+++ b/rgmanager/src/daemons/main.c
@@ -31,6 +31,9 @@
void dump_thread_states(FILE *);
#endif
static int configure_rgmanager(int ccsfd, int debug, int *cluster_timeout);
+static int lock_commit_cb(char __attribute__ ((unused)) *key,
+ uint64_t __attribute__ ((unused)) viewno,
+ void *data, uint32_t datalen);
void flag_shutdown(int sig);
7 years, 10 months
cluster: RHEL6 - rgmanager: Exit more gracefully if cman stops first
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=3ad66bb1d80...
Commit: 3ad66bb1d801147eee80f68afc543429b3a2f0d2
Parent: df390e7b2acc983658b0c30cdf0a6394ceb9a173
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Thu Jun 9 11:06:41 2016 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Thu Jun 9 11:06:41 2016 -0400
rgmanager: Exit more gracefully if cman stops first
Try to avoid raising signal 11 if cman exits before rgmanager and
cpg locks are being used.
Patch from John Ruemker <jruemker(a)redhat.com>
Resolves: rhbz#1342825
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/clulib/cpg_lock.c | 9 ++++++++-
rgmanager/src/daemons/main.c | 1 +
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/clulib/cpg_lock.c b/rgmanager/src/clulib/cpg_lock.c
index 7c1c8c3..e709648 100644
--- a/rgmanager/src/clulib/cpg_lock.c
+++ b/rgmanager/src/clulib/cpg_lock.c
@@ -19,6 +19,7 @@
/* Default lockspace stuff */
static cpg_lock_handle_t _cpgh = NULL;
static pthread_mutex_t _default_lock = PTHREAD_MUTEX_INITIALIZER;
+extern int shutdown_pending;
static void
dlm2cpg(struct dlm_lksb *dlm, struct cpg_lock *cpg)
@@ -75,7 +76,13 @@ _cpg_lock(int mode,
cpg2dlm(&l, lksb);
} else {
if (errno == EPIPE) {
- raise(SIGSEGV);
+ // If cpglockd went away because cman told it to shutdown,
+ // our shutdown request might be right behind it. Avoid
+ // crashing for a moment to see if we get the message
+ if (!shutdown_pending)
+ sleep(3);
+ if (!shutdown_pending)
+ raise(SIGSEGV);
}
}
diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c
index 9d5aa9a..4831104 100644
--- a/rgmanager/src/daemons/main.c
+++ b/rgmanager/src/daemons/main.c
@@ -646,6 +646,7 @@ handle_cluster_event(msgctx_t *ctx)
case M_TRY_SHUTDOWN:
msg_receive(ctx, NULL, 0, 0);
logt_print(LOG_WARNING, "#67: Shutting down uncleanly\n");
+ flag_shutdown(15);
rg_set_inquorate();
rg_doall(RG_INIT, 1, "Emergency stop of %s");
rg_clear_initialized(0);
7 years, 10 months
cluster: RHEL6 - rgmanager: Re-init the vf key callbacks after losing
and regaining quorum
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=df390e7b2ac...
Commit: df390e7b2acc983658b0c30cdf0a6394ceb9a173
Parent: 441bff8b11c094f5a005a6202b2bf9e7e39946a5
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Thu Jun 9 10:58:54 2016 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Thu Jun 9 10:58:54 2016 -0400
rgmanager: Re-init the vf key callbacks after losing and regaining quorum
When central processing is enabled, and we have recovered from quorum
having been dissolved, reinitialize the vf key callbacks.
Original patch from John Ruemker <jruemker(a)redhat.com>
Resolves: rhbz#1084053
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/daemons/main.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c
index 6f0b39f..9d5aa9a 100644
--- a/rgmanager/src/daemons/main.c
+++ b/rgmanager/src/daemons/main.c
@@ -153,6 +153,11 @@ membership_update(void)
rg_lockall(L_SYS);
exit(1);
}
+
+#ifndef USE_OPENAIS
+ vf_key_init("rg_lockdown", 10, NULL, lock_commit_cb);
+ vf_key_init("Transition-Master", 10, NULL, master_event_callback);
+#endif
}
}
7 years, 10 months
cluster: RHEL6 - rgmanager: Forgot that we were transition master on
quorum loss
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=441bff8b11c...
Commit: 441bff8b11c094f5a005a6202b2bf9e7e39946a5
Parent: 52816e6e75e47f23414afde26bdce2f0d6f21feb
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Thu Jun 9 10:53:29 2016 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Thu Jun 9 10:53:29 2016 -0400
rgmanager: Forgot that we were transition master on quorum loss
Clear the _master flag if we lose quorum, so that in the event quorum is
regained and we lose the race for the transition-master lock, we do not
wrongly think we're still master.
Resolves: rhbz#1084053
---
rgmanager/include/event.h | 1 +
rgmanager/src/daemons/main.c | 1 +
rgmanager/src/daemons/rg_event.c | 3 +++
3 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/rgmanager/include/event.h b/rgmanager/include/event.h
index 9fc9521..1442a64 100644
--- a/rgmanager/include/event.h
+++ b/rgmanager/include/event.h
@@ -120,6 +120,7 @@ int slang_process_event(event_table_t *event_table, event_t *ev);
/* For distributed events. */
void set_transition_throttling(int nsecs);
int get_transition_throttling(void);
+void drop_event_master(void);
/* Simplified service start. */
int service_op_start(char *svcName, int *target_list, int target_list_len,
diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c
index 127015b..6f0b39f 100644
--- a/rgmanager/src/daemons/main.c
+++ b/rgmanager/src/daemons/main.c
@@ -136,6 +136,7 @@ membership_update(void)
logt_print(LOG_DEBUG, "Flushing resource group cache\n");
kill_resource_groups();
rg_clear_initialized(0);
+ drop_event_master();
return -1;
} else if (!rg_quorate()) {
diff --git a/rgmanager/src/daemons/rg_event.c b/rgmanager/src/daemons/rg_event.c
index 4a747e0..1814c60 100644
--- a/rgmanager/src/daemons/rg_event.c
+++ b/rgmanager/src/daemons/rg_event.c
@@ -46,6 +46,9 @@ void flag_reconfigure(int sig);
event_table_t *master_event_table = NULL;
+void drop_event_master(void) {
+ _master = 0;
+}
void
set_transition_throttling(int nsecs)
7 years, 10 months
cluster: RHEL6 - rgmanager: Check for NULL when attempting to access
the member list
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=52816e6e75e...
Commit: 52816e6e75e47f23414afde26bdce2f0d6f21feb
Parent: abd0d212698ca681e42d3d2869fc728d1908f346
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Mon Jun 6 11:26:53 2016 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Mon Jun 6 11:26:53 2016 -0400
rgmanager: Check for NULL when attempting to access the member list
Check that the membership list is not NULL before accessing it while sending
state information. This can happen during very shortly after startup if
modclusterd is running and sends a clustat command before initialization is
complete.
Resolves: rhbz#1228170
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/daemons/main.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c
index 3679d57..127015b 100644
--- a/rgmanager/src/daemons/main.c
+++ b/rgmanager/src/daemons/main.c
@@ -77,6 +77,9 @@ send_node_states(msgctx_t *ctx)
generic_msg_hdr hdr;
cluster_member_list_t *ml = member_list();
+ if (!ml)
+ return;
+
master.m_nodeid = 0;
event_master_info_cached(&master);
7 years, 10 months