Rev 285: - nicer message if freeze child dies in
http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Sat May 12 05:59:50 GMT 2007
------------------------------------------------------------
revno: 285
revision-id: tridge at samba.org-20070512055949-osv0s89sfsx6sj8x
parent: tridge at samba.org-20070512055108-iu7dpt4clrysv3dp
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Sat 2007-05-12 15:59:49 +1000
message:
- nicer message if freeze child dies
- change local generation count after recovery/freeze started
modified:
common/ctdb_freeze.c ctdb_freeze.c-20070512051503-935zdtyuqknqnhmo-1
direct/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
=== modified file 'common/ctdb_freeze.c'
--- a/common/ctdb_freeze.c 2007-05-12 05:44:35 +0000
+++ b/common/ctdb_freeze.c 2007-05-12 05:59:49 +0000
@@ -82,6 +82,12 @@
int32_t status;
struct ctdb_freeze_waiter *w;
+ if (h->ctdb->freeze_mode == CTDB_FREEZE_FROZEN) {
+ DEBUG(0,("freeze child died - unfreezing\n"));
+ talloc_free(h);
+ return;
+ }
+
if (read(h->fd, &status, sizeof(status)) != sizeof(status)) {
DEBUG(0,("read error from freeze lock child\n"));
status = -1;
=== modified file 'direct/ctdb_recoverd.c'
--- a/direct/ctdb_recoverd.c 2007-05-12 05:15:27 +0000
+++ b/direct/ctdb_recoverd.c 2007-05-12 05:59:49 +0000
@@ -330,6 +330,13 @@
DEBUG(0, (__location__ " Recovery initiated\n"));
+ /* set recovery mode to active on all nodes */
+ ret = set_recovery_mode(ctdb, nodemap, CTDB_RECOVERY_ACTIVE);
+ if (ret!=0) {
+ DEBUG(0, (__location__ " Unable to set recovery mode to active on cluster\n"));
+ return -1;
+ }
+
/* pick a new generation number */
generation = random();
@@ -350,15 +357,6 @@
return -1;
}
-
- /* set recovery mode to active on all nodes */
- ret = set_recovery_mode(ctdb, nodemap, CTDB_RECOVERY_ACTIVE);
- if (ret!=0) {
- DEBUG(0, (__location__ " Unable to set recovery mode to active on cluster\n"));
- return -1;
- }
-
-
/* get a list of all databases */
ret = ctdb_ctrl_getdbmap(ctdb, timeval_current_ofs(1, 0), vnn, mem_ctx, &dbmap);
if (ret != 0) {
More information about the samba-cvs
mailing list