From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/daemon cman.c gd_internal.h join ...
Date: 20 Aug 2007 14:50:33 -0000 [thread overview]
Message-ID: <20070820145033.587.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2007-08-20 14:50:32
Modified files:
group/daemon : cman.c gd_internal.h joinleave.c main.c
Log message:
Call the new cman_set_dirty() api to disallow clusters both with
fence/dlm/gfs state from merging.
Adjust the oom setting for the daemon to avoid oom kills.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/cman.c.diff?cvsroot=cluster&r1=1.29&r2=1.30
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/gd_internal.h.diff?cvsroot=cluster&r1=1.47&r2=1.48
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/joinleave.c.diff?cvsroot=cluster&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/main.c.diff?cvsroot=cluster&r1=1.57&r2=1.58
--- cluster/group/daemon/cman.c 2006/12/14 19:54:16 1.29
+++ cluster/group/daemon/cman.c 2007/08/20 14:50:30 1.30
@@ -28,6 +28,16 @@
return rv;
}
+int set_cman_dirty(void)
+{
+ int rv;
+
+ rv = cman_set_dirty(ch);
+ if (rv)
+ log_print("cman_set_dirty error %d", rv);
+ return rv;
+}
+
static int is_member(cman_node_t *node_list, int count, int nodeid)
{
int i;
--- cluster/group/daemon/gd_internal.h 2007/02/09 16:03:15 1.47
+++ cluster/group/daemon/gd_internal.h 2007/08/20 14:50:30 1.48
@@ -277,6 +277,7 @@
/* cman.c */
int setup_cman(void);
int kill_cman(int nodeid);
+int set_cman_dirty(void);
/* cpg.c */
int setup_cpg(void);
--- cluster/group/daemon/joinleave.c 2006/10/13 20:07:45 1.19
+++ cluster/group/daemon/joinleave.c 2007/08/20 14:50:30 1.20
@@ -85,6 +85,10 @@
goto out;
}
+ rv = set_cman_dirty();
+ if (rv)
+ goto out;
+
rv = create_group(name, level, &g);
if (rv)
goto out;
--- cluster/group/daemon/main.c 2007/01/11 17:59:00 1.57
+++ cluster/group/daemon/main.c 2007/08/20 14:50:30 1.58
@@ -904,6 +904,18 @@
}
}
+void set_oom_adj(int val)
+{
+ FILE *fp;
+
+ fp = fopen("/proc/self/oom_adj", "w");
+ if (!fp)
+ return;
+
+ fprintf(fp, "%i", val);
+ fclose(fp);
+}
+
void set_scheduler(void)
{
struct sched_param sched_param;
@@ -939,8 +951,7 @@
write(fd, now_ascii, strlen(now_ascii));
write(fd, " groupd segfault log follows:\n", 30);
close(fd);
- }
- else
+ } else
perror(LOG_FILE);
if (sig == SIGSEGV)
exit(0);
@@ -960,10 +971,12 @@
signal(SIGSEGV, bail_with_log);
signal(SIGUSR1, bail_with_log);
+
if (!groupd_debug_opt)
daemonize();
set_scheduler();
+ set_oom_adj(-16);
pollfd = malloc(NALLOC * sizeof(struct pollfd));
if (!pollfd)
next reply other threads:[~2007-08-20 14:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-20 14:50 teigland [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-09-17 13:47 [Cluster-devel] cluster/group/daemon cman.c gd_internal.h join teigland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070820145033.587.qmail@sourceware.org \
--to=teigland@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.